From b40d37cf85c8a47dd9c7a9e6149f06e393a349a9 Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Tue, 11 Jan 2022 16:32:43 +0100 Subject: [PATCH 1/2] fix selection of datastore when uploading dataset --- .../admin/dataset/dataset_add_boss_view.js | 2 +- .../dataset/dataset_add_neuroglancer_view.js | 2 +- .../admin/dataset/dataset_components.js | 6 ++--- .../admin/dataset/dataset_upload_view.js | 24 +++++++++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/frontend/javascripts/admin/dataset/dataset_add_boss_view.js b/frontend/javascripts/admin/dataset/dataset_add_boss_view.js index 0a6957ee6a..e0cb52df7b 100644 --- a/frontend/javascripts/admin/dataset/dataset_add_boss_view.js +++ b/frontend/javascripts/admin/dataset/dataset_add_boss_view.js @@ -61,7 +61,7 @@ function DatasetAddBossView(props: Props) { }; trackAction("Add BossDB dataset"); - await addWkConnectDataset(formValues.datastore.url, datasetConfig); + await addWkConnectDataset(formValues.datastoreUrl, datasetConfig); Toast.success(messages["dataset.add_success"]); await Utils.sleep(3000); // wait for 3 seconds so the server can catch up / do its thing diff --git a/frontend/javascripts/admin/dataset/dataset_add_neuroglancer_view.js b/frontend/javascripts/admin/dataset/dataset_add_neuroglancer_view.js index 1dafa92316..b9a60e6464 100644 --- a/frontend/javascripts/admin/dataset/dataset_add_neuroglancer_view.js +++ b/frontend/javascripts/admin/dataset/dataset_add_neuroglancer_view.js @@ -92,7 +92,7 @@ function DatasetAddNeuroglancerView({ datastores, onAdded, activeUser }: Props) }; trackAction("Add Neuroglancer dataset"); - await addWkConnectDataset(formValues.datastore.url, datasetConfig); + await addWkConnectDataset(formValues.datastoreUrl, datasetConfig); Toast.success(messages["dataset.add_success"]); await Utils.sleep(3000); // wait for 3 seconds so the server can catch up / do its thing diff --git a/frontend/javascripts/admin/dataset/dataset_components.js b/frontend/javascripts/admin/dataset/dataset_components.js index 29ebe31cd7..b82f38b5e7 100644 --- a/frontend/javascripts/admin/dataset/dataset_components.js +++ b/frontend/javascripts/admin/dataset/dataset_components.js @@ -72,12 +72,12 @@ export function DatastoreFormItem({ }) { return (