[arvados-workbench2] updated: 2.7.0-165-g23064a8e
git repository hosting
git at public.arvados.org
Thu Oct 19 20:27:41 UTC 2023
Summary of changes:
src/store/context-menu/context-menu-actions.ts | 21 +--------------------
.../action-sets/process-resource-action-set.ts | 4 ++--
.../all-processes-panel/all-processes-panel.tsx | 8 +++-----
src/views/process-panel/process-panel.tsx | 8 ++------
src/views/subprocess-panel/subprocess-panel.tsx | 7 ++-----
5 files changed, 10 insertions(+), 38 deletions(-)
via 23064a8e0ced7fb43269434e73d553c0338fd6b8 (commit)
from 92eefe98ca9631ee971881fc46f8a1829ac897b9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 23064a8e0ced7fb43269434e73d553c0338fd6b8
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Oct 19 16:27:36 2023 -0400
20382: removed openRunningContextMenu and related code Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts
index 18845ace..46431487 100644
--- a/src/store/context-menu/context-menu-actions.ts
+++ b/src/store/context-menu/context-menu-actions.ts
@@ -215,31 +215,12 @@ export const openProcessContextMenu = (event: React.MouseEvent<HTMLElement>, pro
description: res.description,
outputUuid: res.outputUuid || "",
workflowUuid: res.properties.template_uuid || "",
- menuKind: ContextMenuKind.PROCESS_RESOURCE,
+ menuKind: isProcessCancelable(process) ? ContextMenuKind.RUNNING_PROCESS_RESOURCE : ContextMenuKind.PROCESS_RESOURCE
})
);
}
};
-export const openRunningProcessContextMenu =
- (event: React.MouseEvent<HTMLElement>, process: Process) => (dispatch: Dispatch, getState: () => RootState) => {
- const res = getResource<ProcessResource>(process.containerRequest.uuid)(getState().resources);
- if (res) {
- dispatch<any>(
- openContextMenu(event, {
- uuid: res.uuid,
- ownerUuid: res.ownerUuid,
- kind: ResourceKind.PROCESS,
- name: res.name,
- description: res.description,
- outputUuid: res.outputUuid || "",
- workflowUuid: res.properties.template_uuid || "",
- menuKind: ContextMenuKind.RUNNING_PROCESS_RESOURCE,
- })
- );
- }
- };
-
export const openPermissionEditContextMenu =
(event: React.MouseEvent<HTMLElement>, link: LinkResource) => (dispatch: Dispatch, getState: () => RootState) => {
if (link) {
diff --git a/src/views-components/context-menu/action-sets/process-resource-action-set.ts b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
index 7d85518d..6db875f2 100644
--- a/src/views-components/context-menu/action-sets/process-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/process-resource-action-set.ts
@@ -122,8 +122,8 @@ export const runningProcessResourceActionSet = [
{
name: "CANCEL",
icon: StopIcon,
- execute: (dispatch, resource) => {
- dispatch(cancelRunningWorkflow(resource.uuid));
+ execute: (dispatch, resources) => {
+ dispatch(cancelRunningWorkflow(resources[0].uuid));
},
},
],
diff --git a/src/views/all-processes-panel/all-processes-panel.tsx b/src/views/all-processes-panel/all-processes-panel.tsx
index 6d612e75..ee53f99c 100644
--- a/src/views/all-processes-panel/all-processes-panel.tsx
+++ b/src/views/all-processes-panel/all-processes-panel.tsx
@@ -22,14 +22,14 @@ import {
ResourceCreatedAtDate,
} from "views-components/data-explorer/renderers";
import { ProcessIcon } from "components/icon/icon";
-import { openProcessContextMenu, openRunningProcessContextMenu } from "store/context-menu/context-menu-actions";
+import { openProcessContextMenu } from "store/context-menu/context-menu-actions";
import { loadDetailsPanel } from "store/details-panel/details-panel-action";
import { navigateTo } from "store/navigation/navigation-action";
import { ContainerRequestResource, ContainerRequestState } from "models/container-request";
import { RootState } from "store/store";
import { createTree } from "models/tree";
import { getInitialProcessStatusFilters, getInitialProcessTypeFilters } from "store/resource-type-filters/resource-type-filters";
-import { getProcess, isProcessCancelable } from "store/processes/process";
+import { getProcess } from "store/processes/process";
import { ResourcesState } from "store/resources/resources";
type CssRules = "toolbar" | "button" | "root";
@@ -132,9 +132,7 @@ export const AllProcessesPanel = withStyles(styles)(
class extends React.Component<AllProcessesPanelProps> {
handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
const process = getProcess(resourceUuid)(this.props.resources);
- if (process && isProcessCancelable(process)) {
- this.props.dispatch<any>(openRunningProcessContextMenu(event, process));
- } else if (process) {
+ if (process) {
this.props.dispatch<any>(openProcessContextMenu(event, process));
}
this.props.dispatch<any>(loadDetailsPanel(resourceUuid));
diff --git a/src/views/process-panel/process-panel.tsx b/src/views/process-panel/process-panel.tsx
index 6c1d4a71..4a6b5fd3 100644
--- a/src/views/process-panel/process-panel.tsx
+++ b/src/views/process-panel/process-panel.tsx
@@ -6,7 +6,7 @@ import { RootState } from "store/store";
import { connect } from "react-redux";
import { getProcess, getSubprocesses, Process, getProcessStatus } from "store/processes/process";
import { Dispatch } from "redux";
-import { openProcessContextMenu, openRunningProcessContextMenu } from "store/context-menu/context-menu-actions";
+import { openProcessContextMenu } from "store/context-menu/context-menu-actions";
import { ProcessPanelRootDataProps, ProcessPanelRootActionProps, ProcessPanelRoot } from "./process-panel-root";
import { getProcessPanelCurrentUuid, ProcessPanel as ProcessPanelState } from "store/process-panel/process-panel";
import { groupBy } from "lodash";
@@ -19,7 +19,6 @@ import {
loadNodeJson,
} from "store/process-panel/process-panel-actions";
import { cancelRunningWorkflow, resumeOnHoldWorkflow, startWorkflow } from "store/processes/processes-actions";
-import { isProcessCancelable } from "store/processes/process";
import { navigateToLogCollection, pollProcessLogs, setProcessLogsPanelFilter } from "store/process-logs-panel/process-logs-panel-actions";
import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
@@ -52,10 +51,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ProcessPanelRootActionProps =>
);
},
onContextMenu: (event, process) => {
- // dispatch<any>(openProcessContextMenu(event, process));
- if (process && isProcessCancelable(process)) {
- dispatch<any>(openRunningProcessContextMenu(event, process));
- } else if (process) {
+ if (process) {
dispatch<any>(openProcessContextMenu(event, process));
}
},
diff --git a/src/views/subprocess-panel/subprocess-panel.tsx b/src/views/subprocess-panel/subprocess-panel.tsx
index 9ab069b6..0aa02d52 100644
--- a/src/views/subprocess-panel/subprocess-panel.tsx
+++ b/src/views/subprocess-panel/subprocess-panel.tsx
@@ -4,20 +4,17 @@
import { Dispatch } from "redux";
import { connect } from "react-redux";
-import { openProcessContextMenu, openRunningProcessContextMenu } from "store/context-menu/context-menu-actions";
+import { openProcessContextMenu } from "store/context-menu/context-menu-actions";
import { SubprocessPanelRoot, SubprocessPanelActionProps, SubprocessPanelDataProps } from "views/subprocess-panel/subprocess-panel-root";
import { RootState } from "store/store";
import { navigateTo } from "store/navigation/navigation-action";
import { loadDetailsPanel } from "store/details-panel/details-panel-action";
import { getProcess } from "store/processes/process";
-import { isProcessCancelable } from "store/processes/process";
const mapDispatchToProps = (dispatch: Dispatch): SubprocessPanelActionProps => ({
onContextMenu: (event, resourceUuid, resources) => {
const process = getProcess(resourceUuid)(resources);
- if (process && isProcessCancelable(process)) {
- dispatch<any>(openRunningProcessContextMenu(event, process));
- } else if (process) {
+ if (process) {
dispatch<any>(openProcessContextMenu(event, process));
}
},
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list