From 8179e94d64f90770502be89752ec069606acdaab Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa
Date: Fri, 21 Aug 2015 20:10:14 +0530
Subject: [PATCH] owncloud: Implement diagnostics
---
plinth/modules/owncloud/__init__.py | 12 ++++++++++++
plinth/modules/owncloud/templates/owncloud.html | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/plinth/modules/owncloud/__init__.py b/plinth/modules/owncloud/__init__.py
index 4a29d7bfb..e2225072c 100644
--- a/plinth/modules/owncloud/__init__.py
+++ b/plinth/modules/owncloud/__init__.py
@@ -22,6 +22,18 @@ Plinth module to configure ownCloud
from . import owncloud
from .owncloud import init
+from plinth import action_utils
+
__all__ = ['owncloud', 'init']
depends = ['plinth.modules.apps']
+
+
+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/owncloud/templates/owncloud.html b/plinth/modules/owncloud/templates/owncloud.html
index 2a6836f2d..035474ce5 100644
--- a/plinth/modules/owncloud/templates/owncloud.html
+++ b/plinth/modules/owncloud/templates/owncloud.html
@@ -37,6 +37,10 @@
Visit this URL to set up the initial administration account for
ownCloud.
+ {% include "diagnostics_button.html" with module="owncloud" %}
+
+ Configuration
+