added back watering route and hopefully fixed bug with graph
This commit is contained in:
@@ -29,12 +29,14 @@ var createChart = function() {
|
||||
self.temperatures = [];
|
||||
Tracker.autorun(function() {
|
||||
sensor_data_collection().forEach(function(sensorReading) {
|
||||
self.labels.push(moment(sensorReading.lastBoxContact).format('ddd DD.MM. HH:mm:ss'));
|
||||
for (var i = 0; i < sensorReading.temperatures.length; i++) {
|
||||
if (!self.temperatures[i]) {
|
||||
self.temperatures[i] = [];
|
||||
if (sensorReading.temperatures) {
|
||||
self.labels.push(moment(sensorReading.lastBoxContact).format('ddd DD.MM. HH:mm:ss'));
|
||||
for (var i = 0; i < sensorReading.temperatures.length; i++) {
|
||||
if (!self.temperatures[i]) {
|
||||
self.temperatures[i] = [];
|
||||
}
|
||||
self.temperatures[i].push(sensorReading.temperatures[i]);
|
||||
}
|
||||
self.temperatures[i].push(sensorReading.temperatures[i]);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -187,7 +189,6 @@ Template.log.onRendered(function() {
|
||||
|
||||
Template.log.resized = function() {
|
||||
createChart();
|
||||
|
||||
return Session.get('resize');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user