diff --git a/netbox/templates/extras/htmx/script_result.html b/netbox/templates/extras/htmx/script_result.html index 79df7b0c0..ed5dd9cbd 100644 --- a/netbox/templates/extras/htmx/script_result.html +++ b/netbox/templates/extras/htmx/script_result.html @@ -17,46 +17,52 @@ {% badge job.get_status_display job.get_status_color %}

{% if job.completed %} -
-
{% trans "Script Log" %}
- - - - - - - - {% for log in job.data.log %} - - - - - - - {% empty %} - - - - {% endfor %} -
{% trans "Line" %}{% trans "Time" %}{% trans "Level" %}{% trans "Message" %}
{{ forloop.counter }}{{ log.time|placeholder }}{% log_level log.status %}{{ log.message|markdown }}
- {% trans "No log output" %} -
- {% if execution_time %} - - {% endif %} -
-

{% trans "Output" %}

- {% if job.data.output %} -
{{ job.data.output }}
- {% else %} -

{% trans "None" %}

+ + {# Script log. Legacy reports will not have this. #} + {% if 'log' in job.data %} +
+
{% trans "Log" %}
+ {% if job.data.log %} + + + + + + + + {% for log in job.data.log %} + + + + + + + {% endfor %} +
{% trans "Line" %}{% trans "Time" %}{% trans "Level" %}{% trans "Message" %}
{{ forloop.counter }}{{ log.time|placeholder }}{% log_level log.status %}{{ log.message|markdown }}
+ {% else %} +
{% trans "None" %}
+ {% endif %} +
{% endif %} + {# Script output. Legacy reports will not have this. #} + {% if 'output' in job.data %} +
+
{% trans "Output" %}
+ {% if job.data.output %} +
{{ job.data.output }}
+ {% else %} +
{% trans "None" %}
+ {% endif %} +
+ {% endif %} + + {# Test method logs (for legacy Reports) #} {% if tests %} + + {# Summary of test methods #}
-
{% trans "Report Summary" %}
+
{% trans "Test Summary" %}
{% for test, data in tests.items %} @@ -71,8 +77,10 @@ {% endfor %}
+ + {# Detailed results for individual tests #}
-
{% trans "Report Results" %}
+
{% trans "Test Details" %}
@@ -111,6 +119,7 @@
+ {% endif %} {% elif job.started %} {% include 'extras/inc/result_pending.html' %}