From 5415ab0b04919fafdd3a7e8b37e05c94be154603 Mon Sep 17 00:00:00 2001 From: Domonkos Gulyas <domonkos.gulyas@ess.edu> Date: Mon, 13 Jan 2025 17:44:41 +0100 Subject: [PATCH] CE-3301: Update duration real time --- src/components/Job/JobDetails.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Job/JobDetails.tsx b/src/components/Job/JobDetails.tsx index 8f7453a1..244da05e 100644 --- a/src/components/Job/JobDetails.tsx +++ b/src/components/Job/JobDetails.tsx @@ -32,8 +32,6 @@ const createAlert = (type: Status, message: string) => { }; const getDeploymentDetails = (operation: JobDetails) => { - const startTime = operation?.startTime ?? operation?.createdAt; - return { user: ( <InternalLink @@ -63,11 +61,10 @@ const getDeploymentDetails = (operation: JobDetails) => { ) : ( <EmptyValue /> ), - duration: operation?.finishedAt ? ( + duration: operation ? ( <Duration - createOrStartDate={startTime && new Date(startTime)} - finishedAt={operation?.finishedAt && new Date(operation?.finishedAt)} - textOnly + createOrStartDate={new Date(operation.createdAt ?? new Date())} + finishedAt={new Date(operation.finishedAt ?? new Date())} /> ) : ( <EmptyValue /> -- GitLab