Skip to content

Commit

Permalink
Removed Started at date
Browse files Browse the repository at this point in the history
  • Loading branch information
pnaik1 committed Oct 19, 2023
1 parent c0dca01 commit 4b83d24
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PipelineRunTabDetails: React.FC<PipelineRunTabDetailsProps> = ({
workflowName,
}) => {
const { namespace, project } = usePipelinesAPI();

const epoch = new Date(0).toISOString().slice(0, -5) + 'Z';
if (!pipelineRunKF || !workflowName) {
return (
<EmptyState variant={EmptyStateVariant.large} data-id="loading-empty-state">
Expand Down Expand Up @@ -62,10 +62,12 @@ const PipelineRunTabDetails: React.FC<PipelineRunTabDetailsProps> = ({
{ key: 'Workflow name', value: workflowName },
{ key: 'Created at', value: asTimestamp(new Date(pipelineRunKF.created_at)) },
{
key: 'Started at',
value: asTimestamp(new Date(pipelineRunKF.scheduled_at || pipelineRunKF.created_at)),
key: 'Finished at',
value:
pipelineRunKF.finished_at === epoch
? 'N/A'
: asTimestamp(new Date(pipelineRunKF.finished_at)),
},
{ key: 'Finished at', value: asTimestamp(new Date(pipelineRunKF.finished_at)) },
{ key: 'Duration', value: relativeDuration(getRunDuration(pipelineRunKF)) },
];

Expand Down

0 comments on commit 4b83d24

Please sign in to comment.