Provide a default view for Report instances

This commit is contained in:
Jeremy Stretch
2020-07-06 13:30:13 -04:00
parent 1f905e72d9
commit 592ad18317
4 changed files with 61 additions and 12 deletions
+13 -9
View File
@@ -6,7 +6,7 @@
<div class="row">
<div class="col-md-9">
{% if reports %}
{% for module, module_reports in reports %}
{% for module, module_reports in reports %}
<h3><a name="module.{{ module }}"></a>{{ module|bettertitle }}</h3>
<table class="table table-hover table-headings reports">
<thead>
@@ -21,17 +21,21 @@
{% for report in module_reports %}
<tr>
<td>
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}" name="report.{{ report.name }}"><strong>{{ report.name }}</strong></a>
<a href="{% url 'extras:report' module=report.module name=report.class_name %}" id="{{ report.module }}.{{ report.class_name }}">
<strong>{{ report.name }}</strong>
</a>
</td>
<td>
{% include 'extras/inc/job_label.html' with result=report.result %}
</td>
<td>{{ report.description|default:"" }}</td>
{% if report.result %}
<td class="text-right">{{ report.result.created }}</td>
{% else %}
<td class="text-right text-muted">Never</td>
{% endif %}
<td>{{ report.description|placeholder }}</td>
<td class="text-right">
{% if report.result %}
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">{{ report.result.created }}</a>
{% else %}
<span class="text-muted">Never</span>
{% endif %}
</td>
</tr>
{% for method, stats in report.result.data.items %}
<tr>
@@ -66,7 +70,7 @@
</div>
<ul class="list-group">
{% for report in module_reports %}
<a href="#report.{{ report.name }}" class="list-group-item">
<a href="#{{ report.module }}.{{ report.class_name }}" class="list-group-item">
<i class="fa fa-list-alt"></i> {{ report.name }}
<div class="pull-right">
{% include 'extras/inc/job_label.html' with result=report.result %}