X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7f2055dd51e545eb9f9998d001ec6badfa9f0bb7..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 287b725b04..9b21ce5e27 100644 --- a/src/views/process-panel/process-information-card.tsx +++ b/src/views/process-panel/process-information-card.tsx @@ -70,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)}> - - + + onContextMenu(event)}> + + + } title={ @@ -101,18 +104,18 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })( } subheader={ - + - {process.containerRequest.description || '(no-description)'} + {getDescription(process)} } /> + label='From' value={process.container ? formatDate(process.container.startedAt!) : 'N/A'} /> + label='To' value={process.container ? formatDate(process.container.finishedAt!) : 'N/A'} /> @@ -123,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)';