mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +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 "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 %}
|
||||
<div id='service-not-running' role="alert"
|
||||
class="alert alert-danger {{ is_enabled|yesno:',d-none' }}">
|
||||
{% blocktrans trimmed with service_name=app_info.name %}
|
||||
Service <em>{{ service_name }}</em> is not running.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block status %}
|
||||
{% if is_running is not None and not is_running %}
|
||||
<div id='service-not-running' role="alert"
|
||||
class="alert alert-danger {{ is_enabled|yesno:',d-none' }}">
|
||||
{% blocktrans trimmed with service_name=app_info.name %}
|
||||
Service <em>{{ service_name }}</em> is not running.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% 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 %}
|
||||
<h3>{% trans "Configuration" %}</h3>
|
||||
{% block configuration %}
|
||||
{% if form %}
|
||||
<h3>{% trans "Configuration" %}</h3>
|
||||
|
||||
<form id="app-form" class="form form-configuration" method="post">
|
||||
{% csrf_token %}
|
||||
<form id="app-form" class="form form-configuration" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form|bootstrap }}
|
||||
{{ form|bootstrap }}
|
||||
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="{% trans "Update setup" %}"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="{% trans "Update setup" %}"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_content %}
|
||||
{% endblock %}
|
||||
{% block extra_content %}
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% include "operations.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user