aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/js/nms-info-box.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-26 03:48:12 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-26 03:48:12 +0100
commit004f4efcfd0779f4307b90fed139dc87d01ad0b9 (patch)
treef63bef356ae23f63e81e79d54c2cc911c4937004 /web/nms.gathering.org/js/nms-info-box.js
parent25409cdc01450279ce56b78ce962956a9990a175 (diff)
NMS: Various performance tweaks
Diffstat (limited to 'web/nms.gathering.org/js/nms-info-box.js')
-rw-r--r--web/nms.gathering.org/js/nms-info-box.js10
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;