Close wizard if its components are not loaded
Closes-Bug: #1566284 Change-Id: I7ab78c09b8c05f518a7b11366f82c667a5774e8f
This commit is contained in:
parent
bdcffb1c2f
commit
3db08b70e5
|
@ -3278,6 +3278,9 @@ input[type=range] {
|
|||
color: @base-text-color;
|
||||
.modal-body {
|
||||
padding: 0px;
|
||||
> .text-danger {
|
||||
margin: 15px;
|
||||
}
|
||||
}
|
||||
label {
|
||||
.font-semibold;
|
||||
|
|
|
@ -176,7 +176,7 @@ export var dialogMixin = {
|
|||
</div>
|
||||
<div className='modal-body'>
|
||||
{this.props.error ?
|
||||
<div className='text-error'>
|
||||
<div className='text-danger'>
|
||||
{this.props.message || i18n('dialog.error_dialog.server_error')}
|
||||
</div>
|
||||
: this.renderBody()}
|
||||
|
|
|
@ -592,11 +592,14 @@ var CreateClusterWizard = React.createClass({
|
|||
},
|
||||
componentDidMount() {
|
||||
this.releases.fetch()
|
||||
.then(() => {
|
||||
var defaultReleaseId = (this.releases.find({is_deployable: true}) || {}).id || null;
|
||||
this.selectRelease(defaultReleaseId);
|
||||
this.setState({loading: false});
|
||||
});
|
||||
.then(
|
||||
() => {
|
||||
var defaultReleaseId = (this.releases.find({is_deployable: true}) || {}).id || null;
|
||||
this.selectRelease(defaultReleaseId);
|
||||
this.setState({loading: false});
|
||||
},
|
||||
this.showError
|
||||
);
|
||||
|
||||
this.updateState({activePaneIndex: 0});
|
||||
},
|
||||
|
@ -708,12 +711,15 @@ var CreateClusterWizard = React.createClass({
|
|||
if (releaseId) {
|
||||
this.setState({loading: true});
|
||||
this.components.fetch()
|
||||
.then(() => {
|
||||
this.components.invokeMap('expandWildcards', this.components);
|
||||
this.components.invokeMap('restoreDefaultValue', this.components);
|
||||
this.components.invokeMap('preprocessRequires', this.components);
|
||||
this.setState({loading: false});
|
||||
});
|
||||
.then(
|
||||
() => {
|
||||
this.components.invokeMap('expandWildcards', this.components);
|
||||
this.components.invokeMap('restoreDefaultValue', this.components);
|
||||
this.components.invokeMap('preprocessRequires', this.components);
|
||||
this.setState({loading: false});
|
||||
},
|
||||
this.showError
|
||||
);
|
||||
}
|
||||
},
|
||||
onChange(name, value) {
|
||||
|
|
Loading…
Reference in New Issue