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;
27 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
29 export const ProcessPanelRoot = ({process, ...props}: ProcessPanelRootProps) =>
31 ? <Grid container spacing={16} alignItems="stretch">
32 <Grid item sm={12} md={7}>
33 <ProcessInformationCard
35 onContextMenu={event => props.onContextMenu(event, process)} />
37 <Grid item sm={12} md={5}>
39 subprocessesAmount={props.totalSubprocessesLength}
40 filters={props.filters}
41 onToggle={props.onToggle}
46 subprocesses={props.subprocesses}
47 onContextMenu={props.onContextMenu} />
53 style={{ minHeight: '100%' }}>
56 messages={['Process not found']} />