forked from node-red-contrib/node-red-contrib-mikrotik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mikrotik.html
57 lines (53 loc) · 2.05 KB
/
mikrotik.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script type="text/javascript">
RED.nodes.registerType('mikrotik',{
category: 'function',
color: '#E9967A',
defaults: {
name: {value:""},
ip : {value: ""},
action: {value:"0"}
},
credentials: {
login: {type:"text"},
pass: {type:"password"}
},
inputs:1,
outputs:1,
icon: "feed.png",
label: function() {
return this.name||"mikrotik";
}
});
</script>
<script type="text/x-red" data-template-name="mikrotik">
<div class="form-row">
<label for="node-input-ip"><i class="fa fa-wifi"></i> IP</label>
<input type="text" id="node-input-ip" placeholder="xxx.xxx.xxx.xxx">
</div>
<div class="form-row">
<label for="node-input-login"><i class="icon-user"></i> Login</label>
<input type="text" id="node-input-login" placeholder="login">
</div>
<div class="form-row">
<label for="node-input-pass"><i class="fa fa-key"></i> Pass</label>
<input type="password" id="node-input-pass" placeholder="password">
</div>
<div class="form-row">
<label for="node-input-action"><i class="icon-tasks"></i> Action</label>
<select id="node-input-action" placeholder="action">
<option value="0">Log</option>
<option value="1">System resources</option>
<option value="2">Connected WiFi</option>
<option value="3">Reboot</option>
<option value="9">Raw (use msg.payload)</option>
</select>
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" class="paletteLabel" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="mikrotik">
<p>A node that work with Mikrotik WiFi routers.</p>
<p>Read more about RouterOs API here: <a href="http://wiki.mikrotik.com/wiki/API_command_notes" target="_blank">http://wiki.mikrotik.com/wiki/API_command_notes</a>.</p>
</script>