Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions python/smap/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@
});

function latest(r) {
if (!r.length) {
return undefined;
}
return r.slice(-1)[0][1];
}
function latestts(r) {
if (!r.length) {
return undefined;
}
return r.slice(-1)[0][0];
}
function resetUpdater() {
Expand Down Expand Up @@ -174,8 +180,8 @@
function makeTimeseries(path, meta) {
console.log(meta);
if (meta['Actuator'] === undefined) {
return latest(meta["Readings"]) +
meta ["Properties"]["UnitofMeasure"];
return latest(meta["Readings"]) + " " +
meta["Properties"]["UnitofMeasure"];
} else if (meta['Actuator']['Model'] == 'binary') {
return makeBinaryActuator(path, meta);
} else if (meta['Actuator']['Model'] == 'discrete') {
Expand Down