Add a trigger log every time the a callback is triggered

This commit is contained in:
2022-12-15 17:05:19 +01:00
parent 451160face
commit e41850ddee
11 changed files with 196 additions and 83 deletions
+33
View File
@@ -0,0 +1,33 @@
{% extends "base/layout.html" %}
{% block main %}
{{ super() }}
<div>
<h1>Triggers for <u>{{callback.name}}</u></h1>
<button onclick="window.location.href='{{ url_for('callback', uuid=callback.uuid) }}';">Back</button>
<p>
{% if triggers.count() > 0 %}
<table>
<tr>
<th>Trigger time</th>
<th>Schedule</th>
<th>Success</th>
</tr>
{% for trigger in triggers %}
<tr>
<td>{{trigger.trigger_time.strftime('%A %d %B at %H:%M:%S')}}</td>
<td>{% if trigger.schedule_id != -1 %}{{trigger.schedule.name}}{% endif %}</td>
<td>{{trigger.success}}</td>
</tr>
{% endfor %}
</table>
{% else %}
This callback has not been triggered yet.
{% endif %}
</p>
</div>
{% endblock %}