mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
Helps: #1938. Fixed application of available translations in daemon.py and apache, diagnostics, networks, firewall and users modules. diagnostics: - __init__.py: return the app name along its results. - diagnostics.html: display the app name instead of its id. - diagnostics_results.html: - mark for translation, - apply class to results <td> HTML tag. main.css: center-align the results. Locale files excluded. Will be regenerated automatically and translations to be done via Weblate. original testing (rebased later): - Yapf applied. - Flake8 without errors or warnings for changed files. - (Unit) tests run without errors. Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com> [sunil: Translate 'None' app name] [sunil: Don't translate tests strings second time in template] [sunil: Tweak the center rule] [sunil: Don't split a translation string] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
57 lines
1.6 KiB
HTML
57 lines
1.6 KiB
HTML
{% extends 'app.html' %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load i18n %}
|
|
{% load static %}
|
|
|
|
{% block configuration %}
|
|
|
|
{% if not is_running %}
|
|
<form class="form form-run-diagnostics" method="post"
|
|
action="{% url 'diagnostics:index' %}">
|
|
{% csrf_token %}
|
|
|
|
<input type="submit" class="btn btn-primary"
|
|
value="{% trans "Run Diagnostics" %}"/>
|
|
</form>
|
|
{% else %}
|
|
<p>{% trans "Diagnostics test is currently running" %}</p>
|
|
<div class="progress">
|
|
<div class="progress-bar progress-bar-striped active"
|
|
role="progressbar" aria-valuemin="0" aria-valuemax="100"
|
|
aria-valuenow="{{ results.progress_percentage }}"
|
|
style="width: {{ results.progress_percentage }}%">
|
|
{{ results.progress_percentage }}%
|
|
</div>
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if results %}
|
|
<h3>{% trans "Results" %}</h3>
|
|
{% if results.error %}
|
|
<div class="alert alert-danger alert-dismissable">
|
|
<a class="close" data-dismiss="alert">×</a>
|
|
{{ results.error }}
|
|
</div>
|
|
{% else %}
|
|
{% for app_id, app_data in results.results.items %}
|
|
<h4>
|
|
{% blocktrans with app_name=app_data.name %}
|
|
App: {{app_name}}
|
|
{% endblocktrans %}
|
|
</h4>
|
|
|
|
{% if app_data.results %}
|
|
{% include "diagnostics_results.html" with results=app_data.results %}
|
|
{% else %}
|
|
<p><span class="fa fa-hourglass-o"></span></p>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endblock %}
|