forked from ItsEcholot/node-red-contrib-snmp-trap-listener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snmp-trap-listener.html
41 lines (38 loc) · 1.53 KB
/
snmp-trap-listener.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/javascript">
RED.nodes.registerType('snmp-trap-listener', {
category: 'input',
color: '#9574d8',
defaults: {
port: {value: 162, required: true, validate: RED.validators.number()},
community: {value: ""},
ipfilter: {value: ""},
ipmask: {value: ""},
},
inputs: 0,
outputs: 1,
icon: "bridge.png",
label: function () {
return this.name||"snmp-trap-listener";
}
});
</script>
<script type="text/x-red" data-template-name="snmp-trap-listener">
<div class="form-row">
<!--<label for="node-input-name"><i class="icon-tag"></i> Name</label>-->
<!--<input type="text" id="node-input-name" placeholder="Name">-->
<label for="node-input-port"><i class="icon-tag"></i> Port</label>
<input type="number" id="node-input-port"></input>
<br>
<label for="node-input-community"><i class="icon-tag"></i> Community</label>
<input type="text" id="node-input-community" placeholder="Community">
<br>
<label for="node-input-ipfilter"><i class="icon-tag"></i> IP Filter - IP</label>
<input type="text" id="node-input-ipfilter" placeholder="127.0.0.1">
<br>
<label for="node-input-ipmask"><i class="icon-tag"></i> IP Filter - Network mask</label>
<input type="number" id="node-input-ipmask" placeholder="32">
</div>
</script>
<script type="text/x-red" data-help-name="snmp-trap-listener">
<p>Node that receives Snmp traps</p>
</script>