Skip to content

Commit

Permalink
feat(core/pipeline): Add timestamp for failed executions (#7419)
Browse files Browse the repository at this point in the history
  • Loading branch information
jervi authored and Jammy Louie committed Sep 23, 2019
1 parent 3cfb3f1 commit 5d2e469
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/scripts/modules/core/src/pipeline/status/ExecutionStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export class ExecutionStatus extends React.Component<IExecutionStatusProps, IExe

this.state = {
sortFilter: ExecutionState.filterModel.asFilterModel.sortFilter,
timestamp: relativeTime(execution.startTime),
timestamp: relativeTime(execution.startTime || execution.buildTime),
};
}

private validateTimestamp(): void {
const newTimestamp = relativeTime(this.props.execution.startTime);
const newTimestamp = relativeTime(this.props.execution.startTime || this.props.execution.buildTime);
if (newTimestamp !== this.state.timestamp) {
this.setState({ timestamp: newTimestamp });
}
Expand Down Expand Up @@ -100,7 +100,11 @@ export class ExecutionStatus extends React.Component<IExecutionStatusProps, IExe
{has(trigger, 'buildInfo.url') && <li>{buildDisplayName(trigger.buildInfo)}</li>}
{TriggerExecutionStatus && <TriggerExecutionStatus trigger={trigger} authentication={authentication} />}
<li>
<HoverablePopover delayShow={100} delayHide={0} template={<span>{timestamp(execution.startTime)}</span>}>
<HoverablePopover
delayShow={100}
delayHide={0}
template={<span>{timestamp(execution.startTime || execution.buildTime)}</span>}
>
{this.state.timestamp}
</HoverablePopover>
</li>
Expand Down

0 comments on commit 5d2e469

Please sign in to comment.