From e39c46ef4aa2e0e1909c4a8e41985ab0db679f4c Mon Sep 17 00:00:00 2001 From: Frederic Heem Date: Thu, 7 Dec 2023 18:17:33 -0300 Subject: [PATCH] add created at --- .../src/components/run/runDetailContent.ts | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/examples/gccd/src/components/run/runDetailContent.ts b/examples/gccd/src/components/run/runDetailContent.ts index 48c885c2..c65783de 100644 --- a/examples/gccd/src/components/run/runDetailContent.ts +++ b/examples/gccd/src/components/run/runDetailContent.ts @@ -29,6 +29,7 @@ export default function (context: Context) { svgUrl, error, kind, + created_at, } = data.val; return loading.val ? TableSkeleton({ columnsSize: 2, rowSize: 8 }) @@ -69,11 +70,23 @@ export default function (context: Context) { ) ), li(label("RunId"), span(run_id)), - li(label("Kind"), span(kind)), - li(label("Status"), span(RunStatus({ status, error }))) + li(label("Kind"), span(kind)) ), - isCompleted(status) && - KeyValueList( + KeyValueList( + li(label("Status"), span(RunStatus({ status, error }))), + li( + label("Created at"), + span( + new Intl.DateTimeFormat("default", { + hour: "numeric", + minute: "numeric", + year: "numeric", + month: "numeric", + day: "numeric", + }).format(new Date(created_at)) + ) + ), + isCompleted(status) && [ li( label("State file"), span( @@ -98,8 +111,9 @@ export default function (context: Context) { span( a({ href: logsUrl, target: "_blank" }, "Download log file") ) - ) - ) + ), + ] + ) ); }); };