15557: Navigate to new process after copying for re-run
authorStephen Smith <stephen@curii.com>
Thu, 2 Feb 2023 21:24:39 +0000 (16:24 -0500)
committerStephen Smith <stephen@curii.com>
Thu, 2 Feb 2023 21:24:39 +0000 (16:24 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/processes/process-copy-actions.ts
src/store/workbench/workbench-actions.ts

index caabdca70c943ce422575cd94fd30bcdf6bdd623..3c55a9adddb2946f908d8ac43e4594779956aba1 100644 (file)
@@ -54,7 +54,7 @@ export const copyProcess = (resource: CopyFormDialogData) =>
                 schedulingParameters,
                 useExisting,
             } = process;
-            await services.containerRequestService.create({
+            const newProcess = await services.containerRequestService.create({
                 command,
                 containerCountMax,
                 containerImage,
@@ -78,7 +78,7 @@ export const copyProcess = (resource: CopyFormDialogData) =>
                 useExisting,
             });
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME }));
-            return process;
+            return newProcess;
         } catch (e) {
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME }));
             throw new Error('Could not copy the process.');
index 0ad3fb8e55e496e7b3e9274ee1fd47935842ae73..da5b847bbe2418d8a118cfbe4c2d07432b473937 100644 (file)
@@ -662,6 +662,7 @@ export const copyProcess =
           kind: SnackbarKind.SUCCESS,
         })
       );
+      dispatch<any>(navigateTo(process.uuid));
     } catch (e) {
       dispatch(
         snackbarActions.OPEN_SNACKBAR({