mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05: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>
|
||||
|
||||
<div class="ministatus">@session-count@ Connected Users</div>
|
||||
<div id="session_count" class="ministatus">@session-count@ Connected Users</div>
|
||||
|
||||
</td><td class="main">
|
@ -1,6 +1,6 @@
|
||||
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) {
|
||||
Event.observe('update','keyup',Updater.keyUp);
|
||||
@ -59,12 +59,15 @@ function rsStats(request) {
|
||||
var thread = $A(request.responseXML.getElementsByTagName('thread'));
|
||||
var threadTable = new Table('thread');
|
||||
threadTable.removeTBodyRows();
|
||||
var users = 0;
|
||||
thread.each(function (element) {
|
||||
users++;
|
||||
row = [];
|
||||
row.push(element.childNodes[1].firstChild.nodeValue);
|
||||
row.push(element.childNodes[2].firstChild.nodeValue);
|
||||
threadTable.addTbodyRow(row);
|
||||
});
|
||||
$('session_count').replaceChild(document.createTextNode(users + ' Connected Users'),$('session_count').firstChild);
|
||||
Updater.update();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user