Skip to content

Commit f63fb7d

Browse files
fix build
1 parent 1a2a79a commit f63fb7d

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

frontend/src/components/RunsList.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,31 @@ const RunsList: React.FC<Props> = ({ pipelineId, query, triggerId }) => {
131131
</Link>
132132
</TableCell>
133133
)}
134-
<TableCell title={formatDateTime(run.start_time, true)}>
134+
<TableCell
135+
title={
136+
run.start_time
137+
? formatDateTime(run.start_time, true)
138+
: undefined
139+
}
140+
>
135141
<Text>
136-
{differenceInDays(new Date(), run.start_time) <= 1
137-
? formatDistanceToNow(run.start_time, {
138-
addSuffix: true,
139-
includeSeconds: true,
140-
})
141-
: formatDateTime(run.start_time)}
142+
{run.start_time
143+
? differenceInDays(new Date(), run.start_time) <= 1
144+
? formatDistanceToNow(run.start_time, {
145+
addSuffix: true,
146+
includeSeconds: true,
147+
})
148+
: formatDateTime(run.start_time)
149+
: '-'}
142150
</Text>
143151
</TableCell>
144152
<TableCell className="text-right">
145153
{run.status !== 'running' ? (
146154
(run.duration / 1000).toFixed(2)
147-
) : (
155+
) : run.start_time ? (
148156
<Timer startTime={run.start_time} />
157+
) : (
158+
'-'
149159
)}{' '}
150160
s
151161
</TableCell>

frontend/src/components/RunsStatusChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ const RunsStatusChart: React.FC<Props> = ({ query, subject }) => {
7272
data={runs.map((run) => ({
7373
key: run.id,
7474
color: STATUS_COLORS[run.status],
75-
tooltip: `#${run.id} - ${run.start_time.toLocaleString()}: ${
76-
run.status
77-
}`,
75+
tooltip: `#${run.id} - ${
76+
run.start_time ? run.start_time.toLocaleString() : ''
77+
}: ${run.status}`,
7878
}))}
7979
/>
8080
</>

0 commit comments

Comments
 (0)