forked from RnD/measurement
final mods for first generic standardisation
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
count: { value: "10", required: true },
|
count: { value: "10", required: true },
|
||||||
|
|
||||||
//define asset properties
|
//define asset properties
|
||||||
|
uuid: { value: "" },
|
||||||
supplier: { value: "" },
|
supplier: { value: "" },
|
||||||
category: { value: "" },
|
category: { value: "" },
|
||||||
assetType: { value: "" },
|
assetType: { value: "" },
|
||||||
@@ -87,6 +88,21 @@
|
|||||||
smoothMethodSelect.value = this.smooth_method;
|
smoothMethodSelect.value = this.smooth_method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Scale rows toggle ---
|
||||||
|
const chk = document.getElementById('node-input-scaling');
|
||||||
|
const rowMin = document.getElementById('row-input-i_min');
|
||||||
|
const rowMax = document.getElementById('row-input-i_max');
|
||||||
|
|
||||||
|
function toggleScalingRows() {
|
||||||
|
const show = chk.checked;
|
||||||
|
rowMin.style.display = show ? 'block' : 'none';
|
||||||
|
rowMax.style.display = show ? 'block' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// wire and initialize
|
||||||
|
chk.addEventListener('change', toggleScalingRows);
|
||||||
|
toggleScalingRows();
|
||||||
|
|
||||||
//------------------- END OF CUSTOM config UI ELEMENTS ------------------- //
|
//------------------- END OF CUSTOM config UI ELEMENTS ------------------- //
|
||||||
},
|
},
|
||||||
oneditsave: function () {
|
oneditsave: function () {
|
||||||
@@ -129,7 +145,6 @@
|
|||||||
|
|
||||||
<script type="text/html" data-template-name="measurement">
|
<script type="text/html" data-template-name="measurement">
|
||||||
|
|
||||||
|
|
||||||
<!-- Scaling Checkbox -->
|
<!-- Scaling Checkbox -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-scaling"
|
<label for="node-input-scaling"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class MeasurementNode {
|
|||||||
this.config = {
|
this.config = {
|
||||||
general: {
|
general: {
|
||||||
name: uiConfig.name,
|
name: uiConfig.name,
|
||||||
id: node.id, //need to add this later use node.uuid from a single project file thats unique per location + node-red environment + node
|
id: node.id, // node.id is for the child registration process
|
||||||
unit: uiConfig.unit, // add converter options later to convert to default units (need like a model that defines this which units we are going to use and then conver to those standards)
|
unit: uiConfig.unit, // add converter options later to convert to default units (need like a model that defines this which units we are going to use and then conver to those standards)
|
||||||
logging: {
|
logging: {
|
||||||
enabled: uiConfig.enableLog,
|
enabled: uiConfig.enableLog,
|
||||||
@@ -57,6 +57,7 @@ class MeasurementNode {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
|
uuid: uiConfig.assetUuid, //need to add this later to the asset model
|
||||||
tagCode: uiConfig.assetTagCode, //need to add this later to the asset model
|
tagCode: uiConfig.assetTagCode, //need to add this later to the asset model
|
||||||
supplier: uiConfig.supplier,
|
supplier: uiConfig.supplier,
|
||||||
category: uiConfig.category, //add later to define as the software type
|
category: uiConfig.category, //add later to define as the software type
|
||||||
|
|||||||
Reference in New Issue
Block a user