aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-06-30 14:04:36 +0200
committerKristian Lyngstol <kly@kly.no>2016-06-30 14:04:36 +0200
commit55148e1e558d6f0bc97bc8f6bc2933652ca2468d (patch)
tree69d526b46a7efccd774eecf0fc460e98f9ba1ccf /web/js
parentd6e43208d50dfc4270578ff46fef83e4360a7574 (diff)
Add serial numbers (cisco) and fix snmp view
No longer updates SNMP view when you're looking at it.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/nms-info-box.js1
-rw-r--r--web/js/nms-search.js16
2 files changed, 16 insertions, 1 deletions
diff --git a/web/js/nms-info-box.js b/web/js/nms-info-box.js
index c985e42..90ba12f 100644
--- a/web/js/nms-info-box.js
+++ b/web/js/nms-info-box.js
@@ -526,7 +526,6 @@ var nmsInfoPanel = function nmsInfoPanel(name,id) {
var switchSNMPPanel = function () {
nmsInfoPanel.call(this,"switchSNMP");
this.init = function() {
- this.addHandler("snmp");
this.refresh();
};
this.refresh = function(reason) {
diff --git a/web/js/nms-search.js b/web/js/nms-search.js
index 6d61536..fb8e725 100644
--- a/web/js/nms-search.js
+++ b/web/js/nms-search.js
@@ -80,6 +80,22 @@ nmsSearch.searchTest = function(id, sw) {
return true;
}
} catch (e) {}
+ try {
+ for (var x in nmsData.snmp.snmp[sw].misc.entPhysicalSerialNum) {
+ if (nmsData.snmp.snmp[sw].misc.entPhysicalSerialNum[x] == null) {
+ continue;
+ }
+ if (nmsData.snmp.snmp[sw].misc.entPhysicalSerialNum[x] == undefined) {
+ continue;
+ }
+ if (nmsData.snmp.snmp[sw].misc.entPhysicalSerialNum[x] == "") {
+ continue;
+ }
+ if (re.test(nmsData.snmp.snmp[sw].misc.entPhysicalSerialNum[x])) {
+ return true;
+ }
+ }
+ } catch (e) {}
if (re.test(nmsData.snmp.snmp[sw].misc.sysDescr[0])) {
return true;
}