- Adds Pressure Transmitter on Analog 1 - Updates device driver for reading Analog 1 - Updates device driver to store scaling parameters in persist.json - Increments version to 11 - Adds migration script to convert from using SQLite scaling storage - Updates HTML Templates - Updates README
166 lines
8.2 KiB
HTML
166 lines
8.2 KiB
HTML
<div class="row row-flex">
|
|
<div class="col-md-6 box-me entry-top-level" id="low_flow_gpm">
|
|
<div style="margin-left:15px;">
|
|
<h2>Low Flow Setpoint</h2>
|
|
<form class="form-inline">
|
|
<div class="form-group" style="margin-bottom:15px;">
|
|
<label
|
|
class="sr-only"
|
|
for="<%= channels["flowmonitor.low_flow_gpm"].channelId %>">Low Flow Limit (GPM)</label>
|
|
<div class="input-group">
|
|
<input
|
|
class="form-control channel_value"
|
|
type="number"
|
|
step="any"
|
|
value="<%=channels['flowmonitor.low_flow_gpm'].value %>">
|
|
<div class="input-group-addon">GPM</div>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend=1.0
|
|
data-channelId="<%= channels["flowmonitor.low_flow_gpm"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.low_flow_gpm"].techName %>"
|
|
data-name="<%= channels["flowmonitor.low_flow_gpm"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.low_flow_gpm"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.low_flow_gpm"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 box-me entry-top-level" id="cost_per_bbl">
|
|
<div style="margin-left:15px;">
|
|
<h2>Cost per BBL</h2>
|
|
<form class="form-inline">
|
|
<div class="form-group" style="margin-bottom:15px;">
|
|
<label
|
|
class="sr-only"
|
|
for="<%= channels["flowmonitor.cost_per_bbl"].channelId %>">Cost Per BBL ($)</label>
|
|
<div class="input-group">
|
|
<input
|
|
class="form-control channel_value"
|
|
type="number"
|
|
step="any"
|
|
value="<%=channels['flowmonitor.cost_per_bbl'].value %>">
|
|
<div class="input-group-addon">$</div>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend=1.0
|
|
data-channelId="<%= channels["flowmonitor.cost_per_bbl"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.cost_per_bbl"].techName %>"
|
|
data-name="<%= channels["flowmonitor.cost_per_bbl"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.cost_per_bbl"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.cost_per_bbl"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row row-flex">
|
|
<div class="col-md-6 text-center box-me" id="start-stop-toggle">
|
|
<% if (channels['flowmonitor.start_stop_enabled'].value == "True"){ %>
|
|
<h2>Start / Stop Relay Enabled</h2>
|
|
<% } else { %>
|
|
<h2>Start / Stop Relay Disabled</h2>
|
|
<% } %>
|
|
<div data-valueupdate="start_stop_enabled" data-refreshonupdate=true>
|
|
<form>
|
|
<% if (channels['flowmonitor.start_stop_enabled'].value == "True"){ %>
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend="False"
|
|
data-channelId="<%= channels["flowmonitor.start_stop_enabled"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.start_stop_enabled"].techName %>"
|
|
data-name="<%= channels["flowmonitor.start_stop_enabled"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.start_stop_enabled"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.start_stop_enabled"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic">Disable Control</a>
|
|
<% } else { %>
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend="True"
|
|
data-channelId="<%= channels["flowmonitor.start_stop_enabled"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.start_stop_enabled"].techName %>"
|
|
data-name="<%= channels["flowmonitor.start_stop_enabled"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.start_stop_enabled"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.start_stop_enabled"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic">Enable Control</a>
|
|
<% } %>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 text-center box-me" id="pressure-transmitter-toggle">
|
|
<% if (channels['flowmonitor.psi_pressure_enabled'].value == "True"){ %>
|
|
<h2>Pressure Transmitter Enabled</h2>
|
|
<% } else { %>
|
|
<h2>Pressure Transmitter Disabled</h2>
|
|
<% } %>
|
|
<div data-valueupdate="psi_pressure_enabled" data-refreshonupdate=true>
|
|
<form>
|
|
<% if (channels['flowmonitor.psi_pressure_enabled'].value == "True"){ %>
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend="False"
|
|
data-channelId="<%= channels["flowmonitor.psi_pressure_enabled"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.psi_pressure_enabled"].techName %>"
|
|
data-name="<%= channels["flowmonitor.psi_pressure_enabled"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.psi_pressure_enabled"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.psi_pressure_enabled"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic">Disable Pressure Transmitter</a>
|
|
<% } else { %>
|
|
<a
|
|
href="#"
|
|
data-confirm-message="Are you sure you want to do this?"
|
|
data-refreshpause="1"
|
|
data-command=""
|
|
data-staticsend="True"
|
|
data-channelId="<%= channels["flowmonitor.psi_pressure_enabled"].channelId %>"
|
|
data-techname="<%=channels["flowmonitor.psi_pressure_enabled"].techName %>"
|
|
data-name="<%= channels["flowmonitor.psi_pressure_enabled"].name%>"
|
|
data-nodechannelcurrentId="<%= channels["flowmonitor.psi_pressure_enabled"].nodechannelcurrentId %>"
|
|
id="<%= channels["flowmonitor.psi_pressure_enabled"].channelId %>"
|
|
class="btn btn-large btn-theme animated setstatic">Enable Pressure Transmitter</a>
|
|
<% } %>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
$('.channel_value').each(function(topLevel){
|
|
$(this).change(function(){
|
|
var id = "#" + $(this).closest(".entry-top-level").attr('id');
|
|
if (id !== "#undefined"){
|
|
var val = $(id).find('.channel_value').val();
|
|
var tag = $(id).find('.setstatic').attr('data-staticsend', val);
|
|
console.log($(id).find('.setstatic').attr('data-staticsend'));
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
</script>
|