FreedomBox/plinth/templates/operation-notification.html
Sunil Mohan Adapa cbef3e0163
operation: Add module to manage threaded operations
- 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>
2022-08-15 10:36:13 -04:00

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 %}