From 9722b78486ace9640c226147ba86fb5e09cc4b0d Mon Sep 17 00:00:00 2001 From: xwk1246 Date: Thu, 15 Feb 2024 19:17:35 +0800 Subject: [PATCH] feat: show execution create time when hovering on status badge Signed-off-by: xwk1246 --- .../Tables/WorkflowExecutionTable/cells.tsx | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx index 0a0e68718..232365cdb 100644 --- a/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx +++ b/packages/console/src/components/Executions/Tables/WorkflowExecutionTable/cells.tsx @@ -4,6 +4,7 @@ import { IconButton, Button, CircularProgress, + Tooltip, } from '@material-ui/core'; import ArchiveOutlined from '@material-ui/icons/ArchiveOutlined'; import UnarchiveOutline from '@material-ui/icons/UnarchiveOutlined'; @@ -54,24 +55,57 @@ export function getExecutionIdCell( 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 ( - + + Create Time + {formatDateUTC(createdAtDate)} + {formatDateLocalTimezone(createdAtDate)} + + } + > +
+ +
+
); } 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); const isArchived = isExecutionArchived(execution); return ( + // + // Create Time + // {formatDateUTC(createdAtDate)} + // {formatDateLocalTimezone(createdAtDate)} + // + // } + // > + //
<> + //
+ //
); }