Files
old-tfm/app/client/startup.js

25 lines
600 B
JavaScript
Raw Normal View History

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() {
2016-10-23 15:10:20 +02:00
if (Meteor.zoblak.client.accessible('start')) {
2016-10-15 15:58:41 +02:00
Session.set('templateName', 'start');
} else {
Session.set('templateName', 'no_access')
}
});
Router.route('/farmalarm', function() {
2016-10-29 13:07:08 +02:00
if (Meteor.zoblak.client.accessible('alarm')) {
Session.set('templateName', 'alarm');
} else {
Session.set('templateName', 'no_access')
}
2016-10-15 15:58:41 +02:00
});