manual override for pump
This commit is contained in:
@@ -90,6 +90,25 @@ Template.state.helpers({
|
||||
}
|
||||
},
|
||||
|
||||
start_inflow_button_class: function() {
|
||||
var stateObject = controller_state();
|
||||
if(stateObject.config && stateObject.config.manualInflow && stateObject.state.out_valve === 'closed' && ( stateObject.state.in_valve === 'closed' || stateObject.state.in_valve === 'closing')) {
|
||||
return 'btn btn-danger'
|
||||
} else {
|
||||
return 'hidden btn btn-danger'
|
||||
}
|
||||
},
|
||||
|
||||
stop_inflow_button_class: function() {
|
||||
var stateObject = controller_state();
|
||||
if(stateObject.config && stateObject.config.manualInflow && stateObject.state.out_valve === 'closed' && ( stateObject.state.in_valve === 'open' || stateObject.state.in_valve === 'opening')) {
|
||||
return 'btn btn-danger'
|
||||
} else {
|
||||
return 'hidden btn btn-danger'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
pretty_days: function(daysInNumbers) {
|
||||
var days = ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"];
|
||||
if (!daysInNumbers || daysInNumbers.length == 0) {
|
||||
@@ -125,6 +144,16 @@ Template.state.events({
|
||||
Meteor.call('closeOutValve', controller_id)
|
||||
},
|
||||
|
||||
'click #start_inflow_now': function() {
|
||||
var controller_id = Session.get('controller_id');
|
||||
Meteor.call('openInValve', controller_id)
|
||||
},
|
||||
|
||||
'click #stop_inflow_now': function() {
|
||||
var controller_id = Session.get('controller_id');
|
||||
Meteor.call('closeInValve', controller_id)
|
||||
},
|
||||
|
||||
'click #run_settings': function() {
|
||||
Modal.show('settings');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user