mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 05:28:16 -06:00
Clean up template
This commit is contained in:
parent
d7c6fb5dde
commit
8bb719661d
@ -17,46 +17,52 @@
|
|||||||
<span id="pending-result-label">{% badge job.get_status_display job.get_status_color %}</span>
|
<span id="pending-result-label">{% badge job.get_status_display job.get_status_color %}</span>
|
||||||
</p>
|
</p>
|
||||||
{% if job.completed %}
|
{% if job.completed %}
|
||||||
<div class="card mb-3">
|
|
||||||
<h5 class="card-header">{% trans "Script Log" %}</h5>
|
{# Script log. Legacy reports will not have this. #}
|
||||||
<table class="table table-hover panel-body">
|
{% if 'log' in job.data %}
|
||||||
<tr>
|
<div class="card mb-3">
|
||||||
<th>{% trans "Line" %}</th>
|
<h5 class="card-header">{% trans "Log" %}</h5>
|
||||||
<th>{% trans "Time" %}</th>
|
{% if job.data.log %}
|
||||||
<th>{% trans "Level" %}</th>
|
<table class="table table-hover panel-body">
|
||||||
<th>{% trans "Message" %}</th>
|
<tr>
|
||||||
</tr>
|
<th>{% trans "Line" %}</th>
|
||||||
{% for log in job.data.log %}
|
<th>{% trans "Time" %}</th>
|
||||||
<tr>
|
<th>{% trans "Level" %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
<th>{% trans "Message" %}</th>
|
||||||
<td>{{ log.time|placeholder }}</td>
|
</tr>
|
||||||
<td>{% log_level log.status %}</td>
|
{% for log in job.data.log %}
|
||||||
<td class="rendered-markdown">{{ log.message|markdown }}</td>
|
<tr>
|
||||||
</tr>
|
<td>{{ forloop.counter }}</td>
|
||||||
{% empty %}
|
<td>{{ log.time|placeholder }}</td>
|
||||||
<tr>
|
<td>{% log_level log.status %}</td>
|
||||||
<td colspan="3" class="text-center text-muted">
|
<td>{{ log.message|markdown }}</td>
|
||||||
{% trans "No log output" %}
|
</tr>
|
||||||
</td>
|
{% endfor %}
|
||||||
</tr>
|
</table>
|
||||||
{% endfor %}
|
{% else %}
|
||||||
</table>
|
<div class="card-body text-muted">{% trans "None" %}</div>
|
||||||
{% if execution_time %}
|
{% endif %}
|
||||||
<div class="card-footer text-end text-muted">
|
</div>
|
||||||
<small>{% trans "Exec Time" %}: {{ execution_time|floatformat:3 }} {% trans "seconds" context "Unit of time" %}</small>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<h4>{% trans "Output" %}</h4>
|
|
||||||
{% if job.data.output %}
|
|
||||||
<pre class="block">{{ job.data.output }}</pre>
|
|
||||||
{% else %}
|
|
||||||
<p class="text-muted">{% trans "None" %}</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{# Script output. Legacy reports will not have this. #}
|
||||||
|
{% if 'output' in job.data %}
|
||||||
|
<div class="card mb-3">
|
||||||
|
<h5 class="card-header">{% trans "Output" %}</h5>
|
||||||
|
{% if job.data.output %}
|
||||||
|
<pre class="card-body font-monospace">{{ job.data.output }}</pre>
|
||||||
|
{% else %}
|
||||||
|
<div class="card-body text-muted">{% trans "None" %}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Test method logs (for legacy Reports) #}
|
||||||
{% if tests %}
|
{% if tests %}
|
||||||
|
|
||||||
|
{# Summary of test methods #}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Report Summary" %}</h5>
|
<h5 class="card-header">{% trans "Test Summary" %}</h5>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
{% for test, data in tests.items %}
|
{% for test, data in tests.items %}
|
||||||
<tr>
|
<tr>
|
||||||
@ -71,8 +77,10 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{# Detailed results for individual tests #}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Report Results" %}</h5>
|
<h5 class="card-header">{% trans "Test Details" %}</h5>
|
||||||
<table class="table table-hover report">
|
<table class="table table-hover report">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="table-headings">
|
<tr class="table-headings">
|
||||||
@ -111,6 +119,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif job.started %}
|
{% elif job.started %}
|
||||||
{% include 'extras/inc/result_pending.html' %}
|
{% include 'extras/inc/result_pending.html' %}
|
||||||
|
Loading…
Reference in New Issue
Block a user