From e304a758dee664e7449c6ba490584549639891c4 Mon Sep 17 00:00:00 2001 From: "Ole Mathias Aa. Heggem" Date: Wed, 10 Apr 2019 17:39:15 +0100 Subject: Make public gondul not ask for auth --- web/js/nms-info-box.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'web/js/nms-info-box.js') diff --git a/web/js/nms-info-box.js b/web/js/nms-info-box.js index 8990bdb..05ec415 100644 --- a/web/js/nms-info-box.js +++ b/web/js/nms-info-box.js @@ -40,7 +40,8 @@ var nmsInfoBox = nmsInfoBox || { 'views': { 'initial': { 'name': 'Summary', - 'panels': ['switchLatency','switchSummary','switchComments'] + 'panels': ['switchLatency','switchSummary','switchComments'], + 'public': true }, 'ports': { 'name': 'Ports', @@ -333,6 +334,8 @@ var windowHandler = function () { for(var view in this._window.views) { var viewObj = this._window.views[view]; var active = ''; + if (viewObj.public == null || viewObj.public == false) + active = ' class="gondul-is-private" ' if(this._view == view) active = ' class="active" '; output += '' + viewObj.name + ' '; @@ -858,8 +861,10 @@ var switchLatencyPanel = function() { nmsInfoPanel.call(this,"switchLatency"); var latencyChart; this.init = function() { - this.addHandler("ticker"); - this.refresh(); + if(nms._public == false) { + this.addHandler("ticker"); + this.refresh(); + } }; this.refresh = function(reason) { if (this.sw == false) { -- cgit v1.2.3