aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/js/nms-map-handlers.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-22 13:04:37 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-22 13:04:37 +0100
commita8f122dfef27846895805df4db0fd1efb2f715ee (patch)
treec55add30097e26d38fcf0f2d56c4667c5be578d1 /web/nms.gathering.org/js/nms-map-handlers.js
parentef480bf237b88e667ff525a1dfb881cb8bd7cf0a (diff)
parent490560f31c20dd8191ee1a0f8f6e90b2820d7c77 (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'web/nms.gathering.org/js/nms-map-handlers.js')
-rw-r--r--web/nms.gathering.org/js/nms-map-handlers.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/web/nms.gathering.org/js/nms-map-handlers.js b/web/nms.gathering.org/js/nms-map-handlers.js
index d3becde..04aabd2 100644
--- a/web/nms.gathering.org/js/nms-map-handlers.js
+++ b/web/nms.gathering.org/js/nms-map-handlers.js
@@ -84,7 +84,7 @@ function uplinkUpdater()
return;
if (!nmsData.switchstate.switches)
return;
- for (sw in nmsData.switches.switches) {
+ for (var sw in nmsData.switches.switches) {
var uplinks=0;
if (nmsData.switchstate.switches[sw] == undefined || nmsData.switchstate.switches[sw].uplinks == undefined) {
uplinks=0;
@@ -139,9 +139,9 @@ function trafficUpdater()
{
if (!nms.switches_now["switches"])
return;
- for (sw in nms.switches_now["switches"]) {
+ for (var sw in nms.switches_now["switches"]) {
var speed = 0;
- for (port in nms.switches_now["switches"][sw]["ports"]) {
+ for (var port in nms.switches_now["switches"][sw]["ports"]) {
if (/ge-0\/0\/44$/.exec(port) ||
/ge-0\/0\/45$/.exec(port) ||
/ge-0\/0\/46$/.exec(port) ||
@@ -177,9 +177,9 @@ function trafficTotUpdater()
{
if (!nms.switches_now["switches"])
return;
- for (sw in nms.switches_now["switches"]) {
+ for (var sw in nms.switches_now["switches"]) {
var speed = 0;
- for (port in nms.switches_now["switches"][sw]["ports"]) {
+ for (var port in nms.switches_now["switches"][sw]["ports"]) {
if (!nms.switches_then["switches"][sw] ||
!nms.switches_then["switches"][sw]["ports"] ||
!nms.switches_then["switches"][sw]["ports"][port])
@@ -220,14 +220,14 @@ function tempUpdater()
if(!nmsData.switches)
return;
- for (sw in nmsData.switches["switches"]) {
+ for ( var sw in nmsData.switches["switches"]) {
var t = "white";
var temp = "";
if(!nmsData.snmp || !nmsData.snmp.snmp || ! nmsData.snmp.snmp[sw] || !nmsData.snmp.snmp[sw]["misc"] || !nmsData.snmp.snmp[sw]["misc"]["enterprises.2636.3.1.13.1.7.7.1.0.0"])
continue;
- tempObj = nmsData.snmp.snmp[sw]["misc"]["enterprises.2636.3.1.13.1.7.7.1.0.0"];
+ var tempObj = nmsData.snmp.snmp[sw]["misc"]["enterprises.2636.3.1.13.1.7.7.1.0.0"];
Object.keys(tempObj).forEach(function (key) {
if(key == "") {
temp = tempObj[key] + "°C";
@@ -259,6 +259,7 @@ function pingUpdater()
}
for (var sw in nmsData.switches.switches) {
try {
+ var c;
if (nmsData.ping.switches[sw].age > 0) {
c = red;
} else {