summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-12-19 15:13:10 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-12-19 15:13:10 +0100
commitadcc953b4dd2dce1f91bd7cd11105e9f0653f704 (patch)
tree99f7d9dd6111664d7555a8d8dba28158983ad3e2 /module/web
parentcleaned (diff)
downloadpyload-adcc953b4dd2dce1f91bd7cd11105e9f0653f704.tar.xz
fixed reconnect
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py13
-rw-r--r--module/web/templates/default/base.html4
2 files changed, 11 insertions, 6 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 904e312e7..a51a9c4dc 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -51,6 +51,11 @@ def permission(perm):
return _dec
+
+def status_proc(request):
+ return {'status': settings.PYLOAD.status_server()}
+
+
def base(request, messages):
return render_to_response(join(settings.TEMPLATE,'base.html'), {'messages': messages},RequestContext(request))
@@ -58,14 +63,14 @@ def base(request, messages):
@permission('pyload.can_see_dl')
@check_server
def home(request):
- return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request,{},[status_proc]))
@login_required
@permission('pyload.can_see_dl')
@check_server
def queue(request):
- return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request,{},[status_proc]))
@login_required
@@ -94,7 +99,7 @@ def downloads(request):
data['files'].append(item)
- return render_to_response(join(settings.TEMPLATE,'downloads.html'), {'files': data}, RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'downloads.html'), RequestContext(request,{'files': data},[status_proc]))
@login_required
@permission('pyload.user.can_download')
@@ -132,4 +137,4 @@ def download(request,path):
@permission('pyload.user.can_see_logs')
@check_server
def logs(request):
- return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request)) \ No newline at end of file
+ return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request,{},[status_proc])) \ No newline at end of file
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 46e9caa11..307dd821a 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -108,8 +108,8 @@ $(document).ready(function(){
{% if perms.pyload.can_see_dl %}
<ul id="page-actions">
- <li><a href="" class="action backlink" accesskey="o" rel="nofollow">Speed: <b id="speed">0</b> kb/s</a></li>
- <li><a href="" class="action cog" accesskey="o" rel="nofollow">Aktiv: <b id="aktiv">0</b> / <b id="aktiv_from">0</b></a></li>
+ <li><a href="" class="action backlink" accesskey="o" rel="nofollow">Speed: <b id="speed">{{ status.speed }}</b> kb/s</a></li>
+ <li><a href="" class="action cog" accesskey="o" rel="nofollow">Aktiv: <b id="aktiv">{{ status.queue }}</b> / <b id="aktiv_from">{{ status.total }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">Reload page</a></li>
</ul><br />
{% endif %}