X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fc3d9ac09fbb1cdc4fb4b00f2f704795ad365110..56069f1f9fa111b9756e9bfa7a3b0c9dba2e9a7a:/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 57c127a049..9607f49a5a 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,16 +56,11 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingTop: 0, paddingBottom: 0, }, + moreOptions: { + position: 'absolute' + } }); -export enum SubprocessesStatus { - ACTIVE = 'Active', - COMPLETED = 'Completed', - QUEUED = 'Queued', - FAILED = 'Failed', - CANCELED = 'Canceled' -} - export interface SubprocessItemProps { title: string; status: string; @@ -77,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) => { @@ -88,27 +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 + });