Files
valveGroupControl/vgc.html
znetsixe bd67b22197 style: palette swatch → (domain-hue redesign 2026-05-21)
Sidebar swatch now follows function family rather than S88 level, so the
palette is visually identifiable instead of monochromatically blue. Editor-group
rectangles in flow.json still follow S88 — only the registerType color changed.
Full table + rationale: superproject .claude/rules/node-red-flow-layout.md §10.0
and .claude/refactor/OPEN_QUESTIONS.md (2026-05-21 entry).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 15:05:55 +02:00

111 lines
3.8 KiB
HTML

<!--
| S88-niveau | Primair (blokkleur) | Tekstkleur |
| ---------------------- | ------------------- | ---------- |
| **Area** | `#0f52a5` | wit |
| **Process Cell** | `#0c99d9` | wit |
| **Unit** | `#50a8d9` | zwart |
| **Equipment (Module)** | `#86bbdd` | zwart |
| **Control Module** | `#a9daee` | zwart |
-->
<script src="/valveGroupControl/menu.js"></script> <!-- Load the menu script for dynamic dropdowns -->
<script src="/valveGroupControl/configData.js"></script> <!-- Load the config script for node information -->
<script>
RED.nodes.registerType('valveGroupControl',{
category: "EVOLV",
color: "#2A8A82",
defaults: {
// Define default properties
name: { value: "" },
processOutputFormat: { value: "process" },
dbaseOutputFormat: { value: "influxdb" },
// Logger properties
enableLog: { value: false },
logLevel: { value: "error" },
//physicalAspect
positionVsParent: { value: "" },
positionIcon: { value: "" },
hasDistance: { value: false },
distance: { value: 0 },
distanceUnit: { value: "m" },
distanceDescription: { value: "" }
},
inputs:1,
outputs:3,
inputLabels: ["Input"],
outputLabels: ["process", "dbase", "parent"],
icon: "font-awesome/fa-tasks",
label: function () {
return (this.positionIcon || "") + " valveGroupControl";
},
oneditprepare: function() {
// Initialize the menu data for the node
const waitForMenuData = () => {
if (window.EVOLV?.nodes?.valveGroupControl?.initEditor) {
window.EVOLV.nodes.valveGroupControl.initEditor(this);
} else {
setTimeout(waitForMenuData, 50);
}
};
// Wait for the menu data to be ready before initializing the editor
waitForMenuData();
},
oneditsave: function(){
const node = this;
let success = true;
// Validate logger properties using the logger menu
if (window.EVOLV?.nodes?.valveGroupControl?.loggerMenu?.saveEditor) {
success = window.EVOLV.nodes.valveGroupControl.loggerMenu.saveEditor(node);
}
// save position field
if (window.EVOLV?.nodes?.valveGroupControl?.positionMenu?.saveEditor) {
window.EVOLV.nodes.valveGroupControl.positionMenu.saveEditor(this);
}
return success;
}
});
</script>
<script type="text/html" data-template-name="valveGroupControl">
<h3>Output Formats</h3>
<div class="form-row">
<label for="node-input-processOutputFormat"><i class="fa fa-random"></i> Process Output</label>
<select id="node-input-processOutputFormat" style="width:60%;">
<option value="process">process</option>
<option value="json">json</option>
<option value="csv">csv</option>
</select>
</div>
<div class="form-row">
<label for="node-input-dbaseOutputFormat"><i class="fa fa-database"></i> Database Output</label>
<select id="node-input-dbaseOutputFormat" style="width:60%;">
<option value="influxdb">influxdb</option>
<option value="frost">frost</option>
<option value="json">json</option>
<option value="csv">csv</option>
</select>
</div>
<!-- Logger fields injected here -->
<div id="logger-fields-placeholder"></div>
<!-- Position fields injected here -->
<div id="position-fields-placeholder"></div>
</script>
<script type="text/html" data-help-name="valveGroupControl">
<p>A valveGroupControl node</p>
</script>