mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Remove duplicate REST call in add org component.
This commit is contained in:
@@ -69,19 +69,6 @@ class OrganizationAdd extends React.Component {
|
|||||||
this.props.history.push('/organizations');
|
this.props.history.push('/organizations');
|
||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
|
||||||
try {
|
|
||||||
const { data } = await api.get(API_CONFIG);
|
|
||||||
this.setState({ custom_virtualenvs: [...data.custom_virtualenvs] });
|
|
||||||
if (this.state.custom_virtualenvs.length > 1) {
|
|
||||||
// Show dropdown if we have more than one ansible environment
|
|
||||||
this.setState({ hideAnsibleSelect: !this.state.hideAnsibleSelect });
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
this.setState({ error })
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
const { name } = this.state;
|
const { name } = this.state;
|
||||||
const enabled = name.length > 0; // TODO: add better form validation
|
const enabled = name.length > 0; // TODO: add better form validation
|
||||||
|
|||||||
Reference in New Issue
Block a user