1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/io/snmp/snmp.html
2015-03-04 19:55:53 +00:00

127 lines
4.6 KiB
HTML

<!--
Copyright 2014 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-template-name="snmp">
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="localhost">
</div>
<div class="form-row">
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
<input type="text" id="node-input-community" placeholder="public">
</div>
<div class="form-row">
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
<select type="text" id="node-input-version" style="width: 150px;">
<option value="1">v1</option>
<option value="2c">v2c</option>
</select>
</div>
<div class="form-row">
<label for="node-input-oids"><i class="fa fa-tags"></i> OIDs</label>
<textarea rows="4" cols="60" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0" style="width:70%;"></textarea>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: Multiple OIDs can be separated by commas.</div>
</script>
<script type="text/x-red" data-help-name="snmp">
<p>Simple SNMP oid or oid list fetcher. Triggered by any input.</p>
<p><b>msg.oid</b> may contain a comma separated list of oids to request. (no spaces)</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('snmp',{
category: 'network-input',
color:"YellowGreen",
defaults: {
host: {value:"",required:true},
community: {value:"public",required:true},
version: {value:"1",required:true},
oids: {value:""},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "snmp.png",
label: function() {
return this.name||"snmp "+this.host;
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>
<script type="text/x-red" data-template-name="snmp table">
<div class="form-row">
<label for="node-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-input-host" placeholder="localhost">
</div>
<div class="form-row">
<label for="node-input-community"><i class="fa fa-user"></i> Community</label>
<input type="text" id="node-input-community" placeholder="public">
</div>
<div class="form-row">
<label for="node-input-version"><i class="fa fa-bookmark"></i> Version</label>
<select type="text" id="node-input-version" style="width: 150px;">
<option value="1">v1</option>
<option value="2c">v2c</option>
</select>
</div>
<div class="form-row">
<label for="node-input-oids"><i class="fa fa-tags"></i> OID</label>
<input type="text" id="node-input-oids" placeholder="e.g. 1.3.6.1.2.1.1.5.0">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: ONLY accepts a single OID.</div>
</script>
<script type="text/x-red" data-help-name="snmp table">
<p>Simple SNMP oid table fetcher. Triggered by any input.</p>
<p><b>msg.oid</b> may contain the oid of a table to request.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('snmp table',{
category: 'network-input',
color:"YellowGreen",
defaults: {
host: {value:"",required:true},
community: {value:"public",required:true},
version: {value:"1",required:true},
oids: {value:""},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "snmp.png",
label: function() {
return this.name||"snmp table "+this.host;
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>