created and tested server side water control

This commit is contained in:
Senad Uka
2016-01-24 09:12:10 +01:00
parent ff2c9f530f
commit 85d41bc69b
19 changed files with 281 additions and 83 deletions

View File

@@ -1,17 +1,8 @@
if (Meteor.isClient) {
// at the beginning
Session.set("templateName", "start");
Template.display.helpers({
sensorDataCollection: function () {
return SensorData.find({}, {sort: {created_at: -1}})
}
});
Template.display.events({
});
Template.sensorData.helpers({
created_at_formatted: function() {
return moment(this.created_at).format("DD.MM.YYYY, HH:mm")
}
});
}
Template.body.helpers({
template_name: function() {
return Session.get("templateName");
}
});