1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

83 lines
4.2 KiB
HTML
Raw Normal View History

2017-09-21 16:32:05 -04:00
{% extends '_base.html' %}
{% load helpers %}
{% block content %}
2017-09-25 16:22:50 -04:00
<h1>{% block title %}Reports{% endblock %}</h1>
2017-09-21 16:32:05 -04:00
<div class="row">
<div class="col-md-9">
{% if 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>
<tr>
<th>Name</th>
<th>Status</th>
<th>Description</th>
<th class="text-right">Last Run</th>
</tr>
</thead>
<tbody>
{% for report in module_reports %}
<tr>
<td>
<a href="{% url 'extras:report' name=report.full_name %}" name="report.{{ report.name }}"><strong>{{ report.name }}</strong></a>
2017-09-26 17:17:28 -04:00
</td>
<td>
2018-01-30 21:01:08 -05:00
{% include 'extras/inc/report_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 %}
</tr>
{% for method, stats in report.result.data.items %}
<tr>
<td colspan="3" class="method">
{{ method }}
</td>
<td class="text-right report-stats">
<label class="label label-success">{{ stats.success }}</label>
<label class="label label-info">{{ stats.info }}</label>
<label class="label label-warning">{{ stats.warning }}</label>
<label class="label label-danger">{{ stats.failure }}</label>
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endfor %}
{% else %}
<div class="alert alert-info">
<p><strong>No reports found.</strong></p>
<p>Reports should be saved to <code>{{ settings.REPORTS_ROOT }}</code>. (This path can be changed by setting <code>REPORTS_ROOT</code> in NetBox's configuration.)</p>
</div>
{% endif %}
2017-09-21 16:32:05 -04:00
</div>
2017-09-25 16:22:50 -04:00
<div class="col-md-3">
{% if reports %}
<div class="panel panel-default">
{% for module, module_reports in reports %}
<div class="panel-heading">
<strong>{{ module|bettertitle }}</strong>
</div>
<ul class="list-group">
{% for report in module_reports %}
<a href="#report.{{ report.name }}" class="list-group-item">
<i class="fa fa-list-alt"></i> {{ report.name }}
<div class="pull-right">
{% include 'extras/inc/report_label.html' with result=report.result %}
</div>
</a>
{% endfor %}
</ul>
{% endfor %}
</div>
{% endif %}
2017-09-25 16:22:50 -04:00
</div>
2017-09-21 16:32:05 -04:00
</div>
{% endblock %}