Commit 3c3018d5 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

taskstable: expose the task `finished` attribute

parent 870a114ec82d
......@@ -108,6 +108,7 @@ def generate_tasks_table(engine, taskstates):
r.th('service')
r.th('domain')
r.th('created')
r.th('finished')
r.th('user')
r.th('worker')
r.th('status')
......@@ -133,6 +134,11 @@ def generate_tasks_table(engine, taskstates):
r.td(row.domain)
r.td(job._propvalue('created').strftime('%Y-%m-%d %H:%M:%S'))
finished = job._propvalue('finished')
if finished is None:
r.td('')
else:
r.td(finished.strftime('%Y-%m-%d %H:%M:%S'))
# user plus maybe run name
meta = job.metadata
......
......@@ -7,6 +7,7 @@
<th>service</th>
<th>domain</th>
<th>created</th>
<th>finished</th>
<th>user</th>
<th>worker</th>
<th>status</th>
......@@ -19,6 +20,7 @@
</td>
<td>default</td>
<td><X>-<X>-<X> <X>:<X>:<X></td>
<td><X>-<X>-<X> <X>:<X>:<X></td>
<td>Babar</td>
<td>#<X></td>
<td class="failed" title="Traceback (most recent call last):
......@@ -37,6 +39,7 @@ Exception: I am a little crasher.
<td><span><a title="show the tasks log (if any)" target="_blank" href="tasklogs/<X>">good_job</a></span></td>
<td>default</td>
<td><X>-<X>-<X> <X>:<X>:<X></td>
<td><X>-<X>-<X> <X>:<X>:<X></td>
<td>Babar</td>
<td>#<X></td>
<td class="done">done</td>
......
<br>
<table class="table table-sm table-bordered table-striped table-hover">
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>created</th><th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>
<tr><th scope="row"><X></th><td><span><a title="show the tasks log (if any)" target="_blank" href="tasklogs/<X>">justdoit</a></span></td><td>uranus</td><td><X>-<X>-<X> <X>:<X>:<X></td><td>Celeste</td><td>#<X></td><td class="done">done</td><td><button type="button" class="btn btn-warning btn-sm" onclick="delete_task(<X>)">delete</button><span> </span><button type="button" class="btn btn-primary btn-sm" onclick="relaunch_task(<X>)">relaunch</button><span> </span><button type="button" class="btn btn-info btn-sm" onclick="download_input(<X>, &quot;xml&quot;)">input</button><span> </span><button type="button" class="btn btn-success btn-sm" onclick="download_results(<X>)">results</button></td></tr>
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>created</th><th>finished</th><th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>
<tr><th scope="row"><X></th><td><span><a title="show the tasks log (if any)" target="_blank" href="tasklogs/<X>">justdoit</a></span></td><td>uranus</td><td><X>-<X>-<X> <X>:<X>:<X></td><td><X>-<X>-<X> <X>:<X>:<X></td><td>Celeste</td><td>#<X></td><td class="done">done</td><td><button type="button" class="btn btn-warning btn-sm" onclick="delete_task(<X>)">delete</button><span> </span><button type="button" class="btn btn-primary btn-sm" onclick="relaunch_task(<X>)">relaunch</button><span> </span><button type="button" class="btn btn-info btn-sm" onclick="download_input(<X>, &quot;xml&quot;)">input</button><span> </span><button type="button" class="btn btn-success btn-sm" onclick="download_results(<X>)">results</button></td></tr>
</table>
\ No newline at end of file
<br>
<table class="table table-sm table-bordered table-striped table-hover">
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>created</th><th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>
<tr><th scope="row"><X></th><td><span><a title="show the tasks log (if any)" target="_blank" href="tasklogs/<X>">good_job</a></span></td><td>default</td><td><X>-<X>-<X> <X>:<X>:<X></td><td>Babar</td><td>#<X></td><td class="done">done</td><td><button type="button" class="btn btn-warning btn-sm" onclick="delete_task(<X>)">delete</button><span> </span><button type="button" class="btn btn-primary btn-sm" onclick="relaunch_task(<X>)">relaunch</button><span> </span><button type="button" class="btn btn-info btn-sm" onclick="download_input(<X>, &quot;xml&quot;)">input</button><span> </span><button type="button" class="btn btn-success btn-sm" onclick="download_results(<X>)">results</button></td></tr>
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>created</th><th>finished</th><th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>
<tr><th scope="row"><X></th><td><span><a title="show the tasks log (if any)" target="_blank" href="tasklogs/<X>">good_job</a></span></td><td>default</td><td><X>-<X>-<X> <X>:<X>:<X></td><td><X>-<X>-<X> <X>:<X>:<X></td><td>Babar</td><td>#<X></td><td class="done">done</td><td><button type="button" class="btn btn-warning btn-sm" onclick="delete_task(<X>)">delete</button><span> </span><button type="button" class="btn btn-primary btn-sm" onclick="relaunch_task(<X>)">relaunch</button><span> </span><button type="button" class="btn btn-info btn-sm" onclick="download_input(<X>, &quot;xml&quot;)">input</button><span> </span><button type="button" class="btn btn-success btn-sm" onclick="download_results(<X>)">results</button></td></tr>
</table>
\ No newline at end of file
......@@ -141,7 +141,8 @@ def test_tasks_table(engine, client, refresh):
assert res.text == (
'<br>\n'
'<table class="table table-sm table-bordered table-striped table-hover">\n'
'<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>created</th>'
'<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th>'
'<th>created</th><th>finished</th>'
'<th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>\n</table>'
)
......
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