-
Notifications
You must be signed in to change notification settings - Fork 7
/
envisalink-controller.html
41 lines (39 loc) · 1.79 KB
/
envisalink-controller.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<script type="text/x-red" data-template-name="envisalink-controller">
<div class="form-row node-controller">
<label for="node-config-input-host"><i class="fa fa-globe"></i> Server</span></label>
<input class="input-append-left" type="text" id="node-config-input-host" placeholder="localhost" style="width: 40%;" >
<label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
<input type="text" id="node-config-input-port" data-i18n="[placeholder]envisalink.label.port" style="width:45px">
</div>
<div class="form-row">
<label for="node-config-input-password" <i class="fa fa-lock"> Password</label>
<input type="password" id="node-config-input-password" style="width:40%;">
</div>
<div class="form-row">
<label for="node-config-input-zones"><i class="fa fa-dot-circle-o"></i> Zones</label>
<input type="text" id="node-config-input-zones" style="width:45px">
</div>
<div class="form-row">
<label for="node-config-input-partitions"><i class="fa fa-dot-circle-o"></i> Partitions</label>
<input type="text" id="node-config-input-partitions" style="width:45px">
</div>
</script>
<script type="text/x-red" data-help-name="envisalink-controller"></script>
<script type="text/javascript">
RED.nodes.registerType('envisalink-controller', {
category: 'config',
defaults: {
host: { value: '', required: true },
port: { value: 4025, required: true, validate: RED.validators.number() },
zones: { required: true },
partitions: { required: true, value: 1 },
},
credentials: {
password: { type: 'password' }
},
label: function () {
if (this.host === '') { this.host = 'localhost'; }
return this.host + ':' + this.port;
},
});
</script>