diff options
author | Kristian Lyngstol <kly@kly@.no> | 2016-03-27 11:56:10 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly@.no> | 2016-03-27 11:56:10 +0200 |
commit | f63535d994abc0db7e76869c463910c796055ab6 (patch) | |
tree | 3d683e7853b1fda8148d774657456bb62fec3de4 | |
parent | 4b69030c295365df8ffd448288bfdb1ece991227 (diff) |
NMS: Add serial no. view to inventory
-rw-r--r-- | web/nms.gathering.org/index.html | 1 | ||||
-rw-r--r-- | web/nms.gathering.org/js/nms-info-box.js | 10 |
2 files changed, 10 insertions, 1 deletions
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 @@ <li class="dropdown-header">Inventory lists</li> <li><a href="#" onclick="nmsInfoBox.showWindow('inventoryListing','distro_name');">Distro names</a></li> <li><a href="#" onclick="nmsInfoBox.showWindow('inventoryListing','sysDescr')">System description</a></li> + <li><a href="#" onclick="nmsInfoBox.showWindow('inventoryListing','jnxBoxSerialNo')">Serial Numbers</a></li> <li class="divider"> </li> <li class="dropdown-header">Help</li> <li><a href="#" onclick="toggleLayer('aboutKeybindings');" >Keyboard Shortcuts</a></li> 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 '<h4>Inventory listing</h4><button type="button" class="distro-name btn btn-xs btn-default" onclick="nmsInfoBox.showWindow(\'inventoryListing\',\'distro_name\');">Distro name</button> <button type="button" class="distro-name btn btn-xs btn-default" onclick="nmsInfoBox.showWindow(\'inventoryListing\',\'sysDescr\');">System Description</button>'; + return '<h4>Inventory listing</h4><button type="button" class="distro-name btn btn-xs btn-default" onclick="nmsInfoBox.showWindow(\'inventoryListing\',\'distro_name\');">Distro name</button> <button type="button" class="distro-name btn btn-xs btn-default" onclick="nmsInfoBox.showWindow(\'inventoryListing\',\'sysDescr\');">System Description</button><button type="button" class="distro-name btn btn-xs btn-default" onclick="nmsInfoBox.showWindow(\'inventoryListing\',\'jnxBoxSerialNo\');">Serial Numbers</button>'; }, 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); |