diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-04 14:17:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 14:17:28 +0200 |
commit | 30ca3b70edea01dea092e495db1acf85183bfb80 (patch) | |
tree | 0261443100bc8867f600d2668d1c93d21268ffce /apps/files_external/js/settings.js | |
parent | c04a494ea7c960c0a6b85c0826f02f35a07c8886 (diff) | |
parent | 0326c2c54fe26dc742ebe00c66bd0363e083712d (diff) | |
download | nextcloud-server-30ca3b70edea01dea092e495db1acf85183bfb80.tar.gz nextcloud-server-30ca3b70edea01dea092e495db1acf85183bfb80.zip |
Merge pull request #6196 from nextcloud/downstream-26539-2
Handle invalid ext storage backend to keep mount point visible
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r-- | apps/files_external/js/settings.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 112676b8c27..30074ab179a 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -805,6 +805,13 @@ MountConfigListView.prototype = _.extend({ var mountPoint = storageConfig.mountPoint; var backend = this._allBackends[storageConfig.backend]; + if (!backend) { + backend = { + name: 'Unknown: ' + storageConfig.backend, + invalid: true + }; + } + // FIXME: Replace with a proper Handlebar template var $tr = this.$el.find('tr#addMountPoint'); this.$el.find('tbody').append($tr.clone()); @@ -829,6 +836,13 @@ MountConfigListView.prototype = _.extend({ $tr.addClass(backend.identifier); $tr.find('.backend').data('identifier', backend.identifier); + if (backend.invalid) { + $tr.find('[name=mountPoint]').prop('disabled', true); + $tr.find('.applicable,.mountOptionsToggle').empty(); + this.updateStatus($tr, false, 'Unknown backend: ' + backend.name); + return $tr; + } + var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>'); var neededVisibility = (this._isPersonal) ? StorageConfig.Visibility.PERSONAL : StorageConfig.Visibility.ADMIN; $.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) { |