From: Peter Amstutz Date: Mon, 23 May 2022 15:15:44 +0000 (-0400) Subject: Merge branch '19069-workflow-launching' into 19143-project-list-workflows X-Git-Tag: 2.4.1~1^2~1^2~7 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/8c5147b7367e994e897357766a85e9b7b8e28f24?hp=3c3d3d40033879249cd8e8f483f30cfa565d31bd Merge branch '19069-workflow-launching' into 19143-project-list-workflows Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js index fc2052cc..e187d533 100644 --- a/cypress/integration/side-panel.spec.js +++ b/cypress/integration/side-panel.spec.js @@ -62,7 +62,6 @@ describe('Side panel tests', function() { {url: '/shared-with-me', label: 'Shared with me'}, {url: '/public-favorites', label: 'Public Favorites'}, {url: '/favorites', label: 'My Favorites'}, - // {url: '/workflows', label: 'Workflows'}, {url: '/all_processes', label: 'All Processes'}, {url: '/trash', label: 'Trash'}, ].map(function(section) { diff --git a/src/models/collection.ts b/src/models/collection.ts index 9a5d2ee2..defaca76 100644 --- a/src/models/collection.ts +++ b/src/models/collection.ts @@ -70,4 +70,5 @@ export enum CollectionType { GENERAL = 'nil', OUTPUT = 'output', LOG = 'log', + INTERMEDIATE = 'intermediate', } diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 5b3ce668..237b6d96 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -33,7 +33,6 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const runProcessMatch = Routes.matchRunProcessRoute(pathname); const virtualMachineUserMatch = Routes.matchUserVirtualMachineRoute(pathname); const virtualMachineAdminMatch = Routes.matchAdminVirtualMachineRoute(pathname); - const workflowMatch = Routes.matchWorkflowRoute(pathname); const sshKeysUserMatch = Routes.matchSshKeysUserRoute(pathname); const sshKeysAdminMatch = Routes.matchSshKeysAdminRoute(pathname); const siteManagerMatch = Routes.matchSiteManagerRoute(pathname); @@ -77,8 +76,6 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadSharedWithMe); } else if (runProcessMatch) { store.dispatch(WorkbenchActions.loadRunProcess); - } else if (workflowMatch) { - store.dispatch(WorkbenchActions.loadWorkflow); } else if (searchResultsMatch) { store.dispatch(WorkbenchActions.loadSearchResults); } else if (virtualMachineUserMatch) { diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts index 973ba25a..c8811bf4 100644 --- a/src/store/navigation/navigation-action.ts +++ b/src/store/navigation/navigation-action.ts @@ -62,9 +62,6 @@ export const navigateTo = (uuid: string) => case SidePanelTreeCategory.SHARED_WITH_ME: dispatch(navigateToSharedWithMe); return; - case SidePanelTreeCategory.WORKFLOWS: - dispatch(navigateToWorkflows); - return; case SidePanelTreeCategory.TRASH: dispatch(navigateToTrash); return; diff --git a/src/store/resource-type-filters/resource-type-filters.test.ts b/src/store/resource-type-filters/resource-type-filters.test.ts index 698515bd..a3684507 100644 --- a/src/store/resource-type-filters/resource-type-filters.test.ts +++ b/src/store/resource-type-filters/resource-type-filters.test.ts @@ -47,6 +47,7 @@ describe("serializeResourceTypeFilters", () => { deselectNode(ObjectTypeFilter.PROCESS), deselectNode(CollectionTypeFilter.GENERAL_COLLECTION), deselectNode(CollectionTypeFilter.LOG_COLLECTION), + deselectNode(CollectionTypeFilter.INTERMEDIATE_COLLECTION), )(); const serializedFilters = serializeResourceTypeFilters(filters); @@ -54,6 +55,20 @@ describe("serializeResourceTypeFilters", () => { .toEqual(`["uuid","is_a",["${ResourceKind.PROJECT}","${ResourceKind.COLLECTION}"]],["collections.properties.type","in",["output"]]`); }); + it("should serialize intermediate collections and projects", () => { + const filters = pipe( + () => getInitialResourceTypeFilters(), + deselectNode(ObjectTypeFilter.PROCESS), + deselectNode(CollectionTypeFilter.GENERAL_COLLECTION), + deselectNode(CollectionTypeFilter.LOG_COLLECTION), + deselectNode(CollectionTypeFilter.OUTPUT_COLLECTION), + )(); + + const serializedFilters = serializeResourceTypeFilters(filters); + expect(serializedFilters) + .toEqual(`["uuid","is_a",["${ResourceKind.PROJECT}","${ResourceKind.COLLECTION}"]],["collections.properties.type","in",["intermediate"]]`); + }); + it("should serialize general and log collections", () => { const filters = pipe( () => getInitialResourceTypeFilters(), diff --git a/src/store/resource-type-filters/resource-type-filters.ts b/src/store/resource-type-filters/resource-type-filters.ts index b1c52e4f..64a391ca 100644 --- a/src/store/resource-type-filters/resource-type-filters.ts +++ b/src/store/resource-type-filters/resource-type-filters.ts @@ -39,6 +39,7 @@ export enum CollectionTypeFilter { GENERAL_COLLECTION = 'General', OUTPUT_COLLECTION = 'Output', LOG_COLLECTION = 'Log', + INTERMEDIATE_COLLECTION = 'Intermediate', } export enum ProcessTypeFilter { @@ -84,6 +85,7 @@ export const getInitialResourceTypeFilters = pipe( initFilter(ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.GENERAL_COLLECTION, ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.OUTPUT_COLLECTION, ObjectTypeFilter.COLLECTION), + initFilter(CollectionTypeFilter.INTERMEDIATE_COLLECTION, ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.LOG_COLLECTION, ObjectTypeFilter.COLLECTION), ), initFilter(ObjectTypeFilter.WORKFLOW) @@ -115,6 +117,7 @@ export const getTrashPanelTypeFilters = pipe( initFilter(ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.GENERAL_COLLECTION, ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.OUTPUT_COLLECTION, ObjectTypeFilter.COLLECTION), + initFilter(CollectionTypeFilter.INTERMEDIATE_COLLECTION, ObjectTypeFilter.COLLECTION), initFilter(CollectionTypeFilter.LOG_COLLECTION, ObjectTypeFilter.COLLECTION), ); @@ -173,6 +176,10 @@ const collectionTypeToPropertyValue = (type: CollectionTypeFilter) => { return CollectionType.OUTPUT; case CollectionTypeFilter.LOG_COLLECTION: return CollectionType.LOG; + case CollectionTypeFilter.INTERMEDIATE_COLLECTION: + return CollectionType.INTERMEDIATE; + default: + return CollectionType.GENERAL; } }; 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 3137583e..c615f216 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 @@ -66,8 +66,8 @@ describe("run-process-panel-actions", () => { email: "test@gmail.com", firstName: "TestFirstName", lastName: "TestLastName", - uuid: "ce8i5-tpzed-yid70bw31f51234", - ownerUuid: "ce8i5-tpzed-000000000000000", + uuid: "zzzzz-tpzed-yid70bw31f51234", + ownerUuid: "zzzzz-tpzed-000000000000000", isAdmin: false, isActive: true, username: "testfirstname", @@ -77,17 +77,17 @@ describe("run-process-panel-actions", () => { }, }, runProcessPanel: { - processPathname: "/projects/ce8i5-tpzed-yid70bw31f51234", - processOwnerUuid: "ce8i5-tpzed-yid70bw31f51234", + processPathname: "/projects/zzzzz-tpzed-yid70bw31f51234", + processOwnerUuid: "zzzzz-tpzed-yid70bw31f51234", selectedWorkflow: { - href: "/workflows/ce8i5-7fd4e-2tlnerdkxnl4fjt", + href: "/workflows/zzzzz-7fd4e-2tlnerdkxnl4fjt", kind: "arvados#workflow", etag: "8gh5xlhlgo61yqscyl1spw8tc", - uuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt", - ownerUuid: "ce8i5-tpzed-o4njwilpp4ov321", + uuid: "zzzzz-7fd4e-2tlnerdkxnl4fjt", + ownerUuid: "zzzzz-tpzed-o4njwilpp4ov321", createdAt: "2020-07-15T19:40:50.296041000Z", - modifiedByClientUuid: "ce8i5-ozdt8-libnr89sc5nq111", - modifiedByUserUuid: "ce8i5-tpzed-o4njwilpp4ov321", + modifiedByClientUuid: "zzzzz-ozdt8-libnr89sc5nq111", + modifiedByUserUuid: "zzzzz-tpzed-o4njwilpp4ov321", modifiedAt: "2020-07-15T19:40:50.296376000Z", name: "revsort.cwl", description: @@ -107,7 +107,7 @@ describe("run-process-panel-actions", () => { "arvados-cwl-runner", "--api=containers", "--local", - "--project-uuid=ce8i5-tpzed-yid70bw31f51234", + "--project-uuid=zzzzz-tpzed-yid70bw31f51234", "/var/lib/cwl/workflow.json#main", "/var/lib/cwl/cwl.input.json", ], @@ -118,11 +118,11 @@ describe("run-process-panel-actions", () => { name: "basicFormTestName", outputName: "Output from basicFormTestName", outputPath: "/var/spool/cwl", - ownerUuid: "ce8i5-tpzed-yid70bw31f51234", + ownerUuid: "zzzzz-tpzed-yid70bw31f51234", priority: 1, properties: { workflowName: "revsort.cwl", - template_uuid: "ce8i5-7fd4e-2tlnerdkxnl4fjt", + template_uuid: "zzzzz-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 61597bb7..f3352eb4 100644 --- a/src/store/run-process-panel/run-process-panel-actions.ts +++ b/src/store/run-process-panel/run-process-panel-actions.ts @@ -48,7 +48,7 @@ export type RunProcessPanelAction = UnionOf; export const loadRunProcessPanel = () => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { try { - dispatch(setBreadcrumbs([{ label: 'Run Process' }])); + dispatch(setBreadcrumbs([{ label: 'Run workflow' }])); const response = await services.workflowService.list(); dispatch(runProcessPanelActions.SET_WORKFLOWS(response.items)); } catch (e) { 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 58f7d82d..dd56b428 100644 --- a/src/store/side-panel-tree/side-panel-tree-actions.ts +++ b/src/store/side-panel-tree/side-panel-tree-actions.ts @@ -23,7 +23,6 @@ export enum SidePanelTreeCategory { PROJECTS = 'Projects', SHARED_WITH_ME = 'Shared with me', PUBLIC_FAVORITES = 'Public Favorites', - WORKFLOWS = 'Workflows', FAVORITES = 'My Favorites', TRASH = 'Trash', ALL_PROCESSES = 'All Processes', @@ -52,7 +51,6 @@ let SIDE_PANEL_CATEGORIES: string[] = [ SidePanelTreeCategory.SHARED_WITH_ME, SidePanelTreeCategory.PUBLIC_FAVORITES, SidePanelTreeCategory.FAVORITES, - // SidePanelTreeCategory.WORKFLOWS, SidePanelTreeCategory.GROUPS, SidePanelTreeCategory.ALL_PROCESSES, SidePanelTreeCategory.TRASH diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index ba405cb8..d2ff84b3 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -58,7 +58,7 @@ import { sharedWithMePanelActions } from 'store/shared-with-me-panel/shared-with-me-panel-actions'; import { CopyFormDialogData } from 'store/copy-dialog/copy-dialog'; -import { loadWorkflowPanel, workflowPanelActions } from 'store/workflow-panel/workflow-panel-actions'; +import { workflowPanelActions } from 'store/workflow-panel/workflow-panel-actions'; import { loadSshKeysPanel } from 'store/auth/auth-action-ssh'; import { loadLinkAccountPanel, linkAccountPanelActions } from 'store/link-account-panel/link-account-panel-actions'; import { loadSiteManagerPanel } from 'store/auth/auth-action-session'; @@ -457,12 +457,6 @@ export const loadRunProcess = handleFirstTimeLoad( } ); -export const loadWorkflow = handleFirstTimeLoad(async (dispatch: Dispatch) => { - dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.WORKFLOWS)); - await dispatch(loadWorkflowPanel()); - dispatch(setSidePanelBreadcrumbs(SidePanelTreeCategory.WORKFLOWS)); -}); - export const loadPublicFavorites = () => handleFirstTimeLoad( (dispatch: Dispatch) => { diff --git a/src/views-components/side-panel-tree/side-panel-tree.tsx b/src/views-components/side-panel-tree/side-panel-tree.tsx index e8294834..7f5b8d73 100644 --- a/src/views-components/side-panel-tree/side-panel-tree.tsx +++ b/src/views-components/side-panel-tree/side-panel-tree.tsx @@ -10,7 +10,6 @@ import { TreeItem } from "components/tree/tree"; import { ProjectResource } from "models/project"; import { ListItemTextIcon } from "components/list-item-text-icon/list-item-text-icon"; import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'; -import { WorkflowIcon } from 'components/icon/icon'; import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions'; import { openSidePanelContextMenu } from 'store/context-menu/context-menu-actions'; import { noop } from 'lodash'; @@ -42,7 +41,7 @@ const mapDispatchToProps = (dispatch: Dispatch, props: SidePanelTreeProps): Side export const SidePanelTree = connect(undefined, mapDispatchToProps)( (props: SidePanelTreeActionProps) => - + ); const renderSidePanelItem = (item: TreeItem) => { @@ -76,8 +75,6 @@ const getSidePanelIcon = (category: string) => { return ShareMeIcon; case SidePanelTreeCategory.TRASH: return TrashIcon; - case SidePanelTreeCategory.WORKFLOWS: - return WorkflowIcon; case SidePanelTreeCategory.PUBLIC_FAVORITES: return PublicFavoriteIcon; case SidePanelTreeCategory.ALL_PROCESSES: 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 ca30ce5f..2f41dedb 100644 --- a/src/views/run-process-panel/run-process-second-step.tsx +++ b/src/views/run-process-panel/run-process-second-step.tsx @@ -13,7 +13,6 @@ import { isValid } from 'redux-form'; import { RUN_PROCESS_INPUTS_FORM } from './run-process-inputs-form'; import { RunProcessAdvancedForm, RUN_PROCESS_ADVANCED_FORM } from './run-process-advanced-form'; import { createStructuredSelector } from 'reselect'; -import { WorkflowPresetSelect } from 'views/run-process-panel/workflow-preset-select'; import { selectPreset } from 'store/run-process-panel/run-process-panel-actions'; export interface RunProcessSecondStepFormDataProps { @@ -58,14 +57,6 @@ export const RunProcessSecondStepForm = connect(mapStateToProps, { onPresetChang ({ inputs, workflow, selectedPreset, presets, onPresetChange, valid, goBack, runProcess }: RunProcessSecondStepFormProps) => - {/* - - {workflow && selectedPreset && presets && - < WorkflowPresetSelect - {...{ workflow, selectedPreset, presets, onChange: onPresetChange }} /> - } - - */} @@ -75,7 +66,7 @@ export const RunProcessSecondStepForm = connect(mapStateToProps, { onPresetChang Back ); diff --git a/src/views/workflow-panel/workflow-description-card.tsx b/src/views/workflow-panel/workflow-description-card.tsx index e93caea4..f25a8e64 100644 --- a/src/views/workflow-panel/workflow-description-card.tsx +++ b/src/views/workflow-panel/workflow-description-card.tsx @@ -20,9 +20,11 @@ import { ArvadosTheme } from 'common/custom-theme'; import { WorkflowIcon } from 'components/icon/icon'; import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { parseWorkflowDefinition, getWorkflowInputs, getInputLabel, stringifyInputType } from 'models/workflow'; -// import { WorkflowGraph } from "views/workflow-panel/workflow-graph"; - import { WorkflowDetailsCardDataProps, WorkflowDetailsAttributes } from 'views-components/details-panel/workflow-details'; +import { WorkflowResource, parseWorkflowDefinition, getWorkflowInputs, getInputLabel, stringifyInputType } from 'models/workflow'; +import { DetailsAttribute } from 'components/details-attribute/details-attribute'; +import { ResourceOwnerWithName } from 'views-components/data-explorer/renderers'; +import { formatDate } from "common/formatters"; export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable'; @@ -76,7 +78,6 @@ export const WorkflowDetailsCard = withStyles(styles)( - {/* */} {value === 0 && {workflow ?
@@ -95,14 +96,6 @@ export const WorkflowDetailsCard = withStyles(styles)( messages={['Please select a workflow to see its inputs.']} /> } } - {/* {value === 2 && - {workflow - ? - : - } - } */} {value === 2 && {workflow ?