[arvados-workbench2] updated: 2.5.0-115-gc872f6b8

git repository hosting git at public.arvados.org
Thu Mar 23 21:19:17 UTC 2023


Summary of changes:
 src/store/breadcrumbs/breadcrumbs-actions.ts       | 12 ++-----
 src/store/workbench/workbench-actions.ts           | 39 ++++++++++++++++------
 .../details-panel/workflow-details.tsx             |  2 +-
 src/views/process-panel/process-io-card.tsx        |  8 ++---
 4 files changed, 37 insertions(+), 24 deletions(-)

       via  c872f6b8420d83f2b378a274c412e3bc1865cd8c (commit)
      from  a54420c0b7b6566ecf9d0f04835e6d8a3ef165d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c872f6b8420d83f2b378a274c412e3bc1865cd8c
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Mar 23 17:19:01 2023 -0400

    19482: Breadcrumbs almost work right
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/store/breadcrumbs/breadcrumbs-actions.ts b/src/store/breadcrumbs/breadcrumbs-actions.ts
index 7d6f182d..a7e42510 100644
--- a/src/store/breadcrumbs/breadcrumbs-actions.ts
+++ b/src/store/breadcrumbs/breadcrumbs-actions.ts
@@ -142,6 +142,9 @@ export const setCategoryBreadcrumbs = (uuid: string, category: string) =>
                 breadcrumbs.push(resourceToBreadcrumb(parentProcessItem));
             }
             dispatch(setBreadcrumbs(breadcrumbs, processItem));
+        } else if (uuidKind === ResourceKind.WORKFLOW) {
+            const workflowItem = await services.workflowService.get(currentUuid);
+            dispatch(setBreadcrumbs(breadcrumbs, workflowItem));
         }
         dispatch(setBreadcrumbs(breadcrumbs));
     };
@@ -206,15 +209,6 @@ export const setProcessBreadcrumbs = (processUuid: string) =>
         }
     };
 
-export const setWorkflowBreadcrumbs = (workflowUuid: string) =>
-    (dispatch: Dispatch, getState: () => RootState) => {
-        const { resources } = getState();
-        const workflow = getResource<WorkflowResource>(workflowUuid)(resources);
-        if (workflow) {
-            dispatch<any>(setProjectBreadcrumbs(workflow.ownerUuid));
-        }
-    };
-
 export const setGroupsBreadcrumbs = () =>
     setBreadcrumbs([{
         label: SidePanelTreeCategory.GROUPS,
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index cd151113..f4b65e63 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -32,7 +32,6 @@ import {
     setGroupDetailsBreadcrumbs,
     setGroupsBreadcrumbs,
     setProcessBreadcrumbs,
-    setWorkflowBreadcrumbs,
     setSharedWithMeBreadcrumbs,
     setSidePanelBreadcrumbs,
     setTrashBreadcrumbs,
@@ -590,14 +589,30 @@ export const loadProcess = (uuid: string) =>
     });
 
 export const loadRegisteredWorkflow = (uuid: string) =>
-    handleFirstTimeLoad(async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const workflow = await services.workflowService.get(uuid);
-        if (workflow) {
-            dispatch<any>(updateResources([workflow]));
-            await dispatch<any>(
-                activateSidePanelTreeItem(workflow.ownerUuid)
-            );
-            dispatch<any>(setWorkflowBreadcrumbs(uuid));
+    handleFirstTimeLoad(async (dispatch: Dispatch,
+        getState: () => RootState,
+        services: ServiceRepository) => {
+
+        const userUuid = getUserUuid(getState());
+        if (userUuid) {
+            const match = await loadGroupContentsResource({
+                uuid,
+                userUuid,
+                services,
+            });
+            match({
+                OWNED: (workflow) => {
+                    dispatch(updateResources([workflow]));
+                    dispatch<any>(activateSidePanelTreeItem(workflow.ownerUuid));
+                    dispatch<any>(setSidePanelBreadcrumbs(workflow.ownerUuid));
+                },
+                SHARED: (workflow) => {
+                    dispatch<any>(updateResources([workflow]));
+                    dispatch<any>(activateSidePanelTreeItem(workflow.ownerUuid));
+                    dispatch<any>(setSharedWithMeBreadcrumbs(workflow.ownerUuid));
+                },
+                TRASHED: () => { }
+            });
         }
     });
 
@@ -889,8 +904,12 @@ const loadGroupContentsResource = async (params: {
             resource = await params.services.collectionService.get(params.uuid);
         } else if (kind === ResourceKind.PROJECT) {
             resource = await params.services.projectService.get(params.uuid);
-        } else {
+        } else if (kind === ResourceKind.WORKFLOW) {
+            resource = await params.services.workflowService.get(params.uuid);
+        } else if (kind === ResourceKind.CONTAINER_REQUEST) {
             resource = await params.services.containerRequestService.get(params.uuid);
+        } else {
+            throw new Error("loadGroupContentsResource unsupported kind " + kind)
         }
         handler = groupContentsHandlers.SHARED(resource);
     }
diff --git a/src/views-components/details-panel/workflow-details.tsx b/src/views-components/details-panel/workflow-details.tsx
index 15ddbfe0..ca224b1d 100644
--- a/src/views-components/details-panel/workflow-details.tsx
+++ b/src/views-components/details-panel/workflow-details.tsx
@@ -130,7 +130,7 @@ export const WorkflowDetailsAttributes = connect(mapStateToProps, mapDispatchToP
                 <Button onClick={workflow && onClick(workflow)} className={classes.runButton} variant='contained'
                     data-cy='workflow-details-panel-run-btn' color='primary' size='small'>
                     <StartIcon />
-                    Run Process
+                    Run Workflow
                 </Button>
                 <Grid item xs={12} >
                     <DetailsAttribute
diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index baa51496..43be9240 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -404,7 +404,7 @@ const ProcessIOPreview = withStyles(styles)(
                         [classes.noBorderRow]: (rest.length > 0),
                     };
 
-                    return <>
+                    return <React.Fragment key={param.id}>
                         <TableRow className={classNames(mainRowClasses)} data-cy="process-io-param">
                             <TableCell>
                                 {param.id}
@@ -424,7 +424,7 @@ const ProcessIOPreview = withStyles(styles)(
                                 [classes.noBorderRow]: (i < rest.length - 1),
                                 [classes.secondaryRow]: val.secondary,
                             };
-                            return <TableRow className={classNames(rowClasses)}>
+                            return <TableRow className={classNames(rowClasses)} key={i}>
                                 <TableCell />
                                 {showLabel && <TableCell />}
                                 <TableCell>
@@ -437,10 +437,10 @@ const ProcessIOPreview = withStyles(styles)(
                                 </TableCell>
                             </TableRow>
                         })}
-                    </>;
+                    </React.Fragment>;
                 })}
             </TableBody>
-        </Table>;
+        </Table >;
     });
 
 interface ProcessValuePreviewProps {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list