Merge pull request #759 from Nirothipan/master

raspberry pi analytics graph
revert-dabc3590
Madhawa Perera 7 years ago committed by GitHub
commit 244851b19e

@ -13,7 +13,7 @@ define stream raspberrypi (meta_owner string, meta_deviceId string, meta_time lo
define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float); define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float);
from raspberrypi from raspberrypi
select meta_owner, 'raspberrypi' as meta_deviceType, meta_deviceId, meta_time * 1000 as meta_time, temperature select meta_owner, 'raspberrypi' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature
insert into temperature; insert into temperature;

@ -168,7 +168,7 @@ function drawGraph_raspberrypi(from, to) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
chartData.push( chartData.push(
{ {
x: parseInt(data[i].values.time) - tzOffset, x: parseInt(data[i].values.meta_time/1000) - tzOffset,
y: parseInt(data[i].values.temperature) y: parseInt(data[i].values.temperature)
} }
); );

Loading…
Cancel
Save