X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f1db282d059c1d0a6e264943344e09bda5d40282..4a2789c9974a1fa0f851a3bb2aa24bff5b029c48:/src/store/process-panel/process-panel-actions.ts diff --git a/src/store/process-panel/process-panel-actions.ts b/src/store/process-panel/process-panel-actions.ts index f1f74f6d..2e5fb6b9 100644 --- a/src/store/process-panel/process-panel-actions.ts +++ b/src/store/process-panel/process-panel-actions.ts @@ -2,38 +2,43 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { unionize, ofType, UnionOf } from "~/common/unionize"; -import { loadProcess } from '~/store/processes/processes-actions'; +import { unionize, ofType, UnionOf } from "common/unionize"; +import { loadProcess } from 'store/processes/processes-actions'; import { Dispatch } from 'redux'; -import { ProcessStatus } from '~/store/processes/process'; -import { RootState } from '~/store/store'; -import { ServiceRepository } from "~/services/services"; -import { navigateToCollection, navigateToWorkflows } from '~/store/navigation/navigation-action'; -import { snackbarActions } from '~/store/snackbar/snackbar-actions'; +import { ProcessStatus } from 'store/processes/process'; +import { RootState } from 'store/store'; +import { ServiceRepository } from "services/services"; +import { navigateTo, navigateToWorkflows } from 'store/navigation/navigation-action'; +import { snackbarActions } from 'store/snackbar/snackbar-actions'; import { SnackbarKind } from '../snackbar/snackbar-actions'; -import { showWorkflowDetails } from '~/store/workflow-panel/workflow-panel-actions'; +import { showWorkflowDetails } from 'store/workflow-panel/workflow-panel-actions'; +import { loadSubprocessPanel } from "../subprocess-panel/subprocess-panel-actions"; +import { initProcessLogsPanel } from "store/process-logs-panel/process-logs-panel-actions"; -export const procesPanelActions = unionize({ +export const processPanelActions = unionize({ + SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID: ofType(), SET_PROCESS_PANEL_FILTERS: ofType(), TOGGLE_PROCESS_PANEL_FILTER: ofType(), }); -export type ProcessPanelAction = UnionOf; +export type ProcessPanelAction = UnionOf; -export const toggleProcessPanelFilter = procesPanelActions.TOGGLE_PROCESS_PANEL_FILTER; +export const toggleProcessPanelFilter = processPanelActions.TOGGLE_PROCESS_PANEL_FILTER; export const loadProcessPanel = (uuid: string) => (dispatch: Dispatch) => { + dispatch(processPanelActions.SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID(uuid)); dispatch(loadProcess(uuid)); dispatch(initProcessPanelFilters); - dispatch(showWorkflowDetails(uuid)); + dispatch(initProcessLogsPanel(uuid)); + dispatch(loadSubprocessPanel()); }; export const navigateToOutput = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { try { await services.collectionService.get(uuid); - dispatch(navigateToCollection(uuid)); + dispatch(navigateTo(uuid)); } catch { dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'This collection does not exists!', hideDuration: 2000, kind: SnackbarKind.ERROR })); } @@ -42,9 +47,10 @@ export const navigateToOutput = (uuid: string) => export const openWorkflow = (uuid: string) => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { dispatch(navigateToWorkflows); + dispatch(showWorkflowDetails(uuid)); }; -export const initProcessPanelFilters = procesPanelActions.SET_PROCESS_PANEL_FILTERS([ +export const initProcessPanelFilters = processPanelActions.SET_PROCESS_PANEL_FILTERS([ ProcessStatus.QUEUED, ProcessStatus.COMPLETED, ProcessStatus.FAILED,