From: Stephen Smith Date: Thu, 30 Mar 2023 18:58:15 +0000 (-0400) Subject: 20252: Avoid clearing subprocess data explorer when refreshing process panel X-Git-Tag: 2.6.0~3^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/d8591ef8bcb52d6ee5e0c7d1f541088d2485c536 20252: Avoid clearing subprocess data explorer when refreshing process panel Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/store/process-panel/process-panel-actions.ts b/src/store/process-panel/process-panel-actions.ts index 9668485c..d8042ba5 100644 --- a/src/store/process-panel/process-panel-actions.ts +++ b/src/store/process-panel/process-panel-actions.ts @@ -12,7 +12,7 @@ import { navigateTo, navigateToWorkflows } from 'store/navigation/navigation-act import { snackbarActions } from 'store/snackbar/snackbar-actions'; import { SnackbarKind } from '../snackbar/snackbar-actions'; import { showWorkflowDetails } from 'store/workflow-panel/workflow-panel-actions'; -import { loadSubprocessPanel } from "../subprocess-panel/subprocess-panel-actions"; +import { loadSubprocessPanel, subprocessPanelActions } from "../subprocess-panel/subprocess-panel-actions"; import { initProcessLogsPanel, processLogsPanelActions } from "store/process-logs-panel/process-logs-panel-actions"; import { CollectionFile } from "models/collection-file"; import { ContainerRequestResource } from "models/container-request"; @@ -40,7 +40,12 @@ export type ProcessPanelAction = UnionOf; export const toggleProcessPanelFilter = processPanelActions.TOGGLE_PROCESS_PANEL_FILTER; export const loadProcessPanel = (uuid: string) => - async (dispatch: Dispatch) => { + async (dispatch: Dispatch, getState: () => RootState) => { + // Reset subprocess data explorer if navigating to new process + // Avoids resetting pagination when refreshing same process + if (getState().processPanel.containerRequestUuid !== uuid) { + dispatch(subprocessPanelActions.CLEAR()); + } dispatch(processPanelActions.RESET_PROCESS_PANEL()); dispatch(processLogsPanelActions.RESET_PROCESS_LOGS_PANEL()); dispatch(processPanelActions.SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID(uuid)); diff --git a/src/store/subprocess-panel/subprocess-panel-actions.ts b/src/store/subprocess-panel/subprocess-panel-actions.ts index 0df89d6e..b440776c 100644 --- a/src/store/subprocess-panel/subprocess-panel-actions.ts +++ b/src/store/subprocess-panel/subprocess-panel-actions.ts @@ -12,6 +12,5 @@ export const subprocessPanelActions = bindDataExplorerActions(SUBPROCESS_PANEL_I export const loadSubprocessPanel = () => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { - dispatch(subprocessPanelActions.CLEAR()); dispatch(subprocessPanelActions.REQUEST_ITEMS()); };