aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorOle Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com>2019-04-10 17:39:15 +0100
committerroot <root@gondul.tg19.gathering.org>2019-04-10 17:40:06 +0100
commite304a758dee664e7449c6ba490584549639891c4 (patch)
tree43d93ae680be95b210d6b5c5f3d1abcafc74cd2d /web/js
parent54a410289c8d6951c7e1bb730106620c90d39cca (diff)
Make public gondul not ask for auth
Diffstat (limited to 'web/js')
-rw-r--r--web/js/nms-info-box.js11
-rw-r--r--web/js/nms.js3
2 files changed, 10 insertions, 4 deletions
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 += '<li' + active + '><a class="' + view + '" aria-label="' + viewObj.name + '" onclick="nmsInfoBox._windowHandler.showView(\'' + view + '\');">' + viewObj.name + '</a></li> ';
@@ -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) {
diff --git a/web/js/nms.js b/web/js/nms.js
index 8213537..418b948 100644
--- a/web/js/nms.js
+++ b/web/js/nms.js
@@ -450,7 +450,8 @@ function setMenu()
function setOplog()
{
- nms.oplog.mini.show(nms.oplogShowing)
+ if(nms._public == false)
+ nms.oplog.mini.show(nms.oplogShowing)
}
function toggleMenu()