Fixes configuration page to use generic jQuery to update value and tag
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<div class="col-xs-12 text-center">
|
||||
<h1>PID Settings</h1>
|
||||
</div>
|
||||
<div class="col-md-6 box-me" id="flowsetpoint">
|
||||
<div class="col-md-6 box-me entry-top-level" id="flowsetpoint">
|
||||
<div class="pad15">
|
||||
<h2>Flow Setpoint
|
||||
<% if (channels["advvfdipp.pidcontrolmode"].value == "Flow"){ %>
|
||||
@@ -84,7 +84,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 box-me" id="fluidlevelsetpoint">
|
||||
<div class="col-md-6 box-me entry-top-level" id="fluidlevelsetpoint">
|
||||
<div class="pad15">
|
||||
<h2>Fluid Level Setpoint
|
||||
<% if (channels["advvfdipp.pidcontrolmode"].value == "Fluid Level"){ %>
|
||||
@@ -126,7 +126,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 box-me" id="tubingpressuresetpoint">
|
||||
<div class="col-md-6 box-me entry-top-level" id="tubingpressuresetpoint">
|
||||
<div class="pad15">
|
||||
<h2>Tubing Pressure Setpoint
|
||||
<% if (channels["advvfdipp.pidcontrolmode"].value == "Tubing Pressure"){ %>
|
||||
@@ -168,7 +168,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 box-me" id="manualfrequencysetpoint">
|
||||
<div class="col-md-6 box-me entry-top-level" id="manualfrequencysetpoint">
|
||||
<div class="pad15">
|
||||
<h2>Manual Frequency Setpoint
|
||||
<% if (channels["advvfdipp.pidcontrolmode"].value == "Manual"){ %>
|
||||
@@ -212,153 +212,184 @@
|
||||
</div>
|
||||
|
||||
<div class="row row-flex">
|
||||
<div class='col-xs-6 text-center box-me'>
|
||||
<h2>Pressure Settings</h2>
|
||||
<div class="gauge-box">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Shutdown Limit</td>
|
||||
<td>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.pressureshutdownlimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakePressure.PSet_LoLim',<%=channels['advvfdipp.pressureshutdownlimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="col-md-12 text-center">
|
||||
<h1>Shutdown Parameters</h1>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td>Startup Limit</td>
|
||||
<td>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.pressurestartuplimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakePressure.PSet_HiLim',<%=channels['advvfdipp.pressurestartuplimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-6 box-me entry-top-level" id="pressureshutdownlimit">
|
||||
<div class="pad15">
|
||||
<h2>Pressure Shutdown Limit</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.pressureshutdownlimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakePressure.PSet_LoLim',<%=channels['advvfdipp.pressureshutdownlimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='col-xs-6 text-center box-me'>
|
||||
<h2>Temperature Settings</h2>
|
||||
<div class="gauge-box">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<div class="col-md-6 box-me entry-top-level" id="pressurestartuplimit">
|
||||
<div class="pad15">
|
||||
<h2>Pressure Startup Limit</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.pressurestartuplimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakePressure.PSet_HiLim',<%=channels['advvfdipp.pressurestartuplimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td>Shutdown Limit</td>
|
||||
<td>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.temperatureshutdownlimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakeTemperature.PSet_HiLim',<%=channels['advvfdipp.temperatureshutdownlimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="col-md-6 box-me entry-top-level" id="temperatureshutdownlimit">
|
||||
<div class="pad15">
|
||||
<h2>Temperature Shutdown Limit</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.temperatureshutdownlimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakeTemperature.PSet_HiLim', <%=channels['advvfdipp.temperatureshutdownlimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td>Startup Limit</td>
|
||||
<td>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.temperaturestartuplimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakeTemperature.PSet_LoLim',<%=channels['advvfdipp.temperaturestartuplimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="col-md-6 box-me entry-top-level" id="temperaturestartuplimit">
|
||||
<div class="pad15">
|
||||
<h2>Temperature Startup Limit</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.temperaturestartuplimit'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['AIn_IntakeTemperature.PSet_LoLim', <%=channels['advvfdipp.temperaturestartuplimit'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row row-flex">
|
||||
<div class="col-md-12 text-center">
|
||||
<h1>Well Parameters</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 box-me entry-top-level" id="fluidspecificgravity">
|
||||
<div class="pad15">
|
||||
<h2>Specific Gravity</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.fluidspecificgravity'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['cfg_FluidSpecificGravity', <%=channels['advvfdipp.fluidspecificgravity'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 box-me entry-top-level" id="sensorheight">
|
||||
<div class="pad15">
|
||||
<h2>Sensor Height</h2>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<input class="form-control val_box"
|
||||
type="number"
|
||||
step="any"
|
||||
value="<%=channels['advvfdipp.sensorheight'].value %>">
|
||||
</div>
|
||||
<a href="#"
|
||||
data-refreshpause="3"
|
||||
data-command=""
|
||||
data-staticsend="[{'com':'1','values':[ ['cfg_DHSensorDistToIntake', <%=channels['advvfdipp.sensorheight'].value %>] ] }]"
|
||||
data-channelId="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
data-techname="<%=channels['advvfdipp.modbuswrite'].techName %>"
|
||||
data-name="<%= channels['advvfdipp.modbuswrite'].name%>"
|
||||
data-nodechannelcurrentId="<%= channels['advvfdipp.modbuswrite'].nodechannelcurrentId %>"
|
||||
id="<%= channels['advvfdipp.modbuswrite'].channelId %>"
|
||||
class="btn btn-large btn-theme animated confirmstatic">
|
||||
<i class="material-icons">send</i></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#flowsetpoint .val_box').change(function(){
|
||||
console.log(typeof $('#flowsetpoint .val_box').val());
|
||||
$('#flowsetpoint .mbusbutton').attr('data-staticsend', "[{'com':'1','values':[ ['cfg_PID_FlowSP'," + parseFloat($('#flowsetpoint .val_box').val()).toFixed(10) + "] ] }]");
|
||||
$("#flowsetpoint .mbusbutton").removeClass('hidden');
|
||||
console.log("New value for data-staticsend: " + "[{'com':'1','values':[ ['cfg_PID_FlowSP'," + $('#flowsetpoint .val_box').val() + "] ] }]");
|
||||
|
||||
$('.val_box').each(function(topLevel){
|
||||
$(this).change(function(){
|
||||
var id = "#" + $(this).closest(".entry-top-level").attr('id');
|
||||
if (id !== "#undefined"){
|
||||
var tagStart = $(id).find('.confirmstatic').attr('data-staticsend').indexOf("[ [") + 3;
|
||||
var tagStop = $(id).find('.confirmstatic').attr('data-staticsend').indexOf("] ]");
|
||||
var tag = $(id).find('.confirmstatic').attr('data-staticsend').substring(tagStart, tagStop).split(',')[0].replace(/'/g,"");
|
||||
var val = $(id).find('.val_box').val();
|
||||
var newData = "[{'com':'1','values':[ ['" + tag +"'," + val.toString() + "] ] }]"
|
||||
var tag = $(id).find('.confirmstatic').attr('data-staticsend', newData);
|
||||
console.log($(id).find('.confirmstatic').attr('data-staticsend'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#intakepressuresetpoint .val_box').change(function(){
|
||||
$('#intakepressuresetpoint .mbusbutton').attr('data-staticsend', "[{'com':'1','values':[ ['cfg_PID_IntakePressureSP'," + $('#intakepressuresetpoint .val_box').val().toString() + "] ] }]");
|
||||
$("#intakepressuresetpoint .mbusbutton").removeClass('hidden');
|
||||
console.log("New value for data-staticsend: " + "[{'com':'1','values':[ ['cfg_PID_IntakePressureSP'," + $('#intakepressuresetpoint .val_box').val() + "] ] }]");
|
||||
});
|
||||
|
||||
$('#tubingpressuresetpoint .val_box').change(function(){
|
||||
$('#tubingpressuresetpoint .mbusbutton').attr('data-staticsend', "[{'com':'1','values':[ ['cfg_PID_TubingPressureSP'," + $('#tubingpressuresetpoint .val_box').val().toString() + "] ] }]");
|
||||
$("#tubingpressuresetpoint .mbusbutton").removeClass('hidden');
|
||||
console.log("New value for data-staticsend: " + "[{'com':'1','values':[ ['cfg_PID_TubingPressureSP'," + $('#tubingpressuresetpoint .val_box').val() + "] ] }]");
|
||||
});
|
||||
|
||||
$('#manualfrequencysetpoint .val_box').change(function(){
|
||||
$('#manualfrequencysetpoint .mbusbutton').attr('data-staticsend', "[{'com':'1','values':[ ['cfg_PID_ManualSP'," + $('#manualfrequencysetpoint .val_box').val().toString() + "] ] }]");
|
||||
$("#manualfrequencysetpoint .mbusbutton").removeClass('hidden');
|
||||
console.log("New value for data-staticsend: " + "[{'com':'1','values':[ ['cfg_PID_ManualSP'," + $('#manualfrequencysetpoint .val_box').val() + "] ] }]");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user