summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-08 23:17:40 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-08 23:17:40 +0200
commit8c69c4f756c6aaf8f3254ffb15f83aa7a4df91ac (patch)
treeb2f6409c1db7cbf4a405d02a27a147b2f42e2c70
parentnew useful events, allDownloadsProcessed + allDownloadsFinished (diff)
downloadpyload-8c69c4f756c6aaf8f3254ffb15f83aa7a4df91ac.tar.xz
show queue in webif
-rw-r--r--module/web/media/default/js/status.js1
-rw-r--r--module/web/templates/default/base.html3
-rwxr-xr-xpyLoadCore.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/module/web/media/default/js/status.js b/module/web/media/default/js/status.js
index d4ac97528..2ff67fca5 100644
--- a/module/web/media/default/js/status.js
+++ b/module/web/media/default/js/status.js
@@ -14,6 +14,7 @@ Element.implement({
function updateStatus(data){
+ alert("test");
document.id("status").textContent = "Status: "+ data.status;
document.id("speed").textContent = "Speed: "+ data.speed +" kb/s";
document.id("queue").textContent = "Files in queue: "+ data.queue;
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 30c3a0414..6eb71f737 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -88,6 +88,7 @@ function LoadJsonToContent(data)
$("speed").set('text', Math.round(data.speed*100)/100);
$("aktiv").set('text', data.activ);
$("aktiv_from").set('text', data.queue);
+ $("aktiv_total").set('text', data.total);
if (data.captcha){
if($("cap_info").getStyle("display") != "inline"){
@@ -256,7 +257,7 @@ function AddBox(){
<li><span class="time">{{_("Download:")}}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
<li><span class="reconnect">{{_("Reconnect:")}}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
<li><a class="action backlink">{{_("Speed:")}} <b id="speed">{{ status.speed }}</b> kb/s</a></li>
- <li><a class="action cog">{{_("Active:")}} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
+ <li><a class="action cog">{{_("Active:")}} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b> / <b id="aktiv_total">{{ status.total }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">{{_("Reload page")}}</a></li>
</ul>
{% endif %}
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 1c0c39403..561bf3466 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -636,7 +636,7 @@ class ServerMethods():
""" dict with current server status """
status = {'pause': self.core.threadManager.pause,
'activ': len(self.core.threadManager.processingIds()),
- 'queue': self.core.files.getFileCount(),
+ 'queue': self.core.files.getQueueCount(),
'total': self.core.files.getFileCount(),
'speed': 0}