Commit edbf8c53 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/admin.py: make index() use monitor()

parent 01e5b7b9
......@@ -19,10 +19,8 @@ def index():
p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE)
disk_use, err = p.communicate()
return dict(worker = len(db().select(db.scheduler_worker.ALL)),
queued = len(db(db.scheduler_task.status=='QUEUED').select()),
assigned = len(db(db.scheduler_task.status=='ASSIGNED').select()),
running = len(db(db.scheduler_task.status=='RUNNING').select()),
d = monitor()
return dict(d,
uptime=uptime,
disk_use=disk_use
)
......
......@@ -33,6 +33,7 @@
<div class="console-flex">QUEUED: {{=queued}}</div>
<div class="console-flex">ASSIGNED: {{=assigned}}</div>
<div class="console-flex">RUNNING: {{=running}}</div>
<div class="console-flex">LAST_RESULTS: {{=last_results}}...</div>
</div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment