Skip to content

Commit

Permalink
add created at
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericHeem committed Dec 7, 2023
1 parent d847fef commit e39c46e
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions examples/gccd/src/components/run/runDetailContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function (context: Context) {
svgUrl,
error,
kind,
created_at,
} = data.val;
return loading.val
? TableSkeleton({ columnsSize: 2, rowSize: 8 })
Expand Down Expand Up @@ -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(
Expand All @@ -98,8 +111,9 @@ export default function (context: Context) {
span(
a({ href: logsUrl, target: "_blank" }, "Download log file")
)
)
)
),
]
)
);
});
};
Expand Down

0 comments on commit e39c46e

Please sign in to comment.