From f81f53350f87407c00514e3157d47d6ee6ad1d9d Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa
Date: Fri, 21 Aug 2015 20:10:35 +0530
Subject: [PATCH] roundcube: Implement diagnostics
---
plinth/modules/roundcube/__init__.py | 10 ++++++++++
plinth/modules/roundcube/templates/roundcube.html | 1 +
2 files changed, 11 insertions(+)
diff --git a/plinth/modules/roundcube/__init__.py b/plinth/modules/roundcube/__init__.py
index 5c1ef8cf0..7c5295154 100644
--- a/plinth/modules/roundcube/__init__.py
+++ b/plinth/modules/roundcube/__init__.py
@@ -39,3 +39,13 @@ def init():
def is_enabled():
"""Return whether the module is enabled."""
return action_utils.webserver_is_enabled('roundcube')
+
+
+def diagnose():
+ """Run diagnostics and return the results."""
+ results = []
+
+ results.extend(action_utils.diagnose_url_on_all(
+ 'https://{host}/roundcube', extra_options=['--no-check-certificate']))
+
+ return results
diff --git a/plinth/modules/roundcube/templates/roundcube.html b/plinth/modules/roundcube/templates/roundcube.html
index 7b47dbaab..28e2a2088 100644
--- a/plinth/modules/roundcube/templates/roundcube.html
+++ b/plinth/modules/roundcube/templates/roundcube.html
@@ -43,6 +43,7 @@
(https://www.google.com/settings/security/lesssecureapps).
+{% include "diagnostics_button.html" with module="roundcube" %}
Configuration