1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { Grid } from '@material-ui/core';
7 import { ProcessInformationCard } from './process-information-card';
8 import { DefaultView } from 'components/default-view/default-view';
9 import { ProcessIcon } from 'components/icon/icon';
10 import { Process } from 'store/processes/process';
11 import { SubprocessPanel } from 'views/subprocess-panel/subprocess-panel';
12 import { SubprocessFilterDataProps } from 'components/subprocess-filter/subprocess-filter';
13 import { MPVContainer, MPVPanelContent } from 'components/multi-panel-view/multi-panel-view';
15 export interface ProcessPanelRootDataProps {
17 subprocesses: Array<Process>;
18 filters: Array<SubprocessFilterDataProps>;
21 export interface ProcessPanelRootActionProps {
22 onContextMenu: (event: React.MouseEvent<HTMLElement>, process: Process) => void;
23 onToggle: (status: string) => void;
24 openProcessInputDialog: (uuid: string) => void;
25 navigateToOutput: (uuid: string) => void;
26 navigateToWorkflow: (uuid: string) => void;
27 cancelProcess: (uuid: string) => void;
30 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
32 export const ProcessPanelRoot = ({ process, ...props }: ProcessPanelRootProps) =>
34 ? <MPVContainer spacing={8} panelNames={["Info", "Subprocesses"]} alignItems="stretch">
35 <MPVPanelContent sm={12} md={12}>
36 <ProcessInformationCard
38 onContextMenu={event => props.onContextMenu(event, process)}
39 openProcessInputDialog={props.openProcessInputDialog}
40 navigateToOutput={props.navigateToOutput}
41 openWorkflow={props.navigateToWorkflow}
42 cancelProcess={props.cancelProcess}
45 <MPVPanelContent sm={12} md={12}>
52 style={{ minHeight: '100%' }}>
55 messages={['Process not found']} />