mirror of
https://github.com/ansible/awx.git
synced 2026-04-11 04:59:22 -02:30
Only render the launch modals if errors are present. This addresses a local unit test failure.
This commit is contained in:
@@ -113,25 +113,29 @@ class LaunchButton extends React.Component {
|
|||||||
handleLaunch: this.handleLaunch,
|
handleLaunch: this.handleLaunch,
|
||||||
handleRelaunch: this.handleRelaunch,
|
handleRelaunch: this.handleRelaunch,
|
||||||
})}
|
})}
|
||||||
<AlertModal
|
{launchError && (
|
||||||
isOpen={launchError}
|
<AlertModal
|
||||||
variant="danger"
|
isOpen={launchError}
|
||||||
title={i18n._(t`Error!`)}
|
variant="danger"
|
||||||
onClose={this.handleLaunchErrorClose}
|
title={i18n._(t`Error!`)}
|
||||||
>
|
onClose={this.handleLaunchErrorClose}
|
||||||
{i18n._(t`Failed to launch job.`)}
|
>
|
||||||
<ErrorDetail error={launchError} />
|
{i18n._(t`Failed to launch job.`)}
|
||||||
</AlertModal>
|
<ErrorDetail error={launchError} />
|
||||||
<AlertModal
|
</AlertModal>
|
||||||
isOpen={promptError}
|
)}
|
||||||
variant="info"
|
{promptError && (
|
||||||
title={i18n._(t`Attention!`)}
|
<AlertModal
|
||||||
onClose={this.handlePromptErrorClose}
|
isOpen={promptError}
|
||||||
>
|
variant="info"
|
||||||
{i18n._(
|
title={i18n._(t`Attention!`)}
|
||||||
t`Launching jobs with promptable fields is not supported at this time.`
|
onClose={this.handlePromptErrorClose}
|
||||||
)}
|
>
|
||||||
</AlertModal>
|
{i18n._(
|
||||||
|
t`Launching jobs with promptable fields is not supported at this time.`
|
||||||
|
)}
|
||||||
|
</AlertModal>
|
||||||
|
)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user