#2006: Clean up report views

This commit is contained in:
Jeremy Stretch
2020-08-10 15:56:55 -04:00
parent 365b6f5e17
commit 93da6b6edf
5 changed files with 66 additions and 76 deletions
+18 -1
View File
@@ -15,6 +15,7 @@
<th>Status</th>
<th>Description</th>
<th class="text-right">Last Run</th>
<th></th>
</tr>
</thead>
<tbody>
@@ -36,10 +37,26 @@
<span class="text-muted">Never</span>
{% endif %}
</td>
<td>
{% if perms.extras.run_report %}
<div class="pull-right noprint">
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
{% csrf_token %}
<button type="submit" name="_run" class="btn btn-primary btn-xs">
{% if report.result %}
<i class="fa fa-refresh"></i> Run Again
{% else %}
<i class="fa fa-play"></i> Run Report
{% endif %}
</button>
</form>
</div>
{% endif %}
</td>
</tr>
{% for method, stats in report.result.data.items %}
<tr>
<td colspan="3" class="method">
<td colspan="4" class="method">
{{ method }}
</td>
<td class="text-right text-nowrap report-stats">