mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- Show a Django message if desired. Keep the operation after completion so that the message can be collected later. - Show notifications for running operations - Only if show_notification flag is set. - Use a custom template so that spinner can be shown. - Log generously for operation creation, scheduling, running and completion. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
27 lines
593 B
HTML
27 lines
593 B
HTML
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load i18n %}
|
|
{% load static %}
|
|
|
|
<p>
|
|
{% if data.state == "waiting" %}
|
|
<span class="fa fa-clock-o"></span>
|
|
{% elif data.state == "running" %}
|
|
<span class="fa fa-refresh fa-spin processing"></span>
|
|
{% elif data.state == "completed" %}
|
|
{% endif %}
|
|
|
|
{{ message }}
|
|
</p>
|
|
|
|
{% if data.state == "completed" %}
|
|
<p>
|
|
<a href="{% url 'notification_dismiss' id=id %}?next={{ request.path|iriencode }}"
|
|
role="button" class="btn btn-default">
|
|
{% trans "Dismiss" %}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|