mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
operation: Show operations on app page in addition to setup page
- Will be utilized by uninstall. Tests: - Operation progress is shown during uninstall of coturn app. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
6c67091ede
commit
145b3ecc65
@ -14,49 +14,53 @@
|
|||||||
|
|
||||||
{% include "app-header.html" %}
|
{% include "app-header.html" %}
|
||||||
|
|
||||||
{% include "toolbar.html" with enabled=is_enabled %}
|
{% if not operations %}
|
||||||
|
{% include "toolbar.html" with enabled=is_enabled %}
|
||||||
|
|
||||||
{% block subsubmenu %}
|
{% block subsubmenu %}
|
||||||
{% if subsubmenu %}
|
{% if subsubmenu %}
|
||||||
{% show_subsubmenu subsubmenu %}
|
{% show_subsubmenu subsubmenu %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block status %}
|
{% block status %}
|
||||||
{% if is_running is not None and not is_running %}
|
{% if is_running is not None and not is_running %}
|
||||||
<div id='service-not-running' role="alert"
|
<div id='service-not-running' role="alert"
|
||||||
class="alert alert-danger {{ is_enabled|yesno:',d-none' }}">
|
class="alert alert-danger {{ is_enabled|yesno:',d-none' }}">
|
||||||
{% blocktrans trimmed with service_name=app_info.name %}
|
{% blocktrans trimmed with service_name=app_info.name %}
|
||||||
Service <em>{{ service_name }}</em> is not running.
|
Service <em>{{ service_name }}</em> is not running.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block internal_zone %}
|
{% block internal_zone %}
|
||||||
{% include "internal-zone.html" %}
|
{% include "internal-zone.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block port_forwarding_info %}
|
{% block port_forwarding_info %}
|
||||||
{% include "port-forwarding-info.html" with service_name=app_info.name %}
|
{% include "port-forwarding-info.html" with service_name=app_info.name %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block configuration %}
|
{% block configuration %}
|
||||||
{% if form %}
|
{% if form %}
|
||||||
<h3>{% trans "Configuration" %}</h3>
|
<h3>{% trans "Configuration" %}</h3>
|
||||||
|
|
||||||
<form id="app-form" class="form form-configuration" method="post">
|
<form id="app-form" class="form form-configuration" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{{ form|bootstrap }}
|
{{ form|bootstrap }}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-primary"
|
<input type="submit" class="btn btn-primary"
|
||||||
value="{% trans "Update setup" %}"/>
|
value="{% trans "Update setup" %}"/>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_content %}
|
{% block extra_content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% else %}
|
||||||
|
{% include "operations.html" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -256,6 +256,10 @@ class AppView(FormView):
|
|||||||
context['has_diagnostics'] = self.app.has_diagnostics()
|
context['has_diagnostics'] = self.app.has_diagnostics()
|
||||||
context['port_forwarding_info'] = get_port_forwarding_info(self.app)
|
context['port_forwarding_info'] = get_port_forwarding_info(self.app)
|
||||||
context['app_enable_disable_form'] = self.get_enable_disable_form()
|
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
|
from plinth.modules.firewall.components import Firewall
|
||||||
context['firewall'] = self.app.get_components_of_type(Firewall)
|
context['firewall'] = self.app.get_components_of_type(Firewall)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user