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 { SubprocessPanel } from '~/views/subprocess-panel/subprocess-panel';
12 import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter';
14 export interface ProcessPanelRootDataProps {
16 subprocesses: Array<Process>;
17 filters: Array<SubprocessFilterDataProps>;
20 export interface ProcessPanelRootActionProps {
21 onContextMenu: (event: React.MouseEvent<HTMLElement>, process: Process) => void;
22 onToggle: (status: string) => void;
23 openProcessInputDialog: (uuid: string) => void;
24 navigateToOutput: (uuid: string) => void;
25 navigateToWorkflow: (uuid: string) => void;
26 cancelProcess: (uuid: string) => void;
29 export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
31 export const ProcessPanelRoot = ({ process, ...props }: ProcessPanelRootProps) =>
33 ? <Grid container spacing={16} alignItems="stretch">
34 <Grid item sm={12} md={12}>
35 <ProcessInformationCard
37 onContextMenu={event => props.onContextMenu(event, process)}
38 openProcessInputDialog={props.openProcessInputDialog}
39 navigateToOutput={props.navigateToOutput}
40 openWorkflow={props.navigateToWorkflow}
41 cancelProcess={props.cancelProcess}
44 <Grid item sm={12} md={12}>
51 style={{ minHeight: '100%' }}>
54 messages={['Process not found']} />