Tweak the admin

This commit is contained in:
Thomas Sileo 2019-04-08 20:56:12 +02:00
parent 5811583163
commit 686d614386
2 changed files with 27 additions and 0 deletions

1
app.py
View file

@ -1303,6 +1303,7 @@ def admin():
def admin_tasks():
return render_template(
"admin_tasks.html",
success=p.get_success(),
dead=p.get_dead(),
waiting=p.get_waiting(),
cron=p.get_cron(),

View file

@ -84,6 +84,32 @@
</tbody>
</table>
<h3>Success</h3>
<table class="pure-table">
<thead>
<tr>
<th>#</th>
<th>URL</th>
<th>Payload</th>
<th>Next run</th>
<th>Response</th>
</tr>
</thead>
<tbody>
{% for task in success %}
<tr>
<td>{{ task.task_id }}</td>
<td>{{ task.url }} ({{ task.expected }})</td>
<td>{{ task.payload }}</td>
<td>{{ task.next_run }}</td>
<td>Tries #{{ task.tries }}: {{ task.last_error_body }} ({{ task.last_error_status_code }})</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>