charts are up

This commit is contained in:
Senad Uka
2017-05-21 17:51:45 +02:00
parent 8c236609e8
commit e86ef0ba3a
13 changed files with 239 additions and 35 deletions

View File

@@ -5,30 +5,10 @@ Tracker.autorun(function() {
Meteor.subscribe("controller_state", id);
Meteor.subscribe('pictures', id);
}
window.addEventListener('orientationchange', function(){
Session.set("orientation", new Date());
});
window.addEventListener('resize', function(){
Session.set("resized", new Date());
});
});
function safeRoute(route) {
return function () {
var controllerId = this.params.query.controller_id;
if(controllerId) {
Session.setPersistent('controller_id', controllerId);
Session.setPersistent('hide_controller_selection', true);
} else {
Session.setPersistent('hide_controller_selection', false);
}
console.log('go ', route);
if (Meteor.zoblak.client.accessible(route)) {
Session.set('templateName', route);
} else {
Session.set('templateName', 'no_access')
}
}
}
Router.route('/', safeRoute('start'));
Router.route('/alarm', safeRoute('alarm'));
Router.route('/log', safeRoute('log'));
Router.route('/surveillance', safeRoute('surveillance'));
Router.route('/weather', safeRoute('weather'));