22 lines
387 B
JavaScript
22 lines
387 B
JavaScript
Template.log.helpers({
|
|
sensorDataCollection: function() {
|
|
return SensorData.find({}, {
|
|
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")
|
|
}
|
|
});
|