20382: removed openRunningContextMenu and related code Arvados-DCO-1.1-Signed-off...
[arvados-workbench2.git] / src / store / context-menu / context-menu-actions.ts
index 18845ace76e1092a099f55437f02b418a3b4b186..464314877ff645328d838f2ddbbb1e4cd2a99ec7 100644 (file)
@@ -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) {