mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
deluge: Implement diagnostics
This commit is contained in:
parent
6b7de75b62
commit
20d8c56aa0
@ -53,3 +53,15 @@ def is_enabled():
|
|||||||
def is_running():
|
def is_running():
|
||||||
"""Return whether the service is running."""
|
"""Return whether the service is running."""
|
||||||
return action_utils.service_is_running('deluge-web')
|
return action_utils.service_is_running('deluge-web')
|
||||||
|
|
||||||
|
|
||||||
|
def diagnose():
|
||||||
|
"""Run diagnostics and return the results."""
|
||||||
|
results = []
|
||||||
|
|
||||||
|
results.append(action_utils.diagnose_port_listening(8112, 'tcp4'))
|
||||||
|
results.append(action_utils.diagnose_port_listening(8112, 'tcp6'))
|
||||||
|
results.extend(action_utils.diagnose_url_on_all(
|
||||||
|
'https://{host}/deluge', extra_options=['--no-check-certificate']))
|
||||||
|
|
||||||
|
return results
|
||||||
|
|||||||
@ -31,6 +31,17 @@
|
|||||||
password is 'deluge', but you should log in and change it immediately after
|
password is 'deluge', but you should log in and change it immediately after
|
||||||
enabling this service.</p>
|
enabling this service.</p>
|
||||||
|
|
||||||
|
<h3>Status</h3>
|
||||||
|
|
||||||
|
<p class="running-status-parent">
|
||||||
|
{% if status.is_running %}
|
||||||
|
<span class="running-status active"></span> deluge-web is running
|
||||||
|
{% else %}
|
||||||
|
<span class="running-status inactive"></span> deluge-web is not running
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
{% include "diagnostics_button.html" with module="deluge" %}
|
||||||
|
|
||||||
<h3>Configuration</h3>
|
<h3>Configuration</h3>
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
@ -41,16 +52,4 @@
|
|||||||
<input type="submit" class="btn btn-primary" value="Update setup"/>
|
<input type="submit" class="btn btn-primary" value="Update setup"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if status.enabled %}
|
|
||||||
<h3>Status</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{% if status.is_running %}
|
|
||||||
<span class="running-status active"></span> deluge-web is running
|
|
||||||
{% else %}
|
|
||||||
<span class="running-status inactive"></span> deluge-web is not running
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user