diff --git a/plinth/templates/app.html b/plinth/templates/app.html index bc30d849a..8f9beef85 100644 --- a/plinth/templates/app.html +++ b/plinth/templates/app.html @@ -14,49 +14,53 @@ {% include "app-header.html" %} - {% include "toolbar.html" with enabled=is_enabled %} + {% if not operations %} + {% include "toolbar.html" with enabled=is_enabled %} - {% block subsubmenu %} - {% if subsubmenu %} - {% show_subsubmenu subsubmenu %} - {% endif %} - {% endblock %} + {% block subsubmenu %} + {% if subsubmenu %} + {% show_subsubmenu subsubmenu %} + {% endif %} + {% endblock %} - {% block status %} - {% if is_running is not None and not is_running %} - - {% endif %} - {% endblock %} + {% block status %} + {% if is_running is not None and not is_running %} + + {% endif %} + {% endblock %} - {% block internal_zone %} - {% include "internal-zone.html" %} - {% endblock %} + {% block internal_zone %} + {% include "internal-zone.html" %} + {% endblock %} - {% block port_forwarding_info %} - {% include "port-forwarding-info.html" with service_name=app_info.name %} - {% endblock %} + {% block port_forwarding_info %} + {% include "port-forwarding-info.html" with service_name=app_info.name %} + {% endblock %} - {% block configuration %} - {% if form %} -

{% trans "Configuration" %}

+ {% block configuration %} + {% if form %} +

{% trans "Configuration" %}

-
- {% csrf_token %} + + {% csrf_token %} - {{ form|bootstrap }} + {{ form|bootstrap }} - -
- {% endif %} - {% endblock %} + + + {% endif %} + {% endblock %} - {% block extra_content %} - {% endblock %} + {% block extra_content %} + {% endblock %} + {% else %} + {% include "operations.html" %} + {% endif %} {% endblock %} diff --git a/plinth/views.py b/plinth/views.py index 6310005af..e95990401 100644 --- a/plinth/views.py +++ b/plinth/views.py @@ -256,6 +256,10 @@ class AppView(FormView): context['has_diagnostics'] = self.app.has_diagnostics() context['port_forwarding_info'] = get_port_forwarding_info(self.app) context['app_enable_disable_form'] = self.get_enable_disable_form() + context['operations'] = operation.manager.filter(self.app.app_id) + context['refresh_page_sec'] = None + if context['operations']: + context['refresh_page_sec'] = 3 from plinth.modules.firewall.components import Firewall context['firewall'] = self.app.get_components_of_type(Firewall)