diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-06-30 14:04:36 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-06-30 14:04:36 +0200 |
commit | 55148e1e558d6f0bc97bc8f6bc2933652ca2468d (patch) | |
tree | 69d526b46a7efccd774eecf0fc460e98f9ba1ccf /web/js/nms-search.js | |
parent | d6e43208d50dfc4270578ff46fef83e4360a7574 (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/nms-search.js')
-rw-r--r-- | web/js/nms-search.js | 16 |
1 files changed, 16 insertions, 0 deletions
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; } |