From b358e0a97306eafcffd0105bb4f823499c35ab66 Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Thu, 14 Jan 2021 18:02:47 +0100 Subject: [PATCH 1/2] fix #10982 --- .../components/LibraryFolder/TopToolbar/FolderTopBar.vue | 6 +++--- .../src/components/LibraryFolder/TopToolbar/add-datasets.js | 1 + lib/galaxy/managers/configuration.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/LibraryFolder/TopToolbar/FolderTopBar.vue b/client/src/components/LibraryFolder/TopToolbar/FolderTopBar.vue index afb005d62e8..cff314c322d 100644 --- a/client/src/components/LibraryFolder/TopToolbar/FolderTopBar.vue +++ b/client/src/components/LibraryFolder/TopToolbar/FolderTopBar.vue @@ -53,7 +53,7 @@ from History @@ -209,7 +209,7 @@ export default { data() { return { is_admin: false, - user_library_import_dir: false, + user_library_import_dir_available: false, library_import_dir: false, allow_library_path_paste: false, list_genomes: [], @@ -230,7 +230,7 @@ export default { created() { const Galaxy = getGalaxyInstance(); this.is_admin = Galaxy.user.attributes.is_admin; - this.user_library_import_dir = Galaxy.config.user_library_import_dir; + this.user_library_import_dir_available = Galaxy.config.user_library_import_dir_available; this.library_import_dir = Galaxy.config.library_import_dir; this.allow_library_path_paste = Galaxy.config.allow_library_path_paste; diff --git a/client/src/components/LibraryFolder/TopToolbar/add-datasets.js b/client/src/components/LibraryFolder/TopToolbar/add-datasets.js index 7473509bbbe..9f3a2cc977c 100644 --- a/client/src/components/LibraryFolder/TopToolbar/add-datasets.js +++ b/client/src/components/LibraryFolder/TopToolbar/add-datasets.js @@ -411,6 +411,7 @@ var AddDatasets = Backbone.View.extend({ if (typeof response.responseJSON !== "undefined") { if (response.responseJSON.err_code === 404001) { Toast.warning(response.responseJSON.err_msg); + getGalaxyInstance().modal.hide(); } else { Toast.error(response.responseJSON.err_msg); } diff --git a/lib/galaxy/managers/configuration.py b/lib/galaxy/managers/configuration.py index 4e74f03fbfb..8abed845f46 100644 --- a/lib/galaxy/managers/configuration.py +++ b/lib/galaxy/managers/configuration.py @@ -109,6 +109,7 @@ class ConfigSerializer(base.ModelSerializer): 'select_type_workflow_threshold' : _use_config, 'file_sources_configured' : lambda config, key, **context: self.app.file_sources.custom_sources_configured, 'upload_from_form_button' : _use_config, + 'user_library_import_dir_available' : lambda config, key, **context: True if config.get('user_library_import_dir') else False, } From f24ee6388d6878b228b6528e634c76102d0209bf Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Thu, 14 Jan 2021 20:30:23 +0100 Subject: [PATCH 2/2] simplify getting user_library_import_dir Co-authored-by: Marius van den Beek --- lib/galaxy/managers/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/managers/configuration.py b/lib/galaxy/managers/configuration.py index 8abed845f46..f4680b14008 100644 --- a/lib/galaxy/managers/configuration.py +++ b/lib/galaxy/managers/configuration.py @@ -109,7 +109,7 @@ class ConfigSerializer(base.ModelSerializer): 'select_type_workflow_threshold' : _use_config, 'file_sources_configured' : lambda config, key, **context: self.app.file_sources.custom_sources_configured, 'upload_from_form_button' : _use_config, - 'user_library_import_dir_available' : lambda config, key, **context: True if config.get('user_library_import_dir') else False, + 'user_library_import_dir_available' : lambda config, key, **context: bool(config.get('user_library_import_dir')), }