diff options
| -rw-r--r-- | web/nms.gathering.org/js/nms-map-handlers.js | 14 | 
1 files changed, 6 insertions, 8 deletions
diff --git a/web/nms.gathering.org/js/nms-map-handlers.js b/web/nms.gathering.org/js/nms-map-handlers.js index 6de2943..7c13421 100644 --- a/web/nms.gathering.org/js/nms-map-handlers.js +++ b/web/nms.gathering.org/js/nms-map-handlers.js @@ -236,16 +236,14 @@ function tempUpdater()  		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"]) +		if(!nmsData.switchstate || !nmsData.switchstate.switches || !nmsData.switchstate.switches[sw] || !nmsData.switchstate.switches[sw].temp)  			continue; -		var tempObj = nmsData.snmp.snmp[sw]["misc"]["enterprises.2636.3.1.13.1.7.7.1.0.0"]; -		if(tempObj[""]) { -			temp = tempObj[""] + "°C"; -			t = temp_color(temp); -			nmsMap.setSwitchColor(sw, t); -			nmsMap.setSwitchInfo(sw, temp); -		} +		var t = nmsData.switchstate.switches[sw].temp; +		temp = t + "°C"; +		t = temp_color(temp); +		nmsMap.setSwitchColor(sw, t); +		nmsMap.setSwitchInfo(sw, temp);  	}  }  | 
