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

adapt to the tasks new fields

parent 12142c8ff8d6
......@@ -107,7 +107,8 @@ def generate_tasks_table(engine, taskstates):
r.th('#')
r.th('service')
r.th('domain')
r.th('created')
r.th('queued')
r.th('started')
r.th('finished')
r.th('user')
r.th('worker')
......@@ -133,7 +134,12 @@ def generate_tasks_table(engine, taskstates):
href='taskerror/{}'.format(row.id))
r.td(row.domain)
r.td(job._propvalue('created').strftime('%Y-%m-%d %H:%M:%S'))
r.td(job._propvalue('queued').strftime('%Y-%m-%d %H:%M:%S'))
started = job._propvalue('started')
if started is None:
r.td('')
else:
r.td(started.strftime('%Y-%m-%d %H:%M:%S'))
finished = job._propvalue('finished')
if finished is None:
r.td('')
......
......@@ -6,7 +6,8 @@
<th>#</th>
<th>service</th>
<th>domain</th>
<th>created</th>
<th>queued</th>
<th>started</th>
<th>finished</th>
<th>user</th>
<th>worker</th>
......@@ -21,6 +22,7 @@
<td>default</td>
<td><X>-<X>-<X> <X>:<X>:<X></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):
......@@ -40,6 +42,7 @@ Exception: I am a little crasher.
<td>default</td>
<td><X>-<X>-<X> <X>:<X>:<X></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>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>
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>queued</th><th>started</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><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>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>
<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th><th>queued</th><th>started</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><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
......@@ -163,7 +163,7 @@ def test_tasks_table(engine, client, refresh):
'<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><th>finished</th>'
'<th>queued</th><th>started</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