mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Added navigation panel
This commit is contained in:
parent
79fdf641c0
commit
88c57d002d
7
netbox/templates/extras/inc/report_label.html
Normal file
7
netbox/templates/extras/inc/report_label.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{% if report.results.failed %}
|
||||||
|
<label class="label label-danger">Failed</label>
|
||||||
|
{% elif report.results %}
|
||||||
|
<label class="label label-success">Passed</label>
|
||||||
|
{% else %}
|
||||||
|
<label class="label label-default">N/A</label>
|
||||||
|
{% endif %}
|
@ -2,12 +2,12 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Reports</h1>
|
<h1>{% block title %}Reports{% endblock %}</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
{% for module, module_reports in reports %}
|
{% for module, module_reports in reports %}
|
||||||
<h3>{{ module|bettertitle }}</h3>
|
<h3><a name="module.{{ module }}"></a>{{ module|bettertitle }}</h3>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover table-headings">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -19,25 +19,18 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for report in module_reports %}
|
{% for report in module_reports %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ report.name }}</td>
|
<td><a name="report.{{ report.name }}"></a><strong>{{ report.name }}</strong></td>
|
||||||
<td>{{ report.description|default:"" }}</td>
|
<td>{{ report.description|default:"" }}</td>
|
||||||
{% if report.results %}
|
{% if report.results %}
|
||||||
<td>{{ report.results.created }}</td>
|
<td>{{ report.results.created }}</td>
|
||||||
<td class="text-right">
|
|
||||||
{% if report.results.failed %}
|
|
||||||
<label class="label label-danger">Failed</label>
|
|
||||||
{% else %}
|
|
||||||
<label class="label label-success">Passed</label>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class="text-muted">Never</td>
|
<td class="text-muted">Never</td>
|
||||||
<td class="text-muted text-right">—</td>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<td class="text-right">{% include 'extras/inc/report_label.html' %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% for method, stats in report.results.data.items %}
|
{% for method, stats in report.results.data.items %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">
|
<td colspan="3" style="padding-left: 40px">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<label class="label label-success">{{ stats.success }}</label>
|
<label class="label label-success">{{ stats.success }}</label>
|
||||||
<label class="label label-info">{{ stats.info }}</label>
|
<label class="label label-info">{{ stats.info }}</label>
|
||||||
@ -46,6 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span style="font-family: monospace">{{ method }}</span>
|
<span style="font-family: monospace">{{ method }}</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -53,5 +47,20 @@
|
|||||||
</table>
|
</table>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<ul class="list-group">
|
||||||
|
{% for module, module_reports in reports %}
|
||||||
|
<a href="#module.{{ module }}" class="list-group-item"><strong>{{ module|bettertitle }}</strong></a>
|
||||||
|
{% for report in module_reports %}
|
||||||
|
<a href="#report.{{ report.name }}" class="list-group-item">
|
||||||
|
{{ report.name }}
|
||||||
|
<div class="pull-right">
|
||||||
|
{% include 'extras/inc/report_label.html' %}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user