mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-17 11:10:23 +00:00
diagnostics: Disable button if app/service is not running
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
fb52c059c9
commit
249403a6dd
@ -23,6 +23,11 @@
|
||||
action="{% url 'diagnostics:module' module %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<input type="submit" class="btn btn-default"
|
||||
value="{% trans "Run Diagnostics" %}"/>
|
||||
{% if enabled %}
|
||||
<input type="submit" class="btn btn-default"
|
||||
value="{% trans "Run Diagnostics" %}"/>
|
||||
{% else %}
|
||||
<input type="submit" class="btn btn-default"
|
||||
value="{% trans "Run Diagnostics" %}" disabled="disabled"/>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "diagnostics_button.html" with module="letsencrypt" %}
|
||||
{% include "diagnostics_button.html" with module="letsencrypt" enabled=True %}
|
||||
{% else %}
|
||||
{% blocktrans trimmed %}
|
||||
No domains have been configured. Configure domains to be able to
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
{% include "connections_diagram.html" %}
|
||||
|
||||
{% include "diagnostics_button.html" with module="networks" %}
|
||||
{% include "diagnostics_button.html" with module="networks" enabled=True %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% include "diagnostics_button.html" with module="openvpn" %}
|
||||
{% include "diagnostics_button.html" with module="openvpn" enabled=status.is_running %}
|
||||
|
||||
<h3>{% trans "Configuration" %}</h3>
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% include "diagnostics_button.html" with module="tor" %}
|
||||
{% include "diagnostics_button.html" with module="tor" enabled=status.is_running %}
|
||||
|
||||
{% if status.hs_enabled %}
|
||||
<div class="row">
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% include "diagnostics_button.html" with module="users" %}
|
||||
{% include "diagnostics_button.html" with module="users" enabled=True %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
{% block diagnostics %}
|
||||
{% if diagnostics_module_name %}
|
||||
{% include "diagnostics_button.html" with module=diagnostics_module_name %}
|
||||
{% include "diagnostics_button.html" with module=diagnostics_module_name enabled=service.is_running %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user