FreedomBox/plinth/modules/diagnostics/templates/diagnostics_results.html
James Valleroy 79f36e6a0c
diagnostics: Add DiagnosticCheck dataclass
- Set unique check_id for each diagnostic check.

- Result is a string-based enumeration. The default value (NOT_DONE) can be
  used for diagnostic checks that have not been completed yet.

- Result is StrEnum so that the return value of check_url can still be used
  directly as a diagnostic result.

Closes: #2375

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-07 04:52:13 +09:00

35 lines
1.0 KiB
HTML

{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load i18n %}
<div class="table-responsive">
<table class="table diagnostics-results">
<thead>
<tr>
<th class="diagnostic-test">{% trans "Test" %}</th>
<th class="diagnostics-result">{% trans "Result" %}</th>
</tr>
</thead>
<tbody>
{% for result in results %}
<tr>
<td>{{ result.description }}</td>
<td class="diagnostics-result">
{% if result.result == 'passed' %}
<span class="badge badge-success">{% trans result.result %}</span>
{% elif result.result == 'failed' %}
<span class="badge badge-danger">{% trans result.result %}</span>
{% elif result.result == 'error' or result.result == 'warning' %}
<span class="badge badge-warning">{% trans result.result %}</span>
{% else %}
{{ result.result }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>