1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
15 } from '@material-ui/core';
16 import { ArvadosTheme } from 'common/custom-theme';
17 import { CloseIcon } from 'components/icon/icon';
18 import { Process } from 'store/processes/process';
19 import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view';
20 import { ProcessDetailsAttributes } from './process-details-attributes';
22 type CssRules = 'card' | 'content' | 'title';
24 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
30 paddingBottom: theme.spacing.unit * 2,
35 paddingTop: theme.spacing.unit * 0.5
39 export interface ProcessDetailsCardDataProps {
43 type ProcessDetailsCardProps = ProcessDetailsCardDataProps & WithStyles<CssRules> & MPVPanelProps;
45 export const ProcessDetailsCard = withStyles(styles)(
46 ({ classes, process, doHidePanel, panelName }: ProcessDetailsCardProps) => {
47 return <Card className={classes.card}>
50 content: classes.title,
53 action={ doHidePanel &&
54 <Tooltip title={`Close ${panelName || 'panel'}`} disableFocusListener>
55 <IconButton onClick={doHidePanel}><CloseIcon /></IconButton>
57 <CardContent className={classes.content}>
58 <ProcessDetailsAttributes item={process.containerRequest} twoCol />