mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-13 07:50:41 -04:00
Fixed #42
This commit is contained in:
parent
47db1632a3
commit
3b5e89708f
@ -49,6 +49,6 @@
|
|||||||
<div class="navilink"><a class="@ispage aspl-license.html:naviselected:navi@" href="aspl-license.html">ASPL license</a></div>
|
<div class="navilink"><a class="@ispage aspl-license.html:naviselected:navi@" href="aspl-license.html">ASPL license</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ministatus">@session-count@ Connected Users</div>
|
<div id="session_count" class="ministatus">@session-count@ Connected Users</div>
|
||||||
|
|
||||||
</td><td class="main">
|
</td><td class="main">
|
@ -1,6 +1,6 @@
|
|||||||
Event.observe(window,'load',initStatus);
|
Event.observe(window,'load',initStatus);
|
||||||
|
|
||||||
var UPDATE_FREQUENCY = 5; // number of seconds between updates
|
var UPDATE_FREQUENCY = 5; // default number of seconds between updates if no cookie set
|
||||||
|
|
||||||
function initStatus(e) {
|
function initStatus(e) {
|
||||||
Event.observe('update','keyup',Updater.keyUp);
|
Event.observe('update','keyup',Updater.keyUp);
|
||||||
@ -59,12 +59,15 @@ function rsStats(request) {
|
|||||||
var thread = $A(request.responseXML.getElementsByTagName('thread'));
|
var thread = $A(request.responseXML.getElementsByTagName('thread'));
|
||||||
var threadTable = new Table('thread');
|
var threadTable = new Table('thread');
|
||||||
threadTable.removeTBodyRows();
|
threadTable.removeTBodyRows();
|
||||||
|
var users = 0;
|
||||||
thread.each(function (element) {
|
thread.each(function (element) {
|
||||||
|
users++;
|
||||||
row = [];
|
row = [];
|
||||||
row.push(element.childNodes[1].firstChild.nodeValue);
|
row.push(element.childNodes[1].firstChild.nodeValue);
|
||||||
row.push(element.childNodes[2].firstChild.nodeValue);
|
row.push(element.childNodes[2].firstChild.nodeValue);
|
||||||
threadTable.addTbodyRow(row);
|
threadTable.addTbodyRow(row);
|
||||||
});
|
});
|
||||||
|
$('session_count').replaceChild(document.createTextNode(users + ' Connected Users'),$('session_count').firstChild);
|
||||||
Updater.update();
|
Updater.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user