Files
MaxWaterSystem-Lite/HTML/Scaling.html
Patrick McDonagh 91096b2291 Completes #1.
- 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
2018-04-05 16:41:54 -05:00

334 lines
16 KiB
HTML

<div class="row row-flex">
<div class="col-xs-12" style="text-align: center;">
<h1>Flowmeter</h1>
</div>
<div class="col-md-6 box-me entry-top-level" id="setrawmin">
<div style="margin-left:15px;">
<h2>Raw Min</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setrawmin"].channelId %>">Raw Min Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setrawmin'].value %>">
<div class="input-group-addon">mA</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.setrawmin"].channelId %>"
data-techname="<%=channels["flowmonitor.setrawmin"].techName %>"
data-name="<%= channels["flowmonitor.setrawmin"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setrawmin"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setrawmin"].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="setrawmax">
<div style="margin-left:15px;">
<h2>Raw Max</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setrawmax"].channelId %>">Raw Max Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setrawmax'].value %>">
<div class="input-group-addon">mA</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.setrawmax"].channelId %>"
data-techname="<%=channels["flowmonitor.setrawmax"].techName %>"
data-name="<%= channels["flowmonitor.setrawmax"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setrawmax"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setrawmax"].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="setgpmmin">
<div style="margin-left:15px;">
<h2>GPM Min</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setgpmmin"].channelId %>">GPM Min Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setgpmmin'].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.setgpmmin"].channelId %>"
data-techname="<%=channels["flowmonitor.setgpmmin"].techName %>"
data-name="<%= channels["flowmonitor.setgpmmin"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setgpmmin"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setgpmmin"].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="setgpmmax">
<div style="margin-left:15px;">
<h2>GPM Max</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setgpmmax"].channelId %>">GPM Max Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setgpmmax'].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.setgpmmax"].channelId %>"
data-techname="<%=channels["flowmonitor.setgpmmax"].techName %>"
data-name="<%= channels["flowmonitor.setgpmmax"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setgpmmax"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setgpmmax"].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="setgpmignorelimit">
<div style="margin-left:15px;">
<h2>GPM Ignore Limit</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setgpmignorelimit"].channelId %>">GPM Max Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setgpmignorelimit'].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.setgpmignorelimit"].channelId %>"
data-techname="<%=channels["flowmonitor.setgpmignorelimit"].techName %>"
data-name="<%= channels["flowmonitor.setgpmignorelimit"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setgpmignorelimit"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setgpmignorelimit"].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-xs-12" style="text-align: center;">
<h1>Pressure Transmitter</h1>
</div>
<div class="col-md-6 box-me entry-top-level" id="setpressurerawmin">
<div style="margin-left:15px;">
<h2>Raw Min</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setpressurerawmin"].channelId %>">Raw Min Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setpressurerawmin'].value %>">
<div class="input-group-addon">V</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.setpressurerawmin"].channelId %>"
data-techname="<%=channels["flowmonitor.setpressurerawmin"].techName %>"
data-name="<%= channels["flowmonitor.setpressurerawmin"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setpressurerawmin"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setpressurerawmin"].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="setpressurerawmax">
<div style="margin-left:15px;">
<h2>Raw Max</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setpressurerawmax"].channelId %>">Raw Max Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setpressurerawmax'].value %>">
<div class="input-group-addon">V</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.setpressurerawmax"].channelId %>"
data-techname="<%=channels["flowmonitor.setpressurerawmax"].techName %>"
data-name="<%= channels["flowmonitor.setpressurerawmax"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setpressurerawmax"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setpressurerawmax"].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="setpressurepsimin">
<div style="margin-left:15px;">
<h2>PSI Min</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setpressurepsimin"].channelId %>">PSI Min Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setpressurepsimin'].value %>">
<div class="input-group-addon">PSI</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.setpressurepsimin"].channelId %>"
data-techname="<%=channels["flowmonitor.setpressurepsimin"].techName %>"
data-name="<%= channels["flowmonitor.setpressurepsimin"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setpressurepsimin"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setpressurepsimin"].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="setpressurepsimax">
<div style="margin-left:15px;">
<h2>PSI Max</h2>
<form class="form-inline">
<div class="form-group" style="margin-bottom:15px;">
<label
class="sr-only"
for="<%= channels["flowmonitor.setpressurepsimax"].channelId %>">PSI Max Value</label>
<div class="input-group">
<input
class="form-control channel_value"
type="number"
step="any"
value="<%=channels['flowmonitor.setpressurepsimax'].value %>">
<div class="input-group-addon">PSI</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.setpressurepsimax"].channelId %>"
data-techname="<%=channels["flowmonitor.setpressurepsimax"].techName %>"
data-name="<%= channels["flowmonitor.setpressurepsimax"].name%>"
data-nodechannelcurrentId="<%= channels["flowmonitor.setpressurepsimax"].nodechannelcurrentId %>"
id="<%= channels["flowmonitor.setpressurepsimax"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</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>