sensordata now limited to 100 again
This commit is contained in:
@@ -28,7 +28,9 @@ var createChart = function() {
|
|||||||
self.labels = [];
|
self.labels = [];
|
||||||
self.temperatures = [];
|
self.temperatures = [];
|
||||||
Tracker.autorun(function() {
|
Tracker.autorun(function() {
|
||||||
sensor_data_collection().forEach(function(sensorReading) {
|
var sdc = sensor_data_collection();
|
||||||
|
|
||||||
|
sdc.forEach(function(sensorReading) {
|
||||||
if (sensorReading.temperatures) {
|
if (sensorReading.temperatures) {
|
||||||
self.labels.push(moment(sensorReading.lastBoxContact).format('ddd DD.MM. HH:mm:ss'));
|
self.labels.push(moment(sensorReading.lastBoxContact).format('ddd DD.MM. HH:mm:ss'));
|
||||||
for (var i = 0; i < sensorReading.temperatures.length; i++) {
|
for (var i = 0; i < sensorReading.temperatures.length; i++) {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ Meteor.publish("sensor_data", function(controllerId) {
|
|||||||
}, {
|
}, {
|
||||||
sort: {
|
sort: {
|
||||||
created_at: -1
|
created_at: -1
|
||||||
}
|
},
|
||||||
|
limit: 100
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user