FreedomBox/plinth/modules/diagnostics/templates/diagnostics_results.html
James Valleroy f08211d228
upgrades: Add diagnostic for held packages
- Add a new diagnostic check result for skipped tests.

Tests:

- Put a hold on a package. The diagnostic is failed.

- Remove the hold from the package. The diagnostic is passed.

- Start installing an app, then immediately run the upgrades
  diagnostics. The diagnostic is skipped.

Helps: #2347

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Allow i18n for new state 'skipped']
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-25 14:22:46 -07:00

37 lines
1.2 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.translated_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>
{% elif result.result == 'skipped' %}
<span class="badge badge-secondary">{% trans result.result %}</span>
{% else %}
{{ result.result }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>