mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
- Currently, if an error occurred during diagnostics, just error message (without traceback details) was supposed to be shown on the results page. However, due to a bug in code related to showing repair button, a separate exception is raised. - Simplify the code by dropping all custom error display. Instead allow the generic error display mechanism in the middleware to handle the error. This keeps the code simple. Tests: - Raise an exception in diagnose() method of the 'users' app. Run the diagnostics for the users app. Notice that Diagnostics app page is shown with error alert containing full traceback details. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
34 lines
916 B
HTML
34 lines
916 B
HTML
{% extends 'base.html' %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
<h2>{% trans "Diagnostic Results" %}</h2>
|
|
|
|
<section>
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<h3>{% blocktrans %}App: {{ app_name }}{% endblocktrans %}</h3>
|
|
|
|
{% if show_repair %}
|
|
<form class="form form-diagnostics-repair-button" method="post"
|
|
action="{% url 'diagnostics:repair' app_id=app_id %}">
|
|
{% csrf_token %}
|
|
<input type="submit" class="btn btn-default"
|
|
name="repair" value="{% trans "Try to repair" %}"/>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if results %}
|
|
{% include "diagnostics_results.html" with results=results %}
|
|
{% else %}
|
|
<p>{% trans "This app does not support diagnostics" %}</p>
|
|
{% endif %}
|
|
</section>
|
|
|
|
{% endblock %}
|