53 lines
1.7 KiB
HTML
53 lines
1.7 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('xilica-connection', {
|
|
category: 'config',
|
|
defaults: {
|
|
name: { value: "" },
|
|
host: { value: "", required: true },
|
|
port: { value: 10007, required: true },
|
|
timeout: { value: 5000 }
|
|
},
|
|
credentials: {
|
|
password: { type: "password" }
|
|
},
|
|
label: function () {
|
|
if (this.name) {
|
|
return this.name;
|
|
}
|
|
if (this.host && this.port) {
|
|
return this.host + ":" + this.port;
|
|
}
|
|
return "Xilica connection";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/x-red" data-template-name="xilica-connection">
|
|
<div class="form-row">
|
|
<label for="node-config-input-name">Name</label>
|
|
<input type="text" id="node-config-input-name">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-host">Host</label>
|
|
<input type="text" id="node-config-input-host" placeholder="192.168.x.x">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-port">TCP Port</label>
|
|
<input type="number" id="node-config-input-port" min="1" max="65535">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-timeout">Timeout (ms)</label>
|
|
<input type="number" id="node-config-input-timeout" min="100" max="60000">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-password">Password</label>
|
|
<input type="password" id="node-config-input-password">
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-help-name="xilica-connection">
|
|
<p>Configuration for connecting to a Xilica Solaro processor using the Third-Party Control API.</p>
|
|
<p>Specify the device IP address and TCP port (default 10007). Optionally set a password if the device is locked.</p>
|
|
</script>
|
|
|