From f63535d994abc0db7e76869c463910c796055ab6 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sun, 27 Mar 2016 11:56:10 +0200 Subject: NMS: Add serial no. view to inventory --- web/nms.gathering.org/js/nms-info-box.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/js') diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index 01bac94..1742ac2 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -546,7 +546,7 @@ nmsInfoBox._windowTypes.inventoryListing = { activeView: '', activeFilter: '', getTitle: function() { - return '

Inventory listing

'; + return '

Inventory listing

'; }, getContent: function() { return this.content; @@ -592,6 +592,11 @@ nmsInfoBox._windowTypes.inventoryListing = { listTitle = 'System description'; needSnmp = true; break; + case 'jnxBoxSerialNo': + if(hasSnmp) + listTitle = 'Serial Numbers'; + needSnmp = true; + break; default: listTitle = 'Distro names'; list = 'distro_name'; @@ -619,6 +624,9 @@ nmsInfoBox._windowTypes.inventoryListing = { case 'sysDescr': value = nmsData.snmp.snmp[sw]["misc"]["sysDescr"][0]; break; + case 'jnxBoxSerialNo': + value = nmsData.snmp.snmp[sw]["misc"]["jnxBoxSerialNo"][0]; + break; } } catch (e) { //console.log(e); -- cgit v1.2.3 From 51e9872f4ac5db633c12862dec951e0b91b1b132 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Thu, 31 Mar 2016 20:44:38 +0200 Subject: NMS: Fix historic review, part one The actual replay might still be bugged, but fixed-point review works. --- web/nms.gathering.org/js/nms-map-handlers.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web/nms.gathering.org/js') diff --git a/web/nms.gathering.org/js/nms-map-handlers.js b/web/nms.gathering.org/js/nms-map-handlers.js index 474e8ef..a7672a3 100644 --- a/web/nms.gathering.org/js/nms-map-handlers.js +++ b/web/nms.gathering.org/js/nms-map-handlers.js @@ -373,14 +373,13 @@ function getDhcpColor(stop) function dhcpUpdater() { - var realnow = Date.now(); - var now = Math.floor(realnow / 1000); if (nmsData.dhcp == undefined || nmsData.dhcp.dhcp == undefined) { return } if (nmsData.switches == undefined || nmsData.switches.switches == undefined) { return; } + var now = nmsData.dhcp.time; try { for (var sw in nmsData.switches.switches) { var c = blue; -- cgit v1.2.3