Merge branch '20252-subprocess-panel-refresh-bug' into main. Closes #20252
authorStephen Smith <stephen@curii.com>
Fri, 31 Mar 2023 15:05:14 +0000 (11:05 -0400)
committerStephen Smith <stephen@curii.com>
Fri, 31 Mar 2023 15:05:14 +0000 (11:05 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/advanced-tab/advanced-tab.tsx
src/store/navigation/navigation-action.ts
src/store/process-panel/process-panel-actions.ts
src/store/subprocess-panel/subprocess-panel-actions.ts
src/views-components/context-menu/action-sets/workflow-action-set.ts
src/views/workflow-panel/registered-workflow-panel.tsx

index 82b4dfb02e2a6790ecb1a54d5b92f19818be57f3..a495e89cad16f001399e3081d9801e91533b69c2 100644 (file)
@@ -628,7 +628,7 @@ const linkApiResponse = (apiResponse: LinkResource): JSX.Element => {
 const wfApiResponse = (apiResponse: WorkflowResource): JSX.Element => {
     const {
         uuid, name,
-        ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid, description, definition
+        ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid, description
     } = apiResponse;
     const response = `
 "uuid": "${uuid}",
index edda2c61ca4d57861c98b7577238019923fc8db2..55479188c12d91edc99792e8d03d8781d96d7deb 100644 (file)
@@ -8,7 +8,6 @@ import { ResourceKind, extractUuidKind } from 'models/resource';
 import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
 import { Routes, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes';
 import { RootState } from 'store/store';
-import { openDetailsPanel } from 'store/details-panel/details-panel-action';
 import { ServiceRepository } from 'services/services';
 import { pluginConfig } from 'plugins';
 import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
index 9668485c2cbbd6fd399ea9776c555fbedd643fe2..d8042ba5ef9942351df2a298635dae0f556bb300 100644 (file)
@@ -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<typeof processPanelActions>;
 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<ProcessPanelAction>(processPanelActions.SET_PROCESS_PANEL_CONTAINER_REQUEST_UUID(uuid));
index 0df89d6e19a2a2ac5d34264413b3bf5eb9010e8b..b440776ce0ff6c2ddcd02fe34aa696348f907888 100644 (file)
@@ -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());
     };
index cf28bcd3ff477ff27783059989f9d3a59354824d..a5223d1d06f199d905136acdbf9402bed806827f 100644 (file)
@@ -5,16 +5,10 @@
 import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
 import { openRunProcess } from "store/workflow-panel/workflow-panel-actions";
 import {
-    RenameIcon,
-    ShareIcon,
-    MoveToIcon,
-    CopyIcon,
     DetailsIcon,
     AdvancedIcon,
     OpenIcon,
     Link,
-    RestoreVersionIcon,
-    FolderSharedIcon,
     StartIcon
 } from "components/icon/icon";
 import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
index 7b0f2a4c9fbad85d176b452bd79d74d10c02cb63..0963de35e8ad703fc5b426c779cfa13656b351d2 100644 (file)
@@ -14,7 +14,6 @@ import {
     CardContent,
     IconButton,
 } from '@material-ui/core';
-import { Dispatch } from "redux";
 import { connect, DispatchProp } from "react-redux";
 import { RouteComponentProps } from 'react-router';
 import { ArvadosTheme } from 'common/custom-theme';