Skip to content

Commit

Permalink
fix(ui): correct typing errors in workflow-drawer (argoproj#4373)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Herman <[email protected]>
  • Loading branch information
dcherman committed Oct 27, 2020
1 parent cc9c058 commit bdac65b
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,29 @@ export class WorkflowDrawer extends React.Component<WorkflowDrawerProps, Workflo
}

public render() {
if (!this.state.workflow) {
const wf = this.state.workflow;

if (!wf) {
return <Loading />;
}
const wf = this.state.workflow;

return (
<div className='workflow-drawer'>
{!wf.status.message ? null : (
{!wf.status || !wf.status.message ? null : (
<div className='workflow-drawer__section workflow-drawer__message'>
<div className='workflow-drawer__title workflow-drawer__message--label'>MESSAGE</div>
<div className='workflow-drawer__message--content'>{wf.status.message}</div>
</div>
)}
{!wf.status.conditions ? null : (
{!wf.status || !wf.status.conditions ? null : (
<div className='workflow-drawer__section'>
<div className='workflow-drawer__title'>CONDITIONS</div>
<div className='workflow-drawer__conditions'>
<ConditionsPanel conditions={wf.status.conditions} />
</div>
</div>
)}
{!wf.status.resourcesDuration ? null : (
{!wf.status || !wf.status.resourcesDuration ? null : (
<div className='workflow-drawer__section'>
<div>
<InlineTable
Expand Down Expand Up @@ -89,7 +91,7 @@ export class WorkflowDrawer extends React.Component<WorkflowDrawerProps, Workflo
<div className='workflow-drawer__section'>
<div className='workflow-drawer__title'>FROM</div>
<div className='workflow-drawer__workflowFrom'>
<WorkflowFrom namespace={wf.metadata.namespace} labels={wf.metadata.labels} />
<WorkflowFrom namespace={wf.metadata.namespace || 'default'} labels={wf.metadata.labels || {}} />
</div>
</div>
<div className='workflow-drawer__section workflow-drawer__labels'>
Expand Down

0 comments on commit bdac65b

Please sign in to comment.