[ARVADOS-WORKBENCH2] created: 2.4.0-55-g66adcf8a

Git user git at public.arvados.org
Tue May 17 21:23:53 UTC 2022


        at  66adcf8ab86e764a8829fbd604e27df53d6f24a1 (commit)


commit 66adcf8ab86e764a8829fbd604e27df53d6f24a1
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue May 17 17:17:41 2022 -0400

    19069: Workflow launching improvements.
    
    * Hide the broken, mostly redundant workflow panel from the left tree
    (can still launch workflows from "+NEW -> Run a process")
    
    * Hide unsupported "presets" element
    
    * Don't require #main to be a workflow
    
    * Change "workflowUuid" property to "template_uuid" property for
    consistency with existing usage in workbench 1 and arvados-cwl-runner
    
    * Give process a default name
    
    * Assign default output collection name "Output of {name}"
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/models/workflow.ts b/src/models/workflow.ts
index ad84bd9e..00dfaa10 100644
--- a/src/models/workflow.ts
+++ b/src/models/workflow.ts
@@ -139,7 +139,7 @@ export const parseWorkflowDefinition = (workflow: WorkflowResource): WorkflowRes
 
 export const getWorkflow = (workflowDefinition: WorkflowResourceDefinition) => {
     if (!workflowDefinition.$graph) { return undefined; }
-    const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
+    const mainWorkflow = workflowDefinition.$graph.find(item => item.id === '#main');
     return mainWorkflow
         ? mainWorkflow
         : undefined;
diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts
index 1116949a..bc7f94b0 100644
--- a/src/store/context-menu/context-menu-actions.ts
+++ b/src/store/context-menu/context-menu-actions.ts
@@ -189,7 +189,7 @@ export const openProcessContextMenu = (event: React.MouseEvent<HTMLElement>, pro
                 name: res.name,
                 description: res.description,
                 outputUuid: res.outputUuid || '',
-                workflowUuid: res.properties.workflowUuid || '',
+                workflowUuid: res.properties.template_uuid || '',
                 menuKind: ContextMenuKind.PROCESS_RESOURCE
             }));
         }
diff --git a/src/store/run-process-panel/run-process-panel-actions.test.ts b/src/store/run-process-panel/run-process-panel-actions.test.ts
index 745be88f..0bbde9af 100644
--- a/src/store/run-process-panel/run-process-panel-actions.test.ts
+++ b/src/store/run-process-panel/run-process-panel-actions.test.ts
@@ -122,7 +122,7 @@ describe("run-process-panel-actions", () => {
                 priority: 1,
                 properties: {
                     workflowName: "revsort.cwl",
-                    workflowUuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt",
+                    template_uuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt",
                 },
                 runtimeConstraints: {
                     API: true,
diff --git a/src/store/run-process-panel/run-process-panel-actions.ts b/src/store/run-process-panel/run-process-panel-actions.ts
index adb5ade7..61597bb7 100644
--- a/src/store/run-process-panel/run-process-panel-actions.ts
+++ b/src/store/run-process-panel/run-process-panel-actions.ts
@@ -103,11 +103,13 @@ export const setWorkflow = (workflow: WorkflowResource, isWorkflowChanged = true
             dispatch(runProcessPanelActions.SET_STEP_CHANGED(false));
             dispatch(runProcessPanelActions.SET_SELECTED_WORKFLOW(workflow));
             dispatch<any>(loadPresets(workflow.uuid));
+            dispatch(initialize(RUN_PROCESS_BASIC_FORM, { name: workflow.name }));
             dispatch(initialize(RUN_PROCESS_ADVANCED_FORM, advancedFormValues));
         }
         if (!isWorkflowChanged) {
             dispatch(runProcessPanelActions.SET_SELECTED_WORKFLOW(workflow));
             dispatch<any>(loadPresets(workflow.uuid));
+            dispatch(initialize(RUN_PROCESS_BASIC_FORM, { name: workflow.name }));
             dispatch(initialize(RUN_PROCESS_ADVANCED_FORM, advancedFormValues));
         }
     };
@@ -173,9 +175,9 @@ export const runProcess = async (dispatch: Dispatch<any>, getState: () => RootSt
             ],
             outputPath: '/var/spool/cwl',
             priority: 1,
-            outputName: advancedForm[OUTPUT_FIELD] ? advancedForm[OUTPUT_FIELD] : undefined,
+            outputName: advancedForm[OUTPUT_FIELD] ? advancedForm[OUTPUT_FIELD] : `Output from ${basicForm.name}`,
             properties: {
-                workflowUuid: selectedWorkflow.uuid,
+                template_uuid: selectedWorkflow.uuid,
                 workflowName: selectedWorkflow.name
             },
             useExisting: false
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 895fe79c..58f7d82d 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -52,7 +52,7 @@ let SIDE_PANEL_CATEGORIES: string[] = [
     SidePanelTreeCategory.SHARED_WITH_ME,
     SidePanelTreeCategory.PUBLIC_FAVORITES,
     SidePanelTreeCategory.FAVORITES,
-    SidePanelTreeCategory.WORKFLOWS,
+    //    SidePanelTreeCategory.WORKFLOWS,
     SidePanelTreeCategory.GROUPS,
     SidePanelTreeCategory.ALL_PROCESSES,
     SidePanelTreeCategory.TRASH
diff --git a/src/views/process-panel/process-details-attributes.tsx b/src/views/process-panel/process-details-attributes.tsx
index d0e593d5..99a4404c 100644
--- a/src/views/process-panel/process-details-attributes.tsx
+++ b/src/views/process-panel/process-details-attributes.tsx
@@ -74,7 +74,7 @@ export const ProcessDetailsAttributes = withStyles(styles, { withTheme: true })(
                 </Grid>
                 <Grid item xs={12} md={mdSize}>
                     <DetailsAttribute label='Docker Image locator'
-                    linkToUuid={containerRequest.containerImage} value={containerRequest.containerImage} />
+                        linkToUuid={containerRequest.containerImage} value={containerRequest.containerImage} />
                 </Grid>
                 <Grid item xs={12} md={mdSize}>
                     <DetailsAttribute
@@ -85,7 +85,7 @@ export const ProcessDetailsAttributes = withStyles(styles, { withTheme: true })(
                     <DetailsAttribute label='Container UUID' value={containerRequest.containerUuid} />
                 </Grid>
                 {!props.hideProcessPanelRedundantFields && <Grid item xs={12} md={mdSize}>
-                    <DetailsAttribute label='Status' value={getProcessStatus({containerRequest, container})} />
+                    <DetailsAttribute label='Status' value={getProcessStatus({ containerRequest, container })} />
                 </Grid>}
                 <Grid item xs={12} md={mdSize}>
                     <DetailsAttribute label='Created at' value={formatDate(containerRequest.createdAt)} />
@@ -112,13 +112,13 @@ export const ProcessDetailsAttributes = withStyles(styles, { withTheme: true })(
                         <DetailsAttribute classLabel={classes.link} label='Inputs' />
                     </span>
                 </Grid>
-                {containerRequest.properties.workflowUuid &&
-                <Grid item xs={12} md={mdSize}>
-                    <span onClick={() => props.openWorkflow(containerRequest.properties.workflowUuid)}>
-                        <DetailsAttribute classValue={classes.link}
-                            label='Workflow' value={containerRequest.properties.workflowName} />
-                    </span>
-                </Grid>}
+                {containerRequest.properties.template_uuid &&
+                    <Grid item xs={12} md={mdSize}>
+                        <span onClick={() => props.openWorkflow(containerRequest.properties.template_uuid)}>
+                            <DetailsAttribute classValue={classes.link}
+                                label='Workflow' value={containerRequest.properties.workflowName} />
+                        </span>
+                    </Grid>}
                 <Grid item xs={12} md={mdSize}>
                     <DetailsAttribute label='Priority' value={containerRequest.priority} />
                 </Grid>
@@ -128,13 +128,13 @@ export const ProcessDetailsAttributes = withStyles(styles, { withTheme: true })(
                 */}
                 <Grid item xs={12} md={12}>
                     <DetailsAttribute label='Properties' />
-                    { Object.keys(containerRequest.properties).length > 0
+                    {Object.keys(containerRequest.properties).length > 0
                         ? Object.keys(containerRequest.properties).map(k =>
-                                Array.isArray(containerRequest.properties[k])
+                            Array.isArray(containerRequest.properties[k])
                                 ? containerRequest.properties[k].map((v: string) =>
                                     getPropertyChip(k, v, undefined, classes.propertyTag))
                                 : getPropertyChip(k, containerRequest.properties[k], undefined, classes.propertyTag))
-                        : <div>No properties</div> }
+                        : <div>No properties</div>}
                 </Grid>
             </Grid>;
         }
diff --git a/src/views/run-process-panel/run-process-second-step.tsx b/src/views/run-process-panel/run-process-second-step.tsx
index 08cf4e6c..ca30ce5f 100644
--- a/src/views/run-process-panel/run-process-second-step.tsx
+++ b/src/views/run-process-panel/run-process-second-step.tsx
@@ -58,14 +58,14 @@ export const RunProcessSecondStepForm = connect(mapStateToProps, { onPresetChang
     ({ inputs, workflow, selectedPreset, presets, onPresetChange, valid, goBack, runProcess }: RunProcessSecondStepFormProps) =>
         <Grid container spacing={16} data-cy="new-process-panel">
             <Grid item xs={12}>
-                <Grid container spacing={32}>
+                {/* <Grid container spacing={32}>
                     <Grid item xs={12} md={6}>
-                        {workflow && selectedPreset && presets &&
-                            < WorkflowPresetSelect
-                                {...{ workflow, selectedPreset, presets, onChange: onPresetChange }} />
-                        }
+                    {workflow && selectedPreset && presets &&
+                    < WorkflowPresetSelect
+                    {...{ workflow, selectedPreset, presets, onChange: onPresetChange }} />
+                    }
                     </Grid>
-                </Grid>
+                    </Grid> */}
                 <RunProcessBasicForm />
                 <RunProcessInputsForm inputs={inputs} />
                 <RunProcessAdvancedForm />

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list