created and tested server side water control
This commit is contained in:
21
app/client/log.js
Normal file
21
app/client/log.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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")
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user