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/index.html | 1 + web/nms.gathering.org/js/nms-info-box.js | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/nms.gathering.org/index.html b/web/nms.gathering.org/index.html index af7776d..c33f581 100644 --- a/web/nms.gathering.org/index.html +++ b/web/nms.gathering.org/index.html @@ -131,6 +131,7 @@
  • Distro names
  • System description
  • +
  • Serial Numbers
  • Keyboard Shortcuts
  • 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