[arvados-workbench2] updated: 2.7.0-190-g8ebe9d6a

git repository hosting git at public.arvados.org
Fri Oct 27 21:04:37 UTC 2023


Summary of changes:
 .../all-processes-panel-middleware-service.ts      | 12 ++-----
 .../processes/processes-middleware-service.ts      |  2 +-
 src/store/store.ts                                 |  4 +++
 .../subprocess-panel-middleware-service.ts         | 24 ++++---------
 src/store/workbench/workbench-actions.ts           |  4 +++
 .../workflow-panel/workflow-middleware-service.ts  | 28 +++++++++++++++
 src/store/workflow-panel/workflow-panel-actions.ts |  3 ++
 .../workflow-panel/registered-workflow-panel.tsx   |  5 +++
 .../workflow-processes-panel-root.tsx}             | 42 +++++++++++-----------
 .../workflow-processes-panel.tsx}                  |  8 ++---
 10 files changed, 79 insertions(+), 53 deletions(-)
 copy src/views/{subprocess-panel/subprocess-panel-root.tsx => workflow-panel/workflow-processes-panel-root.tsx} (73%)
 copy src/views/{subprocess-panel/subprocess-panel.tsx => workflow-panel/workflow-processes-panel.tsx} (67%)

       via  8ebe9d6acf1aef414231093c5c5cd8e2912cf84d (commit)
       via  2bbfc3fdfa59d668c291b7f4f3ad76979f30231e (commit)
       via  b6378ecb409ca394dd3cd866fb1749c5decb316c (commit)
      from  68dee98de77221374456e635881f7e268f2745ea (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 8ebe9d6acf1aef414231093c5c5cd8e2912cf84d
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Oct 27 17:04:24 2023 -0400

    21158: Missing files
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/views/workflow-panel/workflow-processes-panel-root.tsx b/src/views/workflow-panel/workflow-processes-panel-root.tsx
new file mode 100644
index 00000000..1ca36efc
--- /dev/null
+++ b/src/views/workflow-panel/workflow-processes-panel-root.tsx
@@ -0,0 +1,126 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import React from 'react';
+import { DataExplorer } from "views-components/data-explorer/data-explorer";
+import { DataColumns } from 'components/data-table/data-table';
+import { DataTableFilterItem } from 'components/data-table-filters/data-table-filters';
+import { ContainerRequestState } from 'models/container-request';
+import { SortDirection } from 'components/data-table/data-column';
+import { ResourceKind } from 'models/resource';
+import { ResourceCreatedAtDate, ProcessStatus, ContainerRunTime } from 'views-components/data-explorer/renderers';
+import { ProcessIcon } from 'components/icon/icon';
+import { ResourceName } from 'views-components/data-explorer/renderers';
+import { WORKFLOW_PROCESSES_PANEL_ID } from 'store/workflow-panel/workflow-panel-actions';
+import { createTree } from 'models/tree';
+import { getInitialProcessStatusFilters } from 'store/resource-type-filters/resource-type-filters';
+import { ResourcesState } from 'store/resources/resources';
+import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view';
+import { StyleRulesCallback, Typography, WithStyles, withStyles } from '@material-ui/core';
+import { ArvadosTheme } from 'common/custom-theme';
+import { ProcessResource } from 'models/process';
+
+type CssRules = 'iconHeader' | 'cardHeader';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+    iconHeader: {
+        fontSize: '1.875rem',
+        color: theme.customs.colors.greyL,
+        marginRight: theme.spacing.unit * 2,
+    },
+    cardHeader: {
+        display: 'flex',
+    },
+});
+
+export enum WorkflowProcessesPanelColumnNames {
+    NAME = "Name",
+    STATUS = "Status",
+    CREATED_AT = "Created At",
+    RUNTIME = "Run Time"
+}
+
+export interface WorkflowProcessesPanelFilter extends DataTableFilterItem {
+    type: ResourceKind | ContainerRequestState;
+}
+
+export const workflowProcessesPanelColumns: DataColumns<string, ProcessResource> = [
+    {
+        name: WorkflowProcessesPanelColumnNames.NAME,
+        selected: true,
+        configurable: true,
+        sort: { direction: SortDirection.NONE, field: "name" },
+        filters: createTree(),
+        render: uuid => <ResourceName uuid={uuid} />
+    },
+    {
+        name: WorkflowProcessesPanelColumnNames.STATUS,
+        selected: true,
+        configurable: true,
+        mutuallyExclusiveFilters: true,
+        filters: getInitialProcessStatusFilters(),
+        render: uuid => <ProcessStatus uuid={uuid} />,
+    },
+    {
+        name: WorkflowProcessesPanelColumnNames.CREATED_AT,
+        selected: true,
+        configurable: true,
+        sort: { direction: SortDirection.DESC, field: "createdAt" },
+        filters: createTree(),
+        render: uuid => <ResourceCreatedAtDate uuid={uuid} />
+    },
+    {
+        name: WorkflowProcessesPanelColumnNames.RUNTIME,
+        selected: true,
+        configurable: true,
+        filters: createTree(),
+        render: uuid => <ContainerRunTime uuid={uuid} />
+    }
+];
+
+export interface WorkflowProcessesPanelDataProps {
+    resources: ResourcesState;
+}
+
+export interface WorkflowProcessesPanelActionProps {
+    onItemClick: (item: string) => void;
+    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: string, resources: ResourcesState) => void;
+    onItemDoubleClick: (item: string) => void;
+}
+
+type WorkflowProcessesPanelProps = WorkflowProcessesPanelActionProps & WorkflowProcessesPanelDataProps;
+
+const DEFAULT_VIEW_MESSAGES = [
+    'No processes available for listing.',
+    'The current process may not have any or none matches current filtering.'
+];
+
+type WorkflowProcessesTitleProps = WithStyles<CssRules>;
+
+const WorkflowProcessesTitle = withStyles(styles)(
+    ({ classes }: WorkflowProcessesTitleProps) =>
+        <div className={classes.cardHeader}>
+            <ProcessIcon className={classes.iconHeader} /><span></span>
+            <Typography noWrap variant='h6' color='inherit'>
+                Workflow Processes
+            </Typography>
+        </div>
+);
+
+export const WorkflowProcessesPanelRoot = (props: WorkflowProcessesPanelProps & MPVPanelProps) => {
+    return <DataExplorer
+        id={WORKFLOW_PROCESSES_PANEL_ID}
+        onRowClick={props.onItemClick}
+        onRowDoubleClick={props.onItemDoubleClick}
+        onContextMenu={(event, item) => props.onContextMenu(event, item, props.resources)}
+        contextMenuColumn={true}
+        defaultViewIcon={ProcessIcon}
+        defaultViewMessages={DEFAULT_VIEW_MESSAGES}
+        doHidePanel={props.doHidePanel}
+        doMaximizePanel={props.doMaximizePanel}
+        doUnMaximizePanel={props.doUnMaximizePanel}
+        panelMaximized={props.panelMaximized}
+        panelName={props.panelName}
+        title={<WorkflowProcessesTitle />} />;
+};
diff --git a/src/views/workflow-panel/workflow-processes-panel.tsx b/src/views/workflow-panel/workflow-processes-panel.tsx
new file mode 100644
index 00000000..548f8fc4
--- /dev/null
+++ b/src/views/workflow-panel/workflow-processes-panel.tsx
@@ -0,0 +1,33 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Dispatch } from "redux";
+import { connect } from "react-redux";
+import { openProcessContextMenu } from "store/context-menu/context-menu-actions";
+import { WorkflowProcessesPanelRoot, WorkflowProcessesPanelActionProps, WorkflowProcessesPanelDataProps } from "views/workflow-panel/workflow-processes-panel-root";
+import { RootState } from "store/store";
+import { navigateTo } from "store/navigation/navigation-action";
+import { loadDetailsPanel } from "store/details-panel/details-panel-action";
+import { getProcess } from "store/processes/process";
+
+const mapDispatchToProps = (dispatch: Dispatch): WorkflowProcessesPanelActionProps => ({
+    onContextMenu: (event, resourceUuid, resources) => {
+        const process = getProcess(resourceUuid)(resources);
+        if (process) {
+            dispatch<any>(openProcessContextMenu(event, process));
+        }
+    },
+    onItemClick: (uuid: string) => {
+        dispatch<any>(loadDetailsPanel(uuid));
+    },
+    onItemDoubleClick: uuid => {
+        dispatch<any>(navigateTo(uuid));
+    },
+});
+
+const mapStateToProps = (state: RootState): WorkflowProcessesPanelDataProps => ({
+    resources: state.resources,
+});
+
+export const WorkflowProcessesPanel = connect(mapStateToProps, mapDispatchToProps)(WorkflowProcessesPanelRoot);

commit 2bbfc3fdfa59d668c291b7f4f3ad76979f30231e
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Oct 27 17:03:51 2023 -0400

    21158: Displays executions from the current workflow
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/store/store.ts b/src/store/store.ts
index daa9812e..ee861f18 100644
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@ -20,9 +20,11 @@ import { collectionPanelFilesReducer } from "./collection-panel/collection-panel
 import { dataExplorerMiddleware } from "./data-explorer/data-explorer-middleware";
 import { FAVORITE_PANEL_ID } from "./favorite-panel/favorite-panel-action";
 import { PROJECT_PANEL_ID } from "./project-panel/project-panel-action";
+import { WORKFLOW_PROCESSES_PANEL_ID } from "./workflow-panel/workflow-panel-actions";
 import { ProjectPanelMiddlewareService } from "./project-panel/project-panel-middleware-service";
 import { FavoritePanelMiddlewareService } from "./favorite-panel/favorite-panel-middleware-service";
 import { AllProcessesPanelMiddlewareService } from "./all-processes-panel/all-processes-panel-middleware-service";
+import { WorkflowProcessesMiddlewareService } from "./workflow-panel/workflow-middleware-service";
 import { collectionPanelReducer } from "./collection-panel/collection-panel-reducer";
 import { dialogReducer } from "./dialog/dialog-reducer";
 import { ServiceRepository } from "services/services";
@@ -96,6 +98,7 @@ export function configureStore(history: History, services: ServiceRepository, co
     const projectPanelMiddleware = dataExplorerMiddleware(new ProjectPanelMiddlewareService(services, PROJECT_PANEL_ID));
     const favoritePanelMiddleware = dataExplorerMiddleware(new FavoritePanelMiddlewareService(services, FAVORITE_PANEL_ID));
     const allProcessessPanelMiddleware = dataExplorerMiddleware(new AllProcessesPanelMiddlewareService(services, ALL_PROCESSES_PANEL_ID));
+    const workflowProcessessPanelMiddleware = dataExplorerMiddleware(new WorkflowProcessesMiddlewareService(services, WORKFLOW_PROCESSES_PANEL_ID));
     const trashPanelMiddleware = dataExplorerMiddleware(new TrashPanelMiddlewareService(services, TRASH_PANEL_ID));
     const searchResultsPanelMiddleware = dataExplorerMiddleware(new SearchResultsMiddlewareService(services, SEARCH_RESULTS_PANEL_ID));
     const sharedWithMePanelMiddleware = dataExplorerMiddleware(new SharedWithMeMiddlewareService(services, SHARED_WITH_ME_PANEL_ID));
@@ -152,6 +155,7 @@ export function configureStore(history: History, services: ServiceRepository, co
         collectionsContentAddress,
         subprocessMiddleware,
         treePickerSearchMiddleware,
+        workflowProcessessPanelMiddleware
     ];
 
     const reduceMiddlewaresFn: (a: Middleware[], b: MiddlewareListReducer) => Middleware[] = (a, b) => b(a, services);
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index b03400d5..b4c5df88 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -98,6 +98,8 @@ import { AdminMenuIcon } from "components/icon/icon";
 import { userProfileGroupsColumns } from "views/user-profile-panel/user-profile-panel-root";
 import { selectedToArray, selectedToKindSet } from "components/multiselect-toolbar/MultiselectToolbar";
 import { multiselectActions } from "store/multiselect/multiselect-actions";
+import { workflowProcessesPanelColumns } from "views/workflow-panel/workflow-processes-panel-root";
+import { workflowProcessesPanelActions } from "store/workflow-panel/workflow-panel-actions";
 
 export const WORKBENCH_LOADING_SCREEN = "workbenchLoadingScreen";
 
@@ -179,6 +181,7 @@ export const loadWorkbench = () => async (dispatch: Dispatch, getState: () => Ro
             })
         );
         dispatch(subprocessPanelActions.SET_COLUMNS({ columns: subprocessPanelColumns }));
+        dispatch(workflowProcessesPanelActions.SET_COLUMNS({ columns: workflowProcessesPanelColumns }));
 
         if (services.linkAccountService.getAccountToLink()) {
             dispatch(linkAccountPanelActions.HAS_SESSION_DATA());
@@ -579,6 +582,7 @@ export const loadRegisteredWorkflow = (uuid: string) =>
                 await dispatch<any>(finishLoadingProject(workflow.ownerUuid));
                 await dispatch<any>(activateSidePanelTreeItem(workflow.ownerUuid));
                 dispatch<any>(breadcrumbfunc(workflow.ownerUuid));
+                dispatch(workflowProcessesPanelActions.REQUEST_ITEMS());
             }
         }
     });
diff --git a/src/store/workflow-panel/workflow-middleware-service.ts b/src/store/workflow-panel/workflow-middleware-service.ts
index 587f0224..aa342189 100644
--- a/src/store/workflow-panel/workflow-middleware-service.ts
+++ b/src/store/workflow-panel/workflow-middleware-service.ts
@@ -13,6 +13,10 @@ import { FilterBuilder } from 'services/api/filter-builder';
 import { WorkflowResource } from 'models/workflow';
 import { ListResults } from 'services/common-service/common-service';
 import { workflowPanelActions } from 'store/workflow-panel/workflow-panel-actions';
+import { matchRegisteredWorkflowRoute } from 'routes/routes';
+import { ProcessesMiddlewareService } from "store/processes/processes-middleware-service";
+import { workflowProcessesPanelActions } from "./workflow-panel-actions";
+import { joinFilters } from "services/api/filter-builder";
 
 export class WorkflowMiddlewareService extends DataExplorerMiddlewareService {
     constructor(private services: ServiceRepository, id: string) {
@@ -56,3 +60,27 @@ const couldNotFetchWorkflows = () =>
         message: 'Could not fetch workflows.',
         kind: SnackbarKind.ERROR
     });
+
+
+export class WorkflowProcessesMiddlewareService extends ProcessesMiddlewareService {
+    constructor(services: ServiceRepository, id: string) {
+        super(services, workflowProcessesPanelActions, id);
+    }
+
+    getFilters(api: MiddlewareAPI<Dispatch, RootState>, dataExplorer: DataExplorer): string | null {
+        const state = api.getState();
+
+        if (!state.router.location) { return null; }
+
+        const registeredWorkflowMatch = matchRegisteredWorkflowRoute(state.router.location.pathname);
+        if (!registeredWorkflowMatch) { return null; }
+
+        const workflow_uuid = registeredWorkflowMatch.params.id;
+
+        const requesting_container = new FilterBuilder().addEqual('properties.template_uuid', workflow_uuid).getFilters();
+        const sup = super.getFilters(api, dataExplorer);
+        if (sup === null) { return null; }
+
+        return joinFilters(sup, requesting_container);
+    }
+}
diff --git a/src/store/workflow-panel/workflow-panel-actions.ts b/src/store/workflow-panel/workflow-panel-actions.ts
index d8c3b651..b4c1d3fb 100644
--- a/src/store/workflow-panel/workflow-panel-actions.ts
+++ b/src/store/workflow-panel/workflow-panel-actions.ts
@@ -30,6 +30,9 @@ const UUID_PREFIX_PROPERTY_NAME = 'uuidPrefix';
 const WORKFLOW_PANEL_DETAILS_UUID = 'workflowPanelDetailsUuid';
 export const workflowPanelActions = bindDataExplorerActions(WORKFLOW_PANEL_ID);
 
+export const WORKFLOW_PROCESSES_PANEL_ID = "workflowProcessesPanel";
+export const workflowProcessesPanelActions = bindDataExplorerActions(WORKFLOW_PROCESSES_PANEL_ID);
+
 export const loadWorkflowPanel = () =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch(workflowPanelActions.REQUEST_ITEMS());
diff --git a/src/views/workflow-panel/registered-workflow-panel.tsx b/src/views/workflow-panel/registered-workflow-panel.tsx
index 5973efed..98fcabde 100644
--- a/src/views/workflow-panel/registered-workflow-panel.tsx
+++ b/src/views/workflow-panel/registered-workflow-panel.tsx
@@ -26,6 +26,7 @@ import { getResource } from 'store/resources/resources';
 import { openContextMenu, resourceUuidToContextMenuKind } from 'store/context-menu/context-menu-actions';
 import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-panel-view/multi-panel-view';
 import { ProcessIOCard, ProcessIOCardType } from 'views/process-panel/process-io-card';
+import { WorkflowProcessesPanel } from './workflow-processes-panel';
 
 type CssRules = 'root'
     | 'button'
@@ -137,6 +138,7 @@ export const RegisteredWorkflowPanel = withStyles(styles)(connect(
                     { name: "Inputs" },
                     { name: "Outputs" },
                     { name: "Files" },
+                    { name: "Executions" },
                 ];
                 return item
                     ? <MPVContainer className={classes.root} spacing={8} direction="column" justify-content="flex-start" wrap="nowrap" panelStates={panelsData}>
@@ -199,6 +201,9 @@ export const RegisteredWorkflowPanel = withStyles(styles)(connect(
                                 <ProcessOutputCollectionFiles isWritable={false} currentItemUuid={workflowCollection} />
                             </Card>
                         </MPVPanelContent>
+                        <MPVPanelContent forwardProps xs>
+                            <WorkflowProcessesPanel />
+                        </MPVPanelContent>
                     </MPVContainer>
                     : null;
             }

commit b6378ecb409ca394dd3cd866fb1749c5decb316c
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Oct 27 16:19:02 2023 -0400

    21158: Remove unused imports
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/store/all-processes-panel/all-processes-panel-middleware-service.ts b/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
index e6d0192d..079cf11e 100644
--- a/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
+++ b/src/store/all-processes-panel/all-processes-panel-middleware-service.ts
@@ -2,21 +2,15 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { dataExplorerToListParams, getDataExplorerColumnFilters, getOrder } from "store/data-explorer/data-explorer-middleware-service";
+import { getDataExplorerColumnFilters } from "store/data-explorer/data-explorer-middleware-service";
 import { RootState } from "../store";
 import { ServiceRepository } from "services/services";
-import { FilterBuilder, joinFilters } from "services/api/filter-builder";
+import { joinFilters } from "services/api/filter-builder";
 import { allProcessesPanelActions } from "./all-processes-panel-action";
 import { Dispatch, MiddlewareAPI } from "redux";
-import { resourcesActions } from "store/resources/resources-actions";
-import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
-import { progressIndicatorActions } from 'store/progress-indicator/progress-indicator-actions';
-import { getDataExplorer, DataExplorer } from "store/data-explorer/data-explorer-reducer";
-import { loadMissingProcessesInformation } from "store/project-panel/project-panel-middleware-service";
+import { DataExplorer } from "store/data-explorer/data-explorer-reducer";
 import { DataColumns } from "components/data-table/data-table";
 import {
-    ProcessStatusFilter,
-    buildProcessStatusFilters,
     serializeOnlyProcessTypeFilters
 } from "../resource-type-filters/resource-type-filters";
 import { AllProcessesPanelColumnNames } from "views/all-processes-panel/all-processes-panel";
diff --git a/src/store/processes/processes-middleware-service.ts b/src/store/processes/processes-middleware-service.ts
index d2525272..3154e1ae 100644
--- a/src/store/processes/processes-middleware-service.ts
+++ b/src/store/processes/processes-middleware-service.ts
@@ -12,7 +12,7 @@ import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
 import { DataExplorer, getDataExplorer } from 'store/data-explorer/data-explorer-reducer';
 import { BoundDataExplorerActions } from 'store/data-explorer/data-explorer-action';
 import { updateResources } from 'store/resources/resources-actions';
-import { ListArguments, ListResults } from 'services/common-service/common-service';
+import { ListArguments } from 'services/common-service/common-service';
 import { ProcessResource } from 'models/process';
 import { FilterBuilder, joinFilters } from 'services/api/filter-builder';
 import { DataColumns } from 'components/data-table/data-table';
diff --git a/src/store/subprocess-panel/subprocess-panel-middleware-service.ts b/src/store/subprocess-panel/subprocess-panel-middleware-service.ts
index 1ae9c41e..0ac5df6a 100644
--- a/src/store/subprocess-panel/subprocess-panel-middleware-service.ts
+++ b/src/store/subprocess-panel/subprocess-panel-middleware-service.ts
@@ -2,25 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ServiceRepository } from 'services/services';
-import { MiddlewareAPI, Dispatch } from 'redux';
-import {
-    dataExplorerToListParams, listResultsToDataExplorerItemsMeta, getDataExplorerColumnFilters, getOrder
-} from 'store/data-explorer/data-explorer-middleware-service';
-import { RootState } from 'store/store';
-import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
-import { DataExplorer, getDataExplorer } from 'store/data-explorer/data-explorer-reducer';
-import { updateResources } from 'store/resources/resources-actions';
-import { ListResults } from 'services/common-service/common-service';
-import { ProcessResource } from 'models/process';
-import { FilterBuilder, joinFilters } from 'services/api/filter-builder';
-import { subprocessPanelActions } from './subprocess-panel-actions';
-import { DataColumns } from 'components/data-table/data-table';
-import { ProcessStatusFilter, buildProcessStatusFilters } from '../resource-type-filters/resource-type-filters';
-import { ContainerRequestResource, containerRequestFieldsNoMounts } from 'models/container-request';
-import { progressIndicatorActions } from '../progress-indicator/progress-indicator-actions';
-import { loadMissingProcessesInformation } from '../project-panel/project-panel-middleware-service';
+import { RootState } from "../store";
+import { ServiceRepository } from "services/services";
+import { FilterBuilder, joinFilters } from "services/api/filter-builder";
+import { Dispatch, MiddlewareAPI } from "redux";
+import { DataExplorer } from "store/data-explorer/data-explorer-reducer";
 import { ProcessesMiddlewareService } from "store/processes/processes-middleware-service";
+import { subprocessPanelActions } from './subprocess-panel-actions';
 import { getProcess } from "store/processes/process";
 
 export class SubprocessMiddlewareService extends ProcessesMiddlewareService {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list