From 51194e20f2997a4d0bc17985ea02bd1203fe92b3 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 11 Oct 2017 13:30:38 -0400 Subject: [PATCH] Improved template for when no reports are found --- netbox/templates/extras/report_list.html | 114 ++++++++++++----------- 1 file changed, 61 insertions(+), 53 deletions(-) diff --git a/netbox/templates/extras/report_list.html b/netbox/templates/extras/report_list.html index 0ff0a432c..023ffba7c 100644 --- a/netbox/templates/extras/report_list.html +++ b/netbox/templates/extras/report_list.html @@ -5,69 +5,77 @@

{% block title %}Reports{% endblock %}

+ {% if reports %} {% for module, module_reports in reports %} -

{{ module|bettertitle }}

- - - - - - - - - - - {% for report in module_reports %} +

{{ module|bettertitle }}

+
NameStatusDescriptionLast Run
+ - - - - {% if report.result %} - - {% else %} - - {% endif %} + + + + - {% for method, stats in report.result.data.items %} + + + {% for report in module_reports %} - - + + {% if report.result %} + + {% else %} + + {% endif %} + {% for method, stats in report.result.data.items %} + + + + + {% endfor %} {% endfor %} - {% endfor %} - -
- {{ report.name }} - - {% include 'extras/inc/report_label.html' %} - {{ report.description|default:"" }}{{ report.result.created }}NeverNameStatusDescriptionLast Run
- {{ method }} + + {{ report.name }} - - - - + + {% include 'extras/inc/report_label.html' %} {{ report.description|default:"" }}{{ report.result.created }}Never
+ {{ method }} + + + + + +
- {% endfor %} + + + {% endfor %} + {% else %} +
+ No reports found. +
+ {% endif %}
-
- {% for module, module_reports in reports %} -
- {{ module|bettertitle }} -
- - {% endfor %} -
+ {% if reports %} +
+ {% for module, module_reports in reports %} +
+ {{ module|bettertitle }} +
+ + {% endfor %} +
+ {% endif %}
{% endblock %}