15672: Uses process context menu on subprocess panel.
[arvados-workbench2.git] / src / views / process-log-panel / process-log-panel.tsx
index b467a14e38bd6c5b750f9a08a3c6bda963c26b7c..f5425dbcab5b56735fa0a73294c6506ed17618cd 100644 (file)
@@ -2,7 +2,6 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
 import { RootState } from '~/store/store';
 import { connect } from 'react-redux';
 import { getProcess } from '~/store/processes/process';
@@ -10,8 +9,8 @@ import { Dispatch } from 'redux';
 import { openProcessContextMenu } from '~/store/context-menu/context-menu-actions';
 import { ProcessLogPanelRootDataProps, ProcessLogPanelRootActionProps, ProcessLogPanelRoot } from './process-log-panel-root';
 import { getProcessPanelLogs } from '~/store/process-logs-panel/process-logs-panel';
-import { setProcessLogsPanelFilter } from '~/store/process-logs-panel/process-logs-panel-actions';
-import { getProcessLogsPanelCurrentUuid } from '../../store/process-logs-panel/process-logs-panel';
+import { setProcessLogsPanelFilter, navigateToLogCollection } from '~/store/process-logs-panel/process-logs-panel-actions';
+import { getProcessLogsPanelCurrentUuid } from '~/store/process-logs-panel/process-logs-panel';
 
 export interface Log {
     object_uuid: string;
@@ -38,11 +37,14 @@ const mapStateToProps = (state: RootState): ProcessLogPanelRootDataProps => {
 };
 
 const mapDispatchToProps = (dispatch: Dispatch): ProcessLogPanelRootActionProps => ({
-    onContextMenu: (event: React.MouseEvent<HTMLElement>) => {
-        dispatch<any>(openProcessContextMenu(event));
+    onContextMenu: (event, process) => {
+        dispatch<any>(openProcessContextMenu(event, process));
     },
-    onChange: (filter: FilterOption) => {
+    onChange: filter => {
         dispatch(setProcessLogsPanelFilter(filter.value));
+    },
+    navigateToLogCollection: (uuid: string) => {
+        dispatch<any>(navigateToLogCollection(uuid));
     }
 });