X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c324b64f3b26e79b4640b6f0cf55671f1a261bca..2f857ebcd67a607b7fde9c0ea4808ac30c591876:/src/views/process-panel/process-subprocesses-card.tsx diff --git a/src/views/process-panel/process-subprocesses-card.tsx b/src/views/process-panel/process-subprocesses-card.tsx index 54e0206e..9607f49a 100644 --- a/src/views/process-panel/process-subprocesses-card.tsx +++ b/src/views/process-panel/process-subprocesses-card.tsx @@ -14,7 +14,7 @@ import { Process, getProcessStatus, getProcessRuntime } from '~/store/processes/ import { formatTime } from '~/common/formatters'; import { getProcessStatusColor } from '~/store/processes/process'; -export type CssRules = 'label' | 'value' | 'title' | 'content' | 'action' | 'options' | 'status' | 'rightSideHeader' | 'titleHeader' | 'header'; +export type CssRules = 'label' | 'value' | 'title' | 'content' | 'action' | 'options' | 'status' | 'rightSideHeader' | 'titleHeader' | 'header' | 'moreOptions'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ label: { @@ -42,7 +42,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ color: theme.palette.common.white, }, status: { - paddingTop: theme.spacing.unit * 0.5, + paddingTop: theme.spacing.unit * 0.75, color: theme.palette.common.white, }, rightSideHeader: { @@ -56,6 +56,9 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingTop: 0, paddingBottom: 0, }, + moreOptions: { + position: 'absolute' + } }); export interface SubprocessItemProps { @@ -69,7 +72,7 @@ export interface ProcessSubprocessesCardDataProps { subprocess: Process; } -type ProcessSubprocessesCardProps = ProcessSubprocessesCardDataProps & WithStyles; +type ProcessSubprocessesCardProps = ProcessSubprocessesCardDataProps & WithStyles; export const ProcessSubprocessesCard = withStyles(styles, { withTheme: true })( ({ classes, onContextMenu, subprocess, theme }: ProcessSubprocessesCardProps) => { @@ -80,29 +83,31 @@ export const ProcessSubprocessesCard = withStyles(styles, { withTheme: true })( classes={{ content: classes.title, action: classes.action }} action={
- + {getProcessStatus(subprocess)} - + - +
} title={ - + {subprocess.containerRequest.name} } /> + label="Runtime" value={subprocess.container && subprocess.container.startedAt && subprocess.container.finishedAt + ? formatTime(getProcessRuntime(subprocess)) : + '(none)'} /> ; - }); \ No newline at end of file + });