diff options
author | Robin Appelman <robin@icewind.nl> | 2022-02-28 17:02:17 +0100 |
---|---|---|
committer | Robin Appelman (Rebase PR Action) <robin@icewind.nl> | 2022-03-17 16:29:35 +0000 |
commit | 7933de00f3d03d4ec6d087edfc2c14cd0c65feaa (patch) | |
tree | 0f3a77ccbc71db48434a8e1d0a5f57b73583df44 /apps/files_external | |
parent | 4601f119867b87ab0b51c2e10ef4391145dc8661 (diff) | |
download | nextcloud-server-7933de00f3d03d4ec6d087edfc2c14cd0c65feaa.tar.gz nextcloud-server-7933de00f3d03d4ec6d087edfc2c14cd0c65feaa.zip |
don't recheck config automatically when there are a large number of storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 6bef914acf8..01c2c3bc953 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -989,15 +989,21 @@ MountConfigListView.prototype = _.extend({ url: OC.generateUrl(url), contentType: 'application/json', success: function(result) { + result = Object.values(result); var onCompletion = jQuery.Deferred(); var $rows = $(); - Object.values(result).forEach(function(storageParams) { + result.forEach(function(storageParams) { storageParams.mountPoint = (storageParams.mountPoint === '/')? '/' : storageParams.mountPoint.substr(1); // trim leading slash var storageConfig = new self._storageConfigClass(); _.extend(storageConfig, storageParams); var $tr = self.newStorage(storageConfig, onCompletion, true); - self.recheckStorageConfig($tr); + // don't recheck config automatically when there are a large number of storages + if (result.length < 20) { + self.recheckStorageConfig($tr); + } else { + self.updateStatus($tr, StorageConfig.Status.INDETERMINATE, t('files_external', 'Automatic status checking is disabled due to the large number of configured storages, click to check status')); + } $rows = $rows.add($tr); }); addSelect2($rows.find('.applicableUsers'), this._userListLimit); |