15557: Sort copied process fields
authorStephen Smith <stephen@curii.com>
Mon, 23 Jan 2023 21:18:49 +0000 (16:18 -0500)
committerStephen Smith <stephen@curii.com>
Mon, 23 Jan 2023 21:18:49 +0000 (16:18 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

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

index 57e8539778bd8d6dbbbfe6651a65eb5fe6e55bb6..4dc90be4a6186e87f23a7cb9f41f95f0ab17902d 100644 (file)
@@ -34,12 +34,52 @@ export const copyProcess = (resource: CopyFormDialogData) =>
         dispatch(startSubmit(PROCESS_COPY_FORM_NAME));
         try {
             const process = await services.containerRequestService.get(resource.uuid);
-            const { kind, containerImage, outputPath, outputName, containerCountMax, command, properties, requestingContainerUuid, mounts, runtimeConstraints, schedulingParameters, environment, cwd, outputTtl, priority, expiresAt, useExisting, filters } = process;
-            await services.containerRequestService.create({ command, containerImage, outputPath, ownerUuid: resource.ownerUuid, name: resource.name, kind, outputName, containerCountMax, properties, requestingContainerUuid, mounts, runtimeConstraints, schedulingParameters, environment, cwd, outputTtl, priority, expiresAt, useExisting, filters });
+            const {
+                command,
+                containerCountMax,
+                containerImage,
+                cwd,
+                environment,
+                expiresAt,
+                filters,
+                kind,
+                mounts,
+                outputName,
+                outputPath,
+                outputTtl,
+                priority,
+                properties,
+                requestingContainerUuid,
+                runtimeConstraints,
+                schedulingParameters,
+                useExisting,
+            } = process;
+            await services.containerRequestService.create({
+                command,
+                containerCountMax,
+                containerImage,
+                cwd,
+                environment,
+                expiresAt,
+                filters,
+                kind,
+                mounts,
+                name: resource.name,
+                outputName,
+                outputPath,
+                outputTtl,
+                ownerUuid: resource.ownerUuid,
+                priority,
+                properties,
+                requestingContainerUuid,
+                runtimeConstraints,
+                schedulingParameters,
+                useExisting,
+            });
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME }));
             return process;
         } catch (e) {
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME }));
             throw new Error('Could not copy the process.');
         }
-    };
\ No newline at end of file
+    };