Skip to content

Commit

Permalink
Add announcer for async path list creations
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmcorvidae committed Apr 9, 2024
1 parent f040498 commit 2a9b1cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/static/locales/en/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions src/components/data/PathListAutomation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 }) => {
Expand Down

0 comments on commit 2a9b1cf

Please sign in to comment.