Skip to content

Commit

Permalink
fix: Say no logs were outputted when pod is done (argoproj#2373)
Browse files Browse the repository at this point in the history
  • Loading branch information
simster7 authored Mar 6, 2020
1 parent 847c350 commit 7bf0819
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ export class WorkflowLogsViewer extends React.Component<WorkflowLogsViewerProps,
<i className='fa fa-exclamation-triangle status-icon--failed' /> Failed to load logs: {this.state.error.message}
</p>
)}
{!this.state.error && this.state.lines.length === 0 && (
{!this.state.error && this.state.lines.length === 0 && this.isCurrentNodeRunningOrPending() && (
<p>
<i className='fa fa-circle-notch fa-spin' /> Waiting for data...
</p>
)}
{!this.state.error && this.state.lines.length === 0 && !this.isCurrentNodeRunningOrPending() && <p>Pod did not output any logs.</p>}
{this.state.lines.length > 0 && (
<div className='log-box'>
<i className='fa fa-chevron-down' />
Expand Down Expand Up @@ -100,4 +101,8 @@ export class WorkflowLogsViewer extends React.Component<WorkflowLogsViewerProps,
</div>
);
}

private isCurrentNodeRunningOrPending(): boolean {
return this.props.workflow.status.nodes[this.props.nodeId].phase === 'Running' || this.props.workflow.status.nodes[this.props.nodeId].phase === 'Pending';
}
}

0 comments on commit 7bf0819

Please sign in to comment.