diff options
author | Kristian Lyngstol <kly@kly@.no> | 2016-03-23 05:36:16 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly@.no> | 2016-03-23 05:36:16 +0100 |
commit | 65c8e3fca802155828626898ede0d08beccfe579 (patch) | |
tree | 0d9a7fd9d4fc02219b9d295ce636ee3cd107fad4 /web/nms.gathering.org/js/nms-info-box.js | |
parent | 750c5c7224c0b6698780a2498ce7c0cffd65af3e (diff) | |
parent | 19cc542fc388edf953211c0c19bb2ed7b8da536f (diff) |
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'web/nms.gathering.org/js/nms-info-box.js')
-rw-r--r-- | web/nms.gathering.org/js/nms-info-box.js | 7 |
1 files changed, 6 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 0b90d49..304a8d9 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -209,7 +209,7 @@ nmsInfoBox._windowTypes.switchInfo = { } }, getTitle: function() { - return '<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> ' + this.sw + ''; + 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>'; }, getContent: function() { return this.content; @@ -344,6 +344,10 @@ nmsInfoBox._windowTypes.switchInfo = { dataType: "text", data:myData, success: function (data, textStatus, jqXHR) { + var result = JSON.parse(data); + if(result.switches_updated.length > 0) { // FIXME unresolved variable switches_addded + nmsInfoBox.hide(); + } nmsData.invalidate("switches"); nmsData.invalidate("smanagement"); } @@ -383,6 +387,7 @@ nmsInfoBox._makeTable = function(content, caption) { } for (var v in content) { tr = table.insertRow(-1); + tr.className = content[v][0].toLowerCase(); td1 = tr.insertCell(0); td2 = tr.insertCell(1); td1.innerHTML = content[v][0]; |