From 3b5e89708f3907040ab3fea33da0d799ecac2865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Betn=C3=A9r?= Date: Thu, 6 Apr 2006 21:20:33 +0000 Subject: [PATCH] Fixed #42 --- admin-root/hdr.html | 2 +- admin-root/status.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/admin-root/hdr.html b/admin-root/hdr.html index a5247c55..df7beb3c 100644 --- a/admin-root/hdr.html +++ b/admin-root/hdr.html @@ -49,6 +49,6 @@ -
@session-count@ Connected Users
+
@session-count@ Connected Users
\ No newline at end of file diff --git a/admin-root/status.js b/admin-root/status.js index 14710376..4062818c 100644 --- a/admin-root/status.js +++ b/admin-root/status.js @@ -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(); }