@logiccloud/node-red-logiccloud-control
Version:
The all-in-one logiccloud control package for Node-RED environment.
58 lines (52 loc) • 3.37 kB
HTML
<script type="text/javascript">
RED.nodes.registerType("logiccloud-control-configuration", {
category: "config",
color: '#ff5064',
defaults: {
name: {value: "logiccloud-control", required: false},
host: {value: "host.docker.internal:host-gateway", required: true},
port: {value: 42011, required: true}
},
paletteLabel: "logiccloud-control-configuration",
icon: "lc-cloud-icon.png",
label: function () {
return this.name || "logiccloud-control-on:" + this.host + ":" + this.port;
},
labelStyle: function () {
return "palette_label";
},
inputLabels: "no input",
outputLabels: "no output",
align: "right"
});
</script>
<script type="text/html" data-template-name="logiccloud-control-configuration">
<div class="form-row" style="display: flex;align-items: center;">
<label style="margin:0; min-width:100px" for="node-config-input-name"><i class="fa fa-pencil"></i> Name</label>
<input style="flex:1" type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row" style="display: flex;align-items: center;">
<label style="margin:0; min-width:100px" for="node-config-input-host"><i class="fa fa-pencil"></i> Host</label>
<input style="flex:1" type="text" id="node-config-input-host">
</div>
<div class="form-row" style="display: flex;align-items: center;">
<label style="margin:0; min-width:100px" for="node-config-input-port"><i class="fa fa-pencil"></i> Port</label>
<input style="flex:1" type="text" id="node-config-input-port" placeholder="Port">
</div>
</script>
<script type="text/html" data-help-name="logiccloud-control-configuration">
<p>This node is used to connect to the logiccloud control.</p>
<p>The communication with the logiccloud control is always done via logiccloud Node-RED connector.
The logiccloud Node-RED connector is the one responsible with the data handling between the logiccloud control input / logiccloud control output nodes and the logiccloud control.
The logiccloud Node-RED connector is only allowing access to the logiccloud control access variables defined in its mappings.
This means that the logiccloud Node-RED nodes only have access to a subset of all logiccloud control access variables, so only to the ones defined in the mappings.
If the mappings of logiccloud Node-RED connector are updated, the Node-RED flow has to be restarted in order for the changes to take effect also on logiccloud Node-RED nodes.</p>
<p>The logiccloud control configuration node provides the following properties:</p>
<ul>
<li>name: the name of the node; if it is not set, the node will have the default name "logiccloud-control-on:[host]:[port]"</li>
<li>host: the hostname or IP address of the logiccloud Node-RED connector</li>
<li>port: the port of the logiccloud Node-RED connector</li>
</ul>
<p>The logiccloud control configuration node provides browsing support that can be used to discover the available input/output access variables in the logiccloud control (of course, as described before, the ones defined in the mappings by the logiccloud Node-RED connector).
In order to use this feature, the logiccloud control configuration node has to be properly configured (valid host and port of an existing running logiccloud control) and deployed.</p>
</script>