X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ddac62fc3f788162bd56bbd5bcacc2f9395c9cca..8dc7e5fc6f2d2a7ce853f935a0a84dacb8c0585f:/src/store/workbench/workbench-actions.ts diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index 8dc64a84..97fe549a 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -28,6 +28,8 @@ import * as collectionCreateActions from '~/store/collections/collection-create- import * as collectionCopyActions from '~/store/collections/collection-copy-actions'; import * as collectionUpdateActions from '~/store/collections/collection-update-actions'; import * as collectionMoveActions from '~/store/collections/collection-move-actions'; +import * as processesActions from '../processes/processes-actions'; +import { getProcess } from '../processes/process'; export const loadWorkbench = () => @@ -172,6 +174,23 @@ export const moveCollection = (data: MoveToFormDialogData) => } }; +export const loadProcess = (uuid: string) => + async (dispatch: Dispatch, getState: () => RootState) => { + await dispatch(processesActions.loadProcess(uuid)); + const process = getProcess(uuid)(getState().resources); + if (process) { + await dispatch(activateSidePanelTreeItem(process.containerRequest.ownerUuid)); + dispatch(setCollectionBreadcrumbs(process.containerRequest.ownerUuid)); + dispatch(loadDetailsPanel(uuid)); + } + }; + +export const loadProcessLog = (uuid: string) => + async (dispatch: Dispatch, getState: () => RootState) => { + dispatch(loadProcess(uuid)); + // ToDo: loadLog(); + }; + export const resourceIsNotLoaded = (uuid: string) => snackbarActions.OPEN_SNACKBAR({ message: `Resource identified by ${uuid} is not loaded.`