From 41a9cf27e6045a8fcb379b0bb69b6c509f951580 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Mon, 8 Apr 2024 12:22:27 -0700 Subject: [PATCH 1/3] Rudimentary CORE-1183 fix --- src/components/data/toolbar/DataDotMenu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/data/toolbar/DataDotMenu.js b/src/components/data/toolbar/DataDotMenu.js index 2c1c84e52..651dd2487 100644 --- a/src/components/data/toolbar/DataDotMenu.js +++ b/src/components/data/toolbar/DataDotMenu.js @@ -458,7 +458,9 @@ function DataDotMenu(props) { onClose={() => setPathListDlgOpen(false)} onCreatePathList={(id, path) => { setPathListDlgOpen(false); - routeToFile(id, path); + if (id && path) { + routeToFile(id, path); + } }} onCancel={() => setPathListDlgOpen(false)} startingPath={path} From f04049801437fbdbff5b64c1759a4bc7edaf8411 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Tue, 9 Apr 2024 11:27:34 -0700 Subject: [PATCH 2/3] Guard against undefined info when passing info to onCreatePathList callback --- src/components/data/PathListAutomation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/data/PathListAutomation.js b/src/components/data/PathListAutomation.js index 789d28aeb..5a3036cfe 100644 --- a/src/components/data/PathListAutomation.js +++ b/src/components/data/PathListAutomation.js @@ -100,7 +100,7 @@ export default function PathListAutomation(props) { { onSuccess: (data) => { setCreatePathListError(null); - onCreatePathList(data.file.id, data.file.path); + onCreatePathList(data?.file?.id, data?.file?.path); }, onError: (error, { onError }) => { let errMsg = null; From 2a9b1cf620c289bf5944348fae7f428d55be3a6a Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Tue, 9 Apr 2024 11:38:00 -0700 Subject: [PATCH 3/3] Add announcer for async path list creations --- public/static/locales/en/data.json | 1 + src/components/data/PathListAutomation.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/public/static/locales/en/data.json b/public/static/locales/en/data.json index 762074cad..ef3906abd 100644 --- a/public/static/locales/en/data.json +++ b/public/static/locales/en/data.json @@ -9,6 +9,7 @@ "asyncDataDeletePending": "Deletion in progress. You will be notified when completed.", "asyncDataEmptyTrashPending": "Emptying trash. You will be notified when completed.", "asyncMovePending": "Move in progress. You will be notified when completed.", + "asyncPathListPending": "Path List creation in progress. You will be notified when completed.", "asyncRenamePending": "Rename in progress. You will be notified when completed.", "asyncDataRestorePending": "Restoring requested item(s). You will be notified when completed.", "automateCreateHtPathList": "Generate HT analysis path list", diff --git a/src/components/data/PathListAutomation.js b/src/components/data/PathListAutomation.js index 5a3036cfe..489b2c255 100644 --- a/src/components/data/PathListAutomation.js +++ b/src/components/data/PathListAutomation.js @@ -16,6 +16,9 @@ import buildID from "components/utils/DebugIDUtil"; import FormTextField from "components/forms/FormTextField"; import FormSwitch from "components/forms/FormSwitch"; +import { announce } from "components/announcer/CyVerseAnnouncer"; +import { INFO } from "components/announcer/AnnouncerConstants"; + import SaveAsField from "./SaveAsField"; import ids from "./ids"; import { validateDiskResourceName } from "./utils"; @@ -100,6 +103,12 @@ export default function PathListAutomation(props) { { onSuccess: (data) => { setCreatePathListError(null); + if (data.async_task_id) { + announce({ + text: t("asyncPathListPending"), + variant: INFO, + }); + } onCreatePathList(data?.file?.id, data?.file?.path); }, onError: (error, { onError }) => {