-
Notifications
You must be signed in to change notification settings - Fork 7
/
vis.html
43 lines (40 loc) · 1.9 KB
/
vis.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
42
43
<script type="text/x-red" data-template-name="vis in">
<div class="form-row">
<label for="node-input-language"><i class="fa fa-tasks"></i> Language</label>
<select id="node-input-language" placeholder="Language">
<option value="en">english</option>
<option value="de">deutsch</option>
<option value="ru">русский</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="vis in">
<p>Creates instance of "vis". You can create more nodes, but only one instance will be created.</p>
<p><b>vis</b> is a small part of <a href="https://github.com/ioBroker/ioBroker" target="_blank">ioBroker</a> project. It was ported to node-red.</p>
<p>Select language for messages and editor and go to <a href="/vis/edit.html" target="_blank">edit</a> or to <a href="/vis/index.html" target="_blank">index</a> to see edited views in runtime.</p>
<p>Read more about "ioBroker.vis" <a href="https://github.com/ioBroker/ioBroker.vis">here</a>.</p>
<p>You can send to the node topics like "/kitchen/light" and "vis" sends to "node-red" values for devices. Use the same names for "Object IDs" in the "vis".</p>
</script>
<script type="text/javascript">
function oneditprepare() {
// do nothing
}
RED.nodes.registerType('vis in', {
category: 'advanced-input',
color: "rgb(218, 196, 180)",
defaults: {
language: {value:"en", required:false}
},
inputs: 1,
outputs: 1,
icon: "vis.png",
label: function() {
var visNode = RED.nodes.node(this.vis);
return this.name || (visNode ? visNode.label() + " " + this.collection: "vis");
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
},
oneditprepare: oneditprepare
});
</script>