X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f5c0cb11102a006cda59711f29458b7569b9a21f..c382494c58a296a0302e774bae8783e03a042174:/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 01bb3ae79e..7f3e025f8d 100644 --- a/src/views/process-panel/process-information-card.tsx +++ b/src/views/process-panel/process-information-card.tsx @@ -11,7 +11,7 @@ import { ArvadosTheme } from '~/common/custom-theme'; import { MoreOptionsIcon, ProcessIcon } from '~/components/icon/icon'; import { DetailsAttribute } from '~/components/details-attribute/details-attribute'; import { Process } from '~/store/processes/process'; -import { getProcessStatus, getProcessStatusColor } from '../../store/processes/process'; +import { getProcessStatus, getProcessStatusColor } from '~/store/processes/process'; import { formatDate } from '~/common/formatters'; @@ -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: { @@ -69,12 +68,14 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ export interface ProcessInformationCardDataProps { process: Process; onContextMenu: (event: React.MouseEvent) => void; + openProcessInputDialog: (uuid: string) => void; + navigateToOutput: (uuid: string) => void; } -type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles; +type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles; export const ProcessInformationCard = withStyles(styles, { withTheme: true })( - ({ classes, process, onContextMenu, theme }: ProcessInformationCardProps) => + ({ classes, process, onContextMenu, theme, openProcessInputDialog, navigateToOutput }: ProcessInformationCardProps) => - onContextMenu(event)}> - - + + onContextMenu(event)}> + + + } title={ @@ -102,9 +105,9 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })( } subheader={ - + - {process.containerRequest.description || '(no-description)'} + {getDescription(process)} } /> @@ -118,10 +121,17 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })( label='Workflow' value='???' /> - - + navigateToOutput(process.containerRequest.outputUuid!)}> + + + openProcessInputDialog(process.containerRequest.uuid)}> + + -); \ No newline at end of file +); + +const getDescription = (process: Process) => + process.containerRequest.description || '(no-description)';