X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4e3dc54aa0b5b240f81ed8af89cccc6b47202a19..c7bc8de8c8feccfd36b23f4228099ce86f365841:/src/views/process-panel/process-information-card.tsx diff --git a/src/views/process-panel/process-information-card.tsx b/src/views/process-panel/process-information-card.tsx index ea5144c3f0..9b21ce5e27 100644 --- a/src/views/process-panel/process-information-card.tsx +++ b/src/views/process-panel/process-information-card.tsx @@ -19,7 +19,7 @@ type CssRules = 'card' | 'iconHeader' | 'label' | 'value' | 'chip' | 'link' | 'c const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ card: { - marginBottom: theme.spacing.unit * 2 + height: '100%' }, iconHeader: { fontSize: '1.875rem', @@ -57,7 +57,6 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ content: { '&:last-child': { paddingBottom: theme.spacing.unit * 2, - paddingTop: '0px' } }, title: { @@ -71,11 +70,12 @@ export interface ProcessInformationCardDataProps { onContextMenu: (event: React.MouseEvent) => void; } -type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles; +type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles; export const ProcessInformationCard = withStyles(styles, { withTheme: true })( ({ classes, process, onContextMenu, theme }: ProcessInformationCardProps) => + {console.log(process)} - onContextMenu(event)}> - - + className={classes.chip} + style={{ backgroundColor: getProcessStatusColor(getProcessStatus(process), theme as ArvadosTheme) }} /> + + onContextMenu(event)}> + + + } title={ - - - {process.containerRequest.name} + + + {process.containerRequest.name} } - subheader={process.containerRequest.description} /> + subheader={ + + + {getDescription(process)} + + } /> @@ -119,4 +126,7 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })( -); \ No newline at end of file +); + +const getDescription = (process: Process) => + process.containerRequest.description || '(no-description)';