Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show execution create time when hovering on status badge #842

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
IconButton,
Button,
CircularProgress,
Tooltip,
} from '@material-ui/core';
import ArchiveOutlined from '@material-ui/icons/ArchiveOutlined';
import UnarchiveOutline from '@material-ui/icons/UnarchiveOutlined';
Expand Down Expand Up @@ -54,24 +55,57 @@

export function getStatusCell(execution: Execution): React.ReactNode {
const isArchived = isExecutionArchived(execution);
const { createdAt } = execution.closure;
const createdAtDate = timestampToDate(createdAt);
const phase = execution.closure.phase ?? WorkflowExecutionPhase.UNDEFINED;

return (
<ExecutionStatusBadge phase={phase} type="workflow" disabled={isArchived} />
<Tooltip
placement="top"
arrow
title={
<>
<Typography>Create Time</Typography>
<Typography>{formatDateUTC(createdAtDate)}</Typography>
<Typography>{formatDateLocalTimezone(createdAtDate)}</Typography>
</>
}
>
<div>
<ExecutionStatusBadge
phase={phase}
type="workflow"
disabled={isArchived}
/>
</div>
</Tooltip>
);
}

export function getStartTimeCell(execution: Execution): React.ReactNode {
const { startedAt } = execution.closure;
const { startedAt, createdAt } = execution.closure;

if (!startedAt) {
if (!startedAt || !createdAt) {
return null;
}

const startedAtDate = timestampToDate(startedAt);
const createdAtDate = timestampToDate(createdAt);

Check warning on line 93 in packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx

View workflow job for this annotation

GitHub Actions / lint_project

'createdAtDate' is assigned a value but never used
const isArchived = isExecutionArchived(execution);

return (
// <Tooltip
// placement="top"
// arrow
// title={
// <>
// <Typography>Create Time</Typography>
// <Typography>{formatDateUTC(createdAtDate)}</Typography>
// <Typography>{formatDateLocalTimezone(createdAtDate)}</Typography>
// </>
// }
// >
// <div>
<>
<Typography
variant="body1"
Expand All @@ -83,6 +117,8 @@
{formatDateLocalTimezone(startedAtDate)}
</Typography>
</>
// </div>
// </Tooltip>
);
}

Expand Down
Loading