Started adding a view for individual reports

This commit is contained in:
Jeremy Stretch
2017-09-27 17:39:22 -04:00
parent f4c87b3739
commit 2fbb39bf6f
6 changed files with 68 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
{% if report.results.failed %}
{% if report.result.failed %}
<label class="label label-danger">Failed</label>
{% elif report.results %}
{% elif report.result %}
<label class="label label-success">Passed</label>
{% else %}
<label class="label label-default">N/A</label>

View File

@@ -0,0 +1,31 @@
{% extends '_base.html' %}
{% load helpers %}
{% block title %}{{ report.name }}{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'extras:report_list' %}">Reports</a></li>
<li><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
<li>{{ report.name }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
</div>
</div>
<h1>{{ report.name }}{% include 'extras/inc/report_label.html' %}</h1>
<div class="row">
<div class="col-md-9">
{% if report.description %}
<p class="lead">{{ report.description }}</p>
{% endif %}
{% if report.result %}
<p>Last run: {{ report.result.created }}</p>
{% else %}
<p class="text-muted">Last run: Never</p>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -20,20 +20,19 @@
{% for report in module_reports %}
<tr>
<td>
<a name="report.{{ report.name }}"></a>
<strong>{{ report.name }}</strong>
<a href="{% url 'extras:report' name=report.full_name %}" name="report.{{ report.name }}"><strong>{{ report.name }}</strong></a>
</td>
<td>
{% include 'extras/inc/report_label.html' %}
</td>
<td>{{ report.description|default:"" }}</td>
{% if report.results %}
<td>{{ report.results.created }}</td>
{% if report.result %}
<td>{{ report.result.created }}</td>
{% else %}
<td class="text-muted">Never</td>
{% endif %}
</tr>
{% for method, stats in report.results.data.items %}
{% for method, stats in report.result.data.items %}
<tr>
<td colspan="3" class="method">
{{ method }}