X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/7be9038d988e4dd566536be646769f720b1ae04c..96086f4ff017f24b8436d92f6a5b7f6ec566276e:/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 8bdbe4f2..e77c300d 100644 --- a/src/store/process-panel/process-panel-actions.ts +++ b/src/store/process-panel/process-panel-actions.ts @@ -2,17 +2,18 @@ // // 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 { navigateTo, 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, processLogsPanelActions } from "store/process-logs-panel/process-logs-panel-actions"; export const processPanelActions = unionize({ SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID: ofType(), @@ -25,10 +26,12 @@ export type ProcessPanelAction = UnionOf; export const toggleProcessPanelFilter = processPanelActions.TOGGLE_PROCESS_PANEL_FILTER; export const loadProcessPanel = (uuid: string) => - (dispatch: Dispatch) => { + async (dispatch: Dispatch) => { + dispatch(processLogsPanelActions.RESET_PROCESS_LOGS_PANEL()); dispatch(processPanelActions.SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID(uuid)); - dispatch(loadProcess(uuid)); + await dispatch(loadProcess(uuid)); dispatch(initProcessPanelFilters); + dispatch(initProcessLogsPanel(uuid)); dispatch(loadSubprocessPanel()); }; @@ -53,6 +56,8 @@ export const initProcessPanelFilters = processPanelActions.SET_PROCESS_PANEL_FIL ProcessStatus.COMPLETED, ProcessStatus.FAILED, ProcessStatus.RUNNING, - ProcessStatus.LOCKED, + ProcessStatus.ONHOLD, + ProcessStatus.FAILING, + ProcessStatus.WARNING, ProcessStatus.CANCELLED ]);