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;
28 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
30 export const ProcessPanelRoot = ({ process, ...props }: ProcessPanelRootProps) =>
32 ? <Grid container spacing={16} alignItems="stretch">
33 <Grid item sm={12} md={7}>
34 <ProcessInformationCard
36 onContextMenu={event => props.onContextMenu(event, process)}
37 openProcessInputDialog={props.openProcessInputDialog} />
39 <Grid item sm={12} md={5}>
41 subprocessesAmount={props.totalSubprocessesLength}
42 filters={props.filters}
43 onToggle={props.onToggle}
48 subprocesses={props.subprocesses}
49 onContextMenu={props.onContextMenu} />
55 style={{ minHeight: '100%' }}>
58 messages={['Process not found']} />