Merge pull request #17603 from adamdmharvey/adamdmharvey/hide-start-time-if-missing

feat(circleci): Hide time column data for queued builds
This commit is contained in:
Johan Haals
2023-05-02 12:02:17 +02:00
committed by GitHub
2 changed files with 18 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-circleci': patch
---
Hide empty time field data for queued builds which haven't started yet
@@ -205,18 +205,19 @@ const generatedColumns: TableColumn[] = [
{
title: 'Time',
field: 'startTime',
render: (row: Partial<CITableBuildInfo>) => (
<>
<Typography variant="body2">
run {relativeTimeTo(row?.startTime)}
</Typography>
<Typography variant="body2">
{row?.stopTime
? `took ${durationHumanized(row?.startTime, row?.stopTime)}`
: ''}
</Typography>
</>
),
render: (row: Partial<CITableBuildInfo>) =>
row?.startTime ? (
<>
<Typography variant="body2">
run {relativeTimeTo(row?.startTime)}
</Typography>
<Typography variant="body2">
{row?.stopTime
? `took ${durationHumanized(row?.startTime, row?.stopTime)}`
: ''}
</Typography>
</>
) : null,
},
{
title: 'Workflow',