diff options
Diffstat (limited to 'web/nms.gathering.org/js/nms-info-box.js')
-rw-r--r-- | web/nms.gathering.org/js/nms-info-box.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index a718f78..77f5cf5 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -579,6 +579,7 @@ nmsInfoBox._searchSmart = function(id, sw) { return true; } } catch (e) {} + try { if (id.match("active")) { var limit = id; limit = limit.replace("active>",""); @@ -586,21 +587,24 @@ nmsInfoBox._searchSmart = function(id, sw) { limit = limit.replace("active=",""); var operator = id.replace("active","")[0]; if (limit == parseInt(limit)) { + var ports = parseInt(nmsData.switchstate.switches[sw].ifs.ge.live); + limit = parseInt(limit); if (operator == ">" ) { - if (nmsData.switchstate.switches[sw]['totals'].live > limit) { + if (ports > limit) { return true; } } else if (operator == "<") { - if (nmsData.switchstate.switches[sw]['totals'].live < limit) { + if (ports < limit) { return true; } } else if (operator == "=") { - if (nmsData.switchstate.switches[sw]['totals'].live == limit) { + if (ports == limit) { return true; } } } } + } catch (e) {} try { if (nmsData.smanagement.switches[sw].mgmt_v4_addr.match(id)) { return true; |