aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-23 23:43:53 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-23 23:43:53 +0100
commitfddc3b396c3d3efe865cd4ad2d501e61682241c4 (patch)
treee149e8b1ee473aa160ee518fcc308b12de7e35cb
parentb3639ce3dc97f4ec317ef0d5ef36a7401a1332c8 (diff)
parenta3e395b281406b233a7dc949cefb8878971d8b7d (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
-rw-r--r--web/nms.gathering.org/js/nms-info-box.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js
index 0481420..838ebb8 100644
--- a/web/nms.gathering.org/js/nms-info-box.js
+++ b/web/nms.gathering.org/js/nms-info-box.js
@@ -209,7 +209,16 @@ nmsInfoBox._windowTypes.switchInfo = {
}
},
getTitle: function() {
- return '<h4>' + this.sw + '</h4><button type="button" class="edit btn btn-xs btn-warning" onclick="nmsInfoBox._windowTypes.switchInfo.showEdit(\'' + this.sw + '\');">Edit</button> <button type="button" class="comments btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showComments(\'' + this.sw + '\');">Comments</button> <button type="button" class="edit btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showSNMP(\'ports\');">Ports</button> <button type="button" class="edit btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showSNMP(\'misc\');">Misc</button>';
+ var sshButton = '';
+ try {
+ sshButton = nmsInfoBox._window.swm.mgmt_v4_addr;
+ } catch(e) {
+ console.log(e);
+ }
+ if(sshButton != null && sshButton != undefined && sshButton != '') {
+ sshButton = ' <button type="button" class="ssh btn btn-xs btn-default"><a href="ssh://' + sshButton + '">SSH</a></button>';
+ }
+ return '<h4>' + this.sw + '</h4><button type="button" class="edit btn btn-xs btn-warning" onclick="nmsInfoBox._windowTypes.switchInfo.showEdit(\'' + this.sw + '\');">Edit</button> <button type="button" class="comments btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showComments(\'' + this.sw + '\');">Comments</button> <button type="button" class="edit btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showSNMP(\'ports\');">Ports</button> <button type="button" class="edit btn btn-xs btn-default" onclick="nmsInfoBox._windowTypes.switchInfo.showSNMP(\'misc\');">Misc</button>' + sshButton;
},
getContent: function() {
return this.content;