X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4f4f2feaf1ac31946a87290ba4eef3a6b5455f2d..2c8a2efbe5bac7df0a13a17ed773102d95fd1111:/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 7f3e025f8d..52f13987d9 100644 --- a/src/views/process-panel/process-information-card.tsx +++ b/src/views/process-panel/process-information-card.tsx @@ -13,7 +13,7 @@ import { DetailsAttribute } from '~/components/details-attribute/details-attribu import { Process } from '~/store/processes/process'; import { getProcessStatus, getProcessStatusColor } from '~/store/processes/process'; import { formatDate } from '~/common/formatters'; - +import { openWorkflow } from "~/store/process-panel/process-panel-actions"; type CssRules = 'card' | 'iconHeader' | 'label' | 'value' | 'chip' | 'link' | 'content' | 'title' | 'avatar'; @@ -70,29 +70,33 @@ export interface ProcessInformationCardDataProps { onContextMenu: (event: React.MouseEvent) => void; openProcessInputDialog: (uuid: string) => void; navigateToOutput: (uuid: string) => void; + navigateToWorkflow: (uuid: string) => void; } type ProcessInformationCardProps = ProcessInformationCardDataProps & WithStyles; export const ProcessInformationCard = withStyles(styles, { withTheme: true })( - ({ classes, process, onContextMenu, theme, openProcessInputDialog, navigateToOutput }: ProcessInformationCardProps) => - + ({ classes, process, onContextMenu, theme, openProcessInputDialog, navigateToOutput, navigateToWorkflow }: ProcessInformationCardProps) => { + const { container } = process; + const startedAt = container ? formatDate(container.startedAt) : 'N/A'; + const finishedAt = container ? formatDate(container.finishedAt) : 'N/A'; + return } + avatar={} action={
+ className={classes.chip} + style={{backgroundColor: getProcessStatusColor(getProcessStatus(process), theme as ArvadosTheme)}}/> onContextMenu(event)}> - +
@@ -109,28 +113,34 @@ export const ProcessInformationCard = withStyles(styles, { withTheme: true })( {getDescription(process)} - } /> + }/> + label='From' + value={process.container ? formatDate(startedAt) : 'N/A'}/> - + label='To' + value={process.container ? formatDate(finishedAt) : 'N/A'}/> + {process.containerRequest.properties.templateUuid && + navigateToWorkflow(process.containerRequest.properties.templateUuid)} + />} navigateToOutput(process.containerRequest.outputUuid!)}> - + openProcessInputDialog(process.containerRequest.uuid)}> - + -
+
; + } ); const getDescription = (process: Process) =>