diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-02-24 17:42:59 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-02-24 17:42:59 +0000 |
commit | dcc1efcd847850fc3b7ed53e89ab4d4806465527 (patch) | |
tree | 2ea8e28334d829c883eab2400c4ea7fbb0bcacbe | |
parent | ff94a614ba628906151ab6ec6e9b008b9ea8fa02 (diff) | |
download | lorry-controller-dcc1efcd847850fc3b7ed53e89ab4d4806465527.tar.gz |
Add table of currently running jobs
-rwxr-xr-x | lorry-controller-webapp | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/lorry-controller-webapp b/lorry-controller-webapp index 3bc0ff3..aa62877 100755 --- a/lorry-controller-webapp +++ b/lorry-controller-webapp @@ -68,31 +68,48 @@ td { <p>Free disk space: {{disk_free_gib}} GiB.</p> + <h2>Currently running jobs</h2> + +<table> +<tr> +<th>Job ID</th> +<th>path</th> +</tr> +% for spec in run_queue: +% if spec['running_job'] is not None: +<tr> +<td>{{spec['running_job']}}</td> +<td>{{spec['path']}}</td> +</tr> +% end +% end +</table> + <h2>Run-queue</h2> - <table> - <tr> +<table> +<tr> <th>Pos</th> <th>Path</th> <th>URL</th> <th>Interval</th> <th>Due</th> <th>Job</th> - </tr> - % for i, spec in enumerate(run_queue): - % obj = json.loads(spec['text']) - % name = obj.keys()[0] - % fields = obj[name] - <tr> +</tr> +% for i, spec in enumerate(run_queue): +% obj = json.loads(spec['text']) +% name = obj.keys()[0] +% fields = obj[name] +<tr> <td>{{i+1}}</td> <td>{{spec['path']}}</td> <td>{{fields['url']}}</td> <td>{{spec['interval']}}</td> <td>{{spec['due_nice']}}</td> <td>{{spec['running_job']}}</td> - </tr> - % end - </table> +</tr> +% end +</table> <hr /> |