Merge branch '14178-tooltips-for-more-options'
[arvados.git] / src / views / process-panel / process-subprocesses.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { Grid } from '@material-ui/core';
7 import { ProcessSubprocessesCard } from '~/views/process-panel/process-subprocesses-card';
8 import { Process } from '~/store/processes/process';
9
10 export interface ProcessSubprocessesDataProps {
11     subprocesses: Array<Process>;
12     onContextMenu: (event: React.MouseEvent<HTMLElement>) => void;
13 }
14
15 export const ProcessSubprocesses = ({ onContextMenu, subprocesses }: ProcessSubprocessesDataProps) => {
16     return <Grid container spacing={16}>
17         {subprocesses.map(subprocess =>
18             <Grid item xs={12} sm={6} md={4} lg={2} key={subprocess.containerRequest.uuid}>
19                 <ProcessSubprocessesCard onContextMenu={onContextMenu} subprocess={subprocess} />
20             </Grid>
21         )}
22     </Grid>;
23 };