2016-01-24 09:12:10 +01:00
|
|
|
Template.log.helpers({
|
|
|
|
|
sensorDataCollection: function() {
|
2016-02-14 12:08:36 +01:00
|
|
|
var controllerId = Session.get('controller_id');
|
|
|
|
|
return SensorData.find({ controllerId: controllerId }, {
|
2016-01-24 09:12:10 +01:00
|
|
|
sort: {
|
|
|
|
|
created_at: -1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Template.log.events({
|
|
|
|
|
'click clear_log': function() {
|
|
|
|
|
Meteor.call('clearLog');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Template.sensorData.helpers({
|
|
|
|
|
created_at_formatted: function() {
|
|
|
|
|
return moment(this.created_at).format("DD.MM.YYYY, HH:mm")
|
|
|
|
|
}
|
|
|
|
|
});
|