File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
site/frontend/src/pages/status Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11<script setup lang="tsx">
22import {h , ref , Ref } from " vue" ;
3- import {parseISO , differenceInHours , differenceInSeconds } from " date-fns" ;
3+ import {
4+ parseISO ,
5+ differenceInHours ,
6+ differenceInSeconds ,
7+ format ,
8+ } from " date-fns" ;
49import {
510 formatISODate ,
611 formatSecondsAsDuration ,
@@ -121,6 +126,16 @@ function timeSince(timestamp: string): string {
121126 const diffSeconds = differenceInSeconds (now , date );
122127 return formatSecondsAsDuration (diffSeconds );
123128}
129+
130+ // Takes a date like `2025-09-10T08:22:47.161348Z` and shows just the time
131+ // portion (`08:22:47`).
132+ function formatTime(dateString : string | null ): string {
133+ const date = parseDateIsoStringOrNull (dateString );
134+ if (date === null ) {
135+ return " " ;
136+ }
137+ return format (date , " HH:mm:ss" );
138+ }
124139 </script >
125140
126141<template >
@@ -208,10 +223,10 @@ function timeSince(timestamp: string): string {
208223 {{ formatJobStatus(job.status) }}
209224 </td >
210225 <td :title =" `Started ${timeSince(job.startedAt)} ago`" >
211- {{ formatISODate (job.startedAt) }}
226+ {{ formatTime (job.startedAt) }}
212227 </td >
213228 <td >
214- {{ formatISODate (job.completedAt) }}
229+ {{ formatTime (job.completedAt) }}
215230 </td >
216231 <td >{{ formatJobKind(job.kind) }}</td >
217232 <td >{{ formatBackend(job) }}</td >
You can’t perform that action at this time.
0 commit comments