2016-10-15 15:58:41 +02:00
|
|
|
Tracker.autorun(function() {
|
2016-03-06 09:20:36 +01:00
|
|
|
var id = Session.get('controller_id');
|
|
|
|
|
if (id) {
|
|
|
|
|
Meteor.subscribe("sensor_data", id);
|
2016-10-08 16:02:59 +02:00
|
|
|
Meteor.subscribe("controller_state", id);
|
|
|
|
|
Meteor.subscribe('pictures', id);
|
2016-03-06 09:20:36 +01:00
|
|
|
}
|
|
|
|
|
});
|
2016-10-15 15:58:41 +02:00
|
|
|
|
|
|
|
|
Router.route('/', function() {
|
|
|
|
|
if (accessible('start')) {
|
|
|
|
|
Session.set('templateName', 'start');
|
|
|
|
|
} else {
|
|
|
|
|
Session.set('templateName', 'no_access')
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Router.route('/farmalarm', function() {
|
|
|
|
|
|
|
|
|
|
});
|