2022-12-15 09:29:56 -05:00
|
|
|
{% load humanize %}
|
2021-12-20 20:45:32 -05:00
|
|
|
{% load helpers %}
|
|
|
|
{% load log_levels %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2021-12-20 20:45:32 -05:00
|
|
|
|
2021-12-21 08:43:01 -05:00
|
|
|
<p>
|
2023-03-28 15:47:09 -04:00
|
|
|
{% if job.started %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% trans "Started" %}: <strong>{{ job.started|annotated_date }}</strong>
|
2023-03-28 15:47:09 -04:00
|
|
|
{% elif job.scheduled %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% trans "Scheduled for" %}: <strong>{{ job.scheduled|annotated_date }}</strong> ({{ job.scheduled|naturaltime }})
|
2022-11-15 14:38:58 -05:00
|
|
|
{% else %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% trans "Created" %}: <strong>{{ job.created|annotated_date }}</strong>
|
2022-10-16 13:42:28 +02:00
|
|
|
{% endif %}
|
2023-03-28 15:47:09 -04:00
|
|
|
{% if job.completed %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% trans "Duration" %}: <strong>{{ job.duration }}</strong>
|
2021-12-21 08:43:01 -05:00
|
|
|
{% endif %}
|
2023-03-28 15:47:09 -04:00
|
|
|
<span id="pending-result-label">{% badge job.get_status_display job.get_status_color %}</span>
|
2021-12-21 08:43:01 -05:00
|
|
|
</p>
|
2023-03-28 15:47:09 -04:00
|
|
|
{% if job.completed %}
|
2024-02-07 09:02:09 -08:00
|
|
|
|
|
|
|
{# Script log. Legacy reports will not have this. #}
|
|
|
|
{% if 'log' in job.data %}
|
|
|
|
<div class="card mb-3">
|
|
|
|
<h5 class="card-header">{% trans "Log" %}</h5>
|
|
|
|
{% if job.data.log %}
|
|
|
|
<table class="table table-hover panel-body">
|
|
|
|
<tr>
|
|
|
|
<th>{% trans "Line" %}</th>
|
|
|
|
<th>{% trans "Time" %}</th>
|
|
|
|
<th>{% trans "Level" %}</th>
|
|
|
|
<th>{% trans "Message" %}</th>
|
|
|
|
</tr>
|
|
|
|
{% for log in job.data.log %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ forloop.counter }}</td>
|
|
|
|
<td>{{ log.time|placeholder }}</td>
|
|
|
|
<td>{% log_level log.status %}</td>
|
|
|
|
<td>{{ log.message|markdown }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="card-body text-muted">{% trans "None" %}</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% 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 %}
|
|
|
|
|
|
|
|
{# Summary of test methods #}
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">{% trans "Test Summary" %}</h5>
|
|
|
|
<table class="table table-hover">
|
|
|
|
{% for test, data in tests.items %}
|
|
|
|
<tr>
|
|
|
|
<td class="font-monospace"><a href="#{{ test }}">{{ test }}</a></td>
|
|
|
|
<td class="text-end report-stats">
|
|
|
|
<span class="badge text-bg-success">{{ data.success }}</span>
|
|
|
|
<span class="badge text-bg-info">{{ data.info }}</span>
|
|
|
|
<span class="badge text-bg-warning">{{ data.warning }}</span>
|
|
|
|
<span class="badge text-bg-danger">{{ data.failure }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{# Detailed results for individual tests #}
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">{% trans "Test Details" %}</h5>
|
|
|
|
<table class="table table-hover report">
|
|
|
|
<thead>
|
|
|
|
<tr class="table-headings">
|
|
|
|
<th>{% trans "Time" %}</th>
|
|
|
|
<th>{% trans "Level" %}</th>
|
|
|
|
<th>{% trans "Object" %}</th>
|
|
|
|
<th>{% trans "Message" %}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for test, data in tests.items %}
|
|
|
|
<tr>
|
|
|
|
<th colspan="4" style="font-family: monospace">
|
|
|
|
<a name="{{ test }}"></a>{{ test }}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
{% for time, level, obj, url, message in data.log %}
|
|
|
|
<tr class="{% if level == 'failure' %}danger{% elif level %}{{ level }}{% endif %}">
|
|
|
|
<td>{{ time }}</td>
|
|
|
|
<td>
|
|
|
|
<label class="badge text-bg-{% if level == 'failure' %}danger{% else %}{{ level }}{% endif %}">{{ level|title }}</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if obj and url %}
|
|
|
|
<a href="{{ url }}">{{ obj }}</a>
|
|
|
|
{% elif obj %}
|
|
|
|
{{ obj }}
|
|
|
|
{% else %}
|
|
|
|
{{ ''|placeholder }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td class="rendered-markdown">{{ message|markdown }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2021-12-20 20:45:32 -05:00
|
|
|
{% endif %}
|
2023-03-28 15:47:09 -04:00
|
|
|
{% elif job.started %}
|
2021-12-21 08:43:01 -05:00
|
|
|
{% include 'extras/inc/result_pending.html' %}
|
2021-12-20 20:45:32 -05:00
|
|
|
{% endif %}
|