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;
30 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
32 export const ProcessPanelRoot = ({ process, ...props }: ProcessPanelRootProps) =>
34 ? <Grid container spacing={16} alignItems="stretch">
35 <Grid item sm={12} md={7}>
36 <ProcessInformationCard
38 onContextMenu={event => props.onContextMenu(event, process)}
39 openProcessInputDialog={props.openProcessInputDialog}
40 navigateToOutput={props.navigateToOutput}
41 navigateToWorkflow={props.navigateToWorkflow}
44 <Grid item sm={12} md={5}>
46 subprocessesAmount={props.totalSubprocessesLength}
47 filters={props.filters}
48 onToggle={props.onToggle}
53 subprocesses={props.subprocesses}
54 onContextMenu={props.onContextMenu} />
60 style={{ minHeight: '100%' }}>
63 messages={['Process not found']} />