From a3e395b281406b233a7dc949cefb8878971d8b7d Mon Sep 17 00:00:00 2001 From: Nicolai Tellefsen Date: Wed, 23 Mar 2016 23:41:36 +0100 Subject: NMS: Add SSH-button to switchInfo window --- web/nms.gathering.org/js/nms-info-box.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/js/nms-info-box.js') 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 '

' + this.sw + '

'; + var sshButton = ''; + try { + sshButton = nmsInfoBox._window.swm.mgmt_v4_addr; + } catch(e) { + console.log(e); + } + if(sshButton != null && sshButton != undefined && sshButton != '') { + sshButton = ' '; + } + return '

' + this.sw + '

' + sshButton; }, getContent: function() { return this.content; -- cgit v1.2.3