summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-03 12:48:17 +0100
committerVincent Petry <pvince81@owncloud.com>2014-09-23 16:58:19 +0200
commit2013404e0a5ccb4d0fce73ee3ff6af2ece0a1c70 (patch)
treea30b6888a48bd5c6f2fef5f5eebba96b35bf0c89 /settings/js
parentfbcd80ac083ca595d944564cab604405445b5571 (diff)
downloadnextcloud-server-2013404e0a5ccb4d0fce73ee3ff6af2ece0a1c70.tar.gz
nextcloud-server-2013404e0a5ccb4d0fce73ee3ff6af2ece0a1c70.zip
Moved WebDAV and internet checks to client side JS
- Added setup checks in JavaScript - Moved isWebDAVWorking to JS using SetupChecks - Moved internet connection checks to an ajax call that goes through the server Backport of e65ceb08fc4a56d0fb9e4be5d51ba04168cbb59a from master
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/admin.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 95be13d2288..d8cdae9d11b 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -122,4 +122,25 @@ $(document).ready(function(){
$('#shareapiExcludeGroups').change(function() {
$("#selectExcludedGroups").toggleClass('hidden', !this.checked);
});
+
+ // run setup checks then gather error messages
+ $.when(
+ OC.SetupChecks.checkWebDAV(),
+ OC.SetupChecks.checkSetup()
+ ).then(function(check1, check2) {
+ var errors = [].concat(check1, check2);
+ var $el = $('#postsetupchecks');
+ var $errorsEl;
+ $el.find('.loading').addClass('hidden');
+ if (errors.length === 0) {
+ $el.find('.success').removeClass('hidden');
+ } else {
+ $errorsEl = $el.find('.errors');
+ for (var i = 0; i < errors.length; i++ ) {
+ $errorsEl.append('<div class="setupwarning">' + errors[i] + '</div>');
+ }
+ $errorsEl.removeClass('hidden');
+ $el.find('.hint').removeClass('hidden');
+ }
+ });
});