summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-12 19:51:09 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-19 10:08:23 +0100
commitb6eb952ac61326a15108820b0dd0a1712f00dfdb (patch)
tree73457afc836bfac5a9af9364210e38b5667eea87 /apps/files_external/js
parentc592e24c871f0f6a8d688c5c93e769b1505e4b6d (diff)
downloadnextcloud-server-b6eb952ac61326a15108820b0dd0a1712f00dfdb.tar.gz
nextcloud-server-b6eb952ac61326a15108820b0dd0a1712f00dfdb.zip
Propagate auth mechanism/backend failures to filesystem layer
Failure to prepare the storage during backend or auth mechanism manipulation will throw an InsufficientDataForMeaningfulAnswerException, which is propagated to StorageNotAvailableException in the filesystem layer via the FailedStorage helper class. When a storage is unavailable not due to failure, but due to insufficient data being available, a special 'indeterminate' status is returned to the configuration UI.
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/settings.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 7288f90fa77..c15f36d8bd7 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -191,7 +191,8 @@ var StorageConfig = function(id) {
StorageConfig.Status = {
IN_PROGRESS: -1,
SUCCESS: 0,
- ERROR: 1
+ ERROR: 1,
+ INDETERMINATE: 2
};
/**
* @memberof OCA.External.Settings
@@ -946,7 +947,7 @@ MountConfigListView.prototype = {
*/
updateStatus: function($tr, status) {
var $statusSpan = $tr.find('.status span');
- $statusSpan.removeClass('success error loading-small');
+ $statusSpan.removeClass('loading-small success indeterminate error');
switch (status) {
case StorageConfig.Status.IN_PROGRESS:
$statusSpan.addClass('loading-small');
@@ -954,6 +955,9 @@ MountConfigListView.prototype = {
case StorageConfig.Status.SUCCESS:
$statusSpan.addClass('success');
break;
+ case StorageConfig.Status.INDETERMINATE:
+ $statusSpan.addClass('indeterminate');
+ break;
default:
$statusSpan.addClass('error');
}