mirror of https://github.com/Aidaho12/haproxy-wi
parent
dcd72a2719
commit
aa552c91be
|
@ -97,7 +97,7 @@
|
||||||
<li class="p_menu">
|
<li class="p_menu">
|
||||||
<a title="Simple monitoring network ports" class="stats">SMON</a>
|
<a title="Simple monitoring network ports" class="stats">SMON</a>
|
||||||
<ul class="v_menu">
|
<ul class="v_menu">
|
||||||
<li><a href="/app/smon.py?action=view" title="SMON dashboard" class="overview-link head-submenu">Dashboard</a></li>
|
<li><a href="/app/smon.py?action=view" title="SMON Dashboard" class="overview-link head-submenu">Dashboard</a></li>
|
||||||
{% if role <= 2 %}
|
{% if role <= 2 %}
|
||||||
<li><a href="/app/smon.py?action=add" title="SMON admin panel" class="edit head-submenu">Admin panel</a></li>
|
<li><a href="/app/smon.py?action=add" title="SMON admin panel" class="edit head-submenu">Admin panel</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
showMetrics();
|
showMetrics();
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id="div-server-{{s.0}}" class="div-server-hapwi" >
|
<div id="div-server-{{s.0}}" class="div-server-hapwi" {% if not serv %}style="cursor: move;"{%endif%}>
|
||||||
<div class="server-name">
|
<div class="server-name">
|
||||||
<input type="hidden" id="server-name-{{s.0}}" value="{{s.1}}" />
|
<input type="hidden" id="server-name-{{s.0}}" value="{{s.1}}" />
|
||||||
<input type="hidden" id="service" value="{{service}}" />
|
<input type="hidden" id="service" value="{{service}}" />
|
||||||
|
|
130
inc/nprogress.js
130
inc/nprogress.js
|
@ -1,6 +1,8 @@
|
||||||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||||
* @license MIT */
|
* @license MIT */
|
||||||
|
|
||||||
;(function(root, factory) {
|
;(function(root, factory) {
|
||||||
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
define(factory);
|
define(factory);
|
||||||
} else if (typeof exports === 'object') {
|
} else if (typeof exports === 'object') {
|
||||||
|
@ -8,9 +10,12 @@
|
||||||
} else {
|
} else {
|
||||||
root.NProgress = factory();
|
root.NProgress = factory();
|
||||||
}
|
}
|
||||||
|
|
||||||
})(this, function() {
|
})(this, function() {
|
||||||
var NProgress = {};
|
var NProgress = {};
|
||||||
|
|
||||||
NProgress.version = '0.2.0';
|
NProgress.version = '0.2.0';
|
||||||
|
|
||||||
var Settings = NProgress.settings = {
|
var Settings = NProgress.settings = {
|
||||||
minimum: 0.08,
|
minimum: 0.08,
|
||||||
easing: 'linear',
|
easing: 'linear',
|
||||||
|
@ -24,6 +29,7 @@
|
||||||
parent: 'body',
|
parent: 'body',
|
||||||
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
|
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.configure = function(options) {
|
NProgress.configure = function(options) {
|
||||||
var key, value;
|
var key, value;
|
||||||
for (key in options) {
|
for (key in options) {
|
||||||
|
@ -33,7 +39,9 @@
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.status = null;
|
NProgress.status = null;
|
||||||
|
|
||||||
NProgress.set = function(n) {
|
NProgress.set = function(n) {
|
||||||
var started = NProgress.isStarted();
|
var started = NProgress.isStarted();
|
||||||
|
|
||||||
|
@ -44,16 +52,24 @@
|
||||||
bar = progress.querySelector(Settings.barSelector),
|
bar = progress.querySelector(Settings.barSelector),
|
||||||
speed = Settings.speed,
|
speed = Settings.speed,
|
||||||
ease = Settings.easing;
|
ease = Settings.easing;
|
||||||
progress.offsetWidth;
|
|
||||||
|
progress.offsetWidth; /* Repaint */
|
||||||
|
|
||||||
queue(function(next) {
|
queue(function(next) {
|
||||||
|
// Set positionUsing if it hasn't already been set
|
||||||
if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
|
if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
|
||||||
|
|
||||||
|
// Add transition
|
||||||
css(bar, barPositionCSS(n, speed, ease));
|
css(bar, barPositionCSS(n, speed, ease));
|
||||||
|
|
||||||
if (n === 1) {
|
if (n === 1) {
|
||||||
|
// Fade out
|
||||||
css(progress, {
|
css(progress, {
|
||||||
transition: 'none',
|
transition: 'none',
|
||||||
opacity: 1
|
opacity: 1
|
||||||
});
|
});
|
||||||
progress.offsetWidth;
|
progress.offsetWidth; /* Repaint */
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
css(progress, {
|
css(progress, {
|
||||||
transition: 'all ' + speed + 'ms linear',
|
transition: 'all ' + speed + 'ms linear',
|
||||||
|
@ -68,13 +84,17 @@
|
||||||
setTimeout(next, speed);
|
setTimeout(next, speed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.isStarted = function() {
|
NProgress.isStarted = function() {
|
||||||
return typeof NProgress.status === 'number';
|
return typeof NProgress.status === 'number';
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.start = function() {
|
NProgress.start = function() {
|
||||||
if (!NProgress.status) NProgress.set(0);
|
if (!NProgress.status) NProgress.set(0);
|
||||||
|
|
||||||
var work = function() {
|
var work = function() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (!NProgress.status) return;
|
if (!NProgress.status) return;
|
||||||
|
@ -82,15 +102,21 @@
|
||||||
work();
|
work();
|
||||||
}, Settings.trickleSpeed);
|
}, Settings.trickleSpeed);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Settings.trickle) work();
|
if (Settings.trickle) work();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.done = function(force) {
|
NProgress.done = function(force) {
|
||||||
if (!force && !NProgress.status) return this;
|
if (!force && !NProgress.status) return this;
|
||||||
|
|
||||||
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
|
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.inc = function(amount) {
|
NProgress.inc = function(amount) {
|
||||||
var n = NProgress.status;
|
var n = NProgress.status;
|
||||||
|
|
||||||
if (!n) {
|
if (!n) {
|
||||||
return NProgress.start();
|
return NProgress.start();
|
||||||
} else if(n > 1) {
|
} else if(n > 1) {
|
||||||
|
@ -103,94 +129,141 @@
|
||||||
else if (n >= 0.8 && n < 0.99) { amount = 0.005; }
|
else if (n >= 0.8 && n < 0.99) { amount = 0.005; }
|
||||||
else { amount = 0; }
|
else { amount = 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
n = clamp(n + amount, 0, 0.994);
|
n = clamp(n + amount, 0, 0.994);
|
||||||
return NProgress.set(n);
|
return NProgress.set(n);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.trickle = function() {
|
NProgress.trickle = function() {
|
||||||
return NProgress.inc();
|
return NProgress.inc();
|
||||||
};
|
};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var initial = 0, current = 0;
|
var initial = 0, current = 0;
|
||||||
|
|
||||||
NProgress.promise = function($promise) {
|
NProgress.promise = function($promise) {
|
||||||
if (!$promise || $promise.state() === "resolved") {
|
if (!$promise || $promise.state() === "resolved") {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current === 0) {
|
if (current === 0) {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
initial++;
|
initial++;
|
||||||
current++;
|
current++;
|
||||||
|
|
||||||
$promise.always(function() {
|
$promise.always(function() {
|
||||||
current--;
|
current--;
|
||||||
if (current === 0) {
|
if (current === 0) {
|
||||||
initial = 0;
|
initial = 0;
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
} else {
|
} else {
|
||||||
NProgress.set((initial - current) / initial);
|
NProgress.set((initial - current) / initial);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
NProgress.render = function(fromStart) {
|
NProgress.render = function(fromStart) {
|
||||||
if (NProgress.isRendered()) return document.getElementById('nprogress');
|
if (NProgress.isRendered()) return document.getElementById('nprogress');
|
||||||
|
|
||||||
addClass(document.documentElement, 'nprogress-busy');
|
addClass(document.documentElement, 'nprogress-busy');
|
||||||
|
|
||||||
var progress = document.createElement('div');
|
var progress = document.createElement('div');
|
||||||
progress.id = 'nprogress';
|
progress.id = 'nprogress';
|
||||||
progress.innerHTML = Settings.template;
|
progress.innerHTML = Settings.template;
|
||||||
var bar = progress.querySelector(Settings.barSelector),
|
|
||||||
perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
|
var bar = progress.querySelector(Settings.barSelector),
|
||||||
parent = document.querySelector(Settings.parent),
|
perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
|
||||||
spinner;
|
parent = isDOM(Settings.parent)
|
||||||
|
? Settings.parent
|
||||||
|
: document.querySelector(Settings.parent),
|
||||||
|
spinner
|
||||||
|
|
||||||
css(bar, {
|
css(bar, {
|
||||||
transition: 'all 0 linear',
|
transition: 'all 0 linear',
|
||||||
transform: 'translate3d(' + perc + '%,0,0)'
|
transform: 'translate3d(' + perc + '%,0,0)'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!Settings.showSpinner) {
|
if (!Settings.showSpinner) {
|
||||||
spinner = progress.querySelector(Settings.spinnerSelector);
|
spinner = progress.querySelector(Settings.spinnerSelector);
|
||||||
spinner && removeElement(spinner);
|
spinner && removeElement(spinner);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent != document.body) {
|
if (parent != document.body) {
|
||||||
addClass(parent, 'nprogress-custom-parent');
|
addClass(parent, 'nprogress-custom-parent');
|
||||||
}
|
}
|
||||||
|
|
||||||
parent.appendChild(progress);
|
parent.appendChild(progress);
|
||||||
return progress;
|
return progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.remove = function() {
|
NProgress.remove = function() {
|
||||||
removeClass(document.documentElement, 'nprogress-busy');
|
removeClass(document.documentElement, 'nprogress-busy');
|
||||||
removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
|
var parent = isDOM(Settings.parent)
|
||||||
|
? Settings.parent
|
||||||
|
: document.querySelector(Settings.parent)
|
||||||
|
removeClass(parent, 'nprogress-custom-parent')
|
||||||
var progress = document.getElementById('nprogress');
|
var progress = document.getElementById('nprogress');
|
||||||
progress && removeElement(progress);
|
progress && removeElement(progress);
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.isRendered = function() {
|
NProgress.isRendered = function() {
|
||||||
return !!document.getElementById('nprogress');
|
return !!document.getElementById('nprogress');
|
||||||
};
|
};
|
||||||
|
|
||||||
NProgress.getPositioningCSS = function() {
|
NProgress.getPositioningCSS = function() {
|
||||||
|
// Sniff on document.body.style
|
||||||
var bodyStyle = document.body.style;
|
var bodyStyle = document.body.style;
|
||||||
|
|
||||||
|
// Sniff prefixes
|
||||||
var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
|
var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
|
||||||
('MozTransform' in bodyStyle) ? 'Moz' :
|
('MozTransform' in bodyStyle) ? 'Moz' :
|
||||||
('msTransform' in bodyStyle) ? 'ms' :
|
('msTransform' in bodyStyle) ? 'ms' :
|
||||||
('OTransform' in bodyStyle) ? 'O' : '';
|
('OTransform' in bodyStyle) ? 'O' : '';
|
||||||
|
|
||||||
if (vendorPrefix + 'Perspective' in bodyStyle) {
|
if (vendorPrefix + 'Perspective' in bodyStyle) {
|
||||||
|
// Modern browsers with 3D support, e.g. Webkit, IE10
|
||||||
return 'translate3d';
|
return 'translate3d';
|
||||||
} else if (vendorPrefix + 'Transform' in bodyStyle) {
|
} else if (vendorPrefix + 'Transform' in bodyStyle) {
|
||||||
|
// Browsers without 3D support, e.g. IE9
|
||||||
return 'translate';
|
return 'translate';
|
||||||
} else {
|
} else {
|
||||||
|
// Browsers without translate() support, e.g. IE7-8
|
||||||
return 'margin';
|
return 'margin';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isDOM (obj) {
|
||||||
|
if (typeof HTMLElement === 'object') {
|
||||||
|
return obj instanceof HTMLElement
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
obj &&
|
||||||
|
typeof obj === 'object' &&
|
||||||
|
obj.nodeType === 1 &&
|
||||||
|
typeof obj.nodeName === 'string'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function clamp(n, min, max) {
|
function clamp(n, min, max) {
|
||||||
if (n < min) return min;
|
if (n < min) return min;
|
||||||
if (n > max) return max;
|
if (n > max) return max;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toBarPerc(n) {
|
function toBarPerc(n) {
|
||||||
return (-1 + n) * 100;
|
return (-1 + n) * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
function barPositionCSS(n, speed, ease) {
|
function barPositionCSS(n, speed, ease) {
|
||||||
var barCSS;
|
var barCSS;
|
||||||
|
|
||||||
if (Settings.positionUsing === 'translate3d') {
|
if (Settings.positionUsing === 'translate3d') {
|
||||||
barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
|
barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
|
||||||
} else if (Settings.positionUsing === 'translate') {
|
} else if (Settings.positionUsing === 'translate') {
|
||||||
|
@ -198,9 +271,12 @@
|
||||||
} else {
|
} else {
|
||||||
barCSS = { 'margin-left': toBarPerc(n)+'%' };
|
barCSS = { 'margin-left': toBarPerc(n)+'%' };
|
||||||
}
|
}
|
||||||
|
|
||||||
barCSS.transition = 'all '+speed+'ms '+ease;
|
barCSS.transition = 'all '+speed+'ms '+ease;
|
||||||
|
|
||||||
return barCSS;
|
return barCSS;
|
||||||
}
|
}
|
||||||
|
|
||||||
var queue = (function() {
|
var queue = (function() {
|
||||||
var pending = [];
|
var pending = [];
|
||||||
|
|
||||||
|
@ -210,22 +286,27 @@
|
||||||
fn(next);
|
fn(next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(fn) {
|
return function(fn) {
|
||||||
pending.push(fn);
|
pending.push(fn);
|
||||||
if (pending.length == 1) next();
|
if (pending.length == 1) next();
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
var css = (function() {
|
var css = (function() {
|
||||||
var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
|
var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
|
||||||
cssProps = {};
|
cssProps = {};
|
||||||
|
|
||||||
function camelCase(string) {
|
function camelCase(string) {
|
||||||
return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
|
return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
|
||||||
return letter.toUpperCase();
|
return letter.toUpperCase();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getVendorProp(name) {
|
|
||||||
|
function getVendorProp(name) {
|
||||||
var style = document.body.style;
|
var style = document.body.style;
|
||||||
if (name in style) return name;
|
if (name in style) return name;
|
||||||
|
|
||||||
var i = cssPrefixes.length,
|
var i = cssPrefixes.length,
|
||||||
capName = name.charAt(0).toUpperCase() + name.slice(1),
|
capName = name.charAt(0).toUpperCase() + name.slice(1),
|
||||||
vendorName;
|
vendorName;
|
||||||
|
@ -233,20 +314,25 @@
|
||||||
vendorName = cssPrefixes[i] + capName;
|
vendorName = cssPrefixes[i] + capName;
|
||||||
if (vendorName in style) return vendorName;
|
if (vendorName in style) return vendorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStyleProp(name) {
|
function getStyleProp(name) {
|
||||||
name = camelCase(name);
|
name = camelCase(name);
|
||||||
return cssProps[name] || (cssProps[name] = getVendorProp(name));
|
return cssProps[name] || (cssProps[name] = getVendorProp(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyCss(element, prop, value) {
|
function applyCss(element, prop, value) {
|
||||||
prop = getStyleProp(prop);
|
prop = getStyleProp(prop);
|
||||||
element.style[prop] = value;
|
element.style[prop] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(element, properties) {
|
return function(element, properties) {
|
||||||
var args = arguments,
|
var args = arguments,
|
||||||
prop,
|
prop,
|
||||||
value;
|
value;
|
||||||
|
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
for (prop in properties) {
|
for (prop in properties) {
|
||||||
value = properties[prop];
|
value = properties[prop];
|
||||||
|
@ -257,28 +343,42 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
function hasClass(element, name) {
|
function hasClass(element, name) {
|
||||||
var list = typeof element == 'string' ? element : classList(element);
|
var list = typeof element == 'string' ? element : classList(element);
|
||||||
return list.indexOf(' ' + name + ' ') >= 0;
|
return list.indexOf(' ' + name + ' ') >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addClass(element, name) {
|
function addClass(element, name) {
|
||||||
var oldList = classList(element),
|
var oldList = classList(element),
|
||||||
newList = oldList + name;
|
newList = oldList + name;
|
||||||
|
|
||||||
if (hasClass(oldList, name)) return;
|
if (hasClass(oldList, name)) return;
|
||||||
|
|
||||||
|
// Trim the opening space.
|
||||||
element.className = newList.substring(1);
|
element.className = newList.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeClass(element, name) {
|
function removeClass(element, name) {
|
||||||
var oldList = classList(element),
|
var oldList = classList(element),
|
||||||
newList;
|
newList;
|
||||||
|
|
||||||
if (!hasClass(element, name)) return;
|
if (!hasClass(element, name)) return;
|
||||||
|
|
||||||
|
// Replace the class name.
|
||||||
newList = oldList.replace(' ' + name + ' ', ' ');
|
newList = oldList.replace(' ' + name + ' ', ' ');
|
||||||
|
|
||||||
|
// Trim the opening and closing spaces.
|
||||||
element.className = newList.substring(1, newList.length - 1);
|
element.className = newList.substring(1, newList.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function classList(element) {
|
function classList(element) {
|
||||||
return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' ');
|
return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeElement(element) {
|
function removeElement(element) {
|
||||||
element && element.parentNode && element.parentNode.removeChild(element);
|
element && element.parentNode && element.parentNode.removeChild(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NProgress;
|
return NProgress;
|
||||||
});
|
});
|
|
@ -136,9 +136,11 @@ window.onblur= function() {
|
||||||
showOverview();
|
showOverview();
|
||||||
} else if (cur_url[0] == "viewlogs.py") {
|
} else if (cur_url[0] == "viewlogs.py") {
|
||||||
viewLogs();
|
viewLogs();
|
||||||
} else if (cur_url[0] == "metrics.py") {
|
} else if (cur_url[0] == "metrics.py") {
|
||||||
showMetrics();
|
showMetrics();
|
||||||
}
|
} else if (cur_url[0] == "smon.py" && cur_url[1].split('&')[0] == "action=view") {
|
||||||
|
showSmon('refresh')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -220,7 +222,7 @@ function setRefreshInterval(interval) {
|
||||||
autoRefreshStyle(interval);
|
autoRefreshStyle(interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function startSetInterval(interval) {
|
function startSetInterval(interval) {
|
||||||
if(Cookies.get('auto-refresh-pause') == "0") {
|
if(Cookies.get('auto-refresh-pause') == "0") {
|
||||||
if (cur_url[0] == "logs.py") {
|
if (cur_url[0] == "logs.py") {
|
||||||
intervalId = setInterval('showLog()', interval);
|
intervalId = setInterval('showLog()', interval);
|
||||||
|
@ -256,7 +258,10 @@ function startSetInterval(interval) {
|
||||||
}
|
}
|
||||||
intervalId = setInterval('showMetrics()', interval);
|
intervalId = setInterval('showMetrics()', interval);
|
||||||
showMetrics();
|
showMetrics();
|
||||||
}
|
} else if (cur_url[0] == "smon.py" && cur_url[1].split('&')[0] == "action=view") {
|
||||||
|
intervalId = setInterval("showSmon('refresh')", interval);
|
||||||
|
showSmon('refresh');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pauseAutoRefresh();
|
pauseAutoRefresh();
|
||||||
}
|
}
|
||||||
|
@ -283,11 +288,9 @@ function hideAutoRefreshDiv() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$( document ).ajaxSend(function( event, request, settings ) {
|
$( document ).ajaxSend(function( event, request, settings ) {
|
||||||
$('#cover').fadeIn('fast');
|
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
});
|
});
|
||||||
$( document ).ajaxComplete(function( event, request, settings ) {
|
$( document ).ajaxComplete(function( event, request, settings ) {
|
||||||
$('#cover').fadeOut('fast');
|
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
function showStats() {
|
function showStats() {
|
||||||
|
@ -1093,12 +1096,12 @@ function sort_by_status() {
|
||||||
}
|
}
|
||||||
function showSmon(action) {
|
function showSmon(action) {
|
||||||
var sort = '';
|
var sort = '';
|
||||||
|
var location = window.location.href;
|
||||||
|
var cur_url = '/app/' + location.split('/').pop();
|
||||||
|
cur_url = cur_url.split('?');
|
||||||
|
cur_url[1] = cur_url[1].split('#')[0];
|
||||||
if (action == 'refresh') {
|
if (action == 'refresh') {
|
||||||
try {
|
try {
|
||||||
var location = window.location.href;
|
|
||||||
var cur_url = '/app/' + location.split('/').pop();
|
|
||||||
cur_url = cur_url.split('?');
|
|
||||||
cur_url[1] = cur_url[1].split('#')[0];
|
|
||||||
sort = cur_url[1].split('&')[1];
|
sort = cur_url[1].split('&')[1];
|
||||||
sort = sort.split('=')[1];
|
sort = sort.split('=')[1];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -1146,4 +1149,4 @@ function checkLength( o, n, min ) {
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,6 @@ pre {
|
||||||
color: #5d9ceb;
|
color: #5d9ceb;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
|
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
.footer-copyright {
|
.footer-copyright {
|
||||||
|
@ -165,16 +164,6 @@ pre {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
#cover {
|
|
||||||
position: absolute;
|
|
||||||
display: none;
|
|
||||||
top:0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 110%;
|
|
||||||
background: rgba(0,0,0,.1);
|
|
||||||
z-index: 500;
|
|
||||||
}
|
|
||||||
.login {
|
.login {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
|
|
Loading…
Reference in New Issue