1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as 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 { SubprocessesCard } from './subprocesses-card';
12 import { ProcessSubprocesses } from '~/views/process-panel/process-subprocesses';
13 import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter';
15 export interface ProcessPanelRootDataProps {
17 subprocesses: Array<Process>;
18 filters: Array<SubprocessFilterDataProps>;
19 totalSubprocessesLength: number;
22 export interface ProcessPanelRootActionProps {
23 onContextMenu: (event: React.MouseEvent<HTMLElement>, process: Process) => void;
24 onToggle: (status: string) => void;
25 openProcessInputDialog: (uuid: string) => void;
26 navigateToOutput: (uuid: string) => void;
27 navigateToWorkflow: (uuid: string) => void;
28 cancelProcess: (uuid: string) => void;
31 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
33 export const ProcessPanelRoot = ({ process, ...props }: ProcessPanelRootProps) =>
35 ? <Grid container spacing={16} alignItems="stretch">
36 <Grid item sm={12} md={7}>
37 <ProcessInformationCard
39 onContextMenu={event => props.onContextMenu(event, process)}
40 openProcessInputDialog={props.openProcessInputDialog}
41 navigateToOutput={props.navigateToOutput}
42 openWorkflow={props.navigateToWorkflow}
43 cancelProcess={props.cancelProcess}
46 <Grid item sm={12} md={5}>
48 subprocessesAmount={props.totalSubprocessesLength}
49 filters={props.filters}
50 onToggle={props.onToggle}
55 subprocesses={props.subprocesses}
56 onContextMenu={props.onContextMenu} />
62 style={{ minHeight: '100%' }}>
65 messages={['Process not found']} />