ikiwiki: Implement diagnostics

This commit is contained in:
Sunil Mohan Adapa 2015-08-21 20:09:43 +05:30 committed by James Valleroy
parent 20d8c56aa0
commit 3f9bcafeeb
2 changed files with 14 additions and 0 deletions

View File

@ -47,3 +47,13 @@ def init():
def is_enabled():
"""Return whether the module is enabled."""
return action_utils.webserver_is_enabled('ikiwiki-plinth')
def diagnose():
"""Run diagnostics and return the results."""
results = []
results.extend(action_utils.diagnose_url_on_all(
'https://{host}/ikiwiki', extra_options=['--no-check-certificate']))
return results

View File

@ -25,6 +25,10 @@
<p>When enabled, the blogs and wikis will be available
from <a href="/ikiwiki">/ikiwiki</a>.</p>
{% include "diagnostics_button.html" with module="ikiwiki" %}
<h3>Configuration</h3>
<form class="form" method="post">
{% csrf_token %}