diff --git a/awx/ui_next/src/api/models/Projects.js b/awx/ui_next/src/api/models/Projects.js index a5a7d90042..c9278cf4a0 100644 --- a/awx/ui_next/src/api/models/Projects.js +++ b/awx/ui_next/src/api/models/Projects.js @@ -4,6 +4,12 @@ class Projects extends Base { constructor(http) { super(http); this.baseUrl = '/api/v2/projects/'; + + this.readPlaybooks = this.readPlaybooks.bind(this); + } + + readPlaybooks(id) { + return this.http.get(`${this.baseUrl}${id}/playbooks/`); } } diff --git a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.jsx b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.jsx index 87f31d7bc5..d5ea358915 100644 --- a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.jsx +++ b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.jsx @@ -17,13 +17,16 @@ class AnsibleSelect extends React.Component { } render() { - const { value, data, i18n } = this.props; + const { id, data, i18n, isValid, onBlur, value } = this.props; return ( {data.map(datum => ( {}, }; AnsibleSelect.propTypes = { data: PropTypes.arrayOf(PropTypes.object), + id: PropTypes.string.isRequired, + isValid: PropTypes.bool, + onBlur: PropTypes.func, onChange: PropTypes.func.isRequired, value: PropTypes.string.isRequired, }; diff --git a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx index 405fe38ead..d9bd7c669d 100644 --- a/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx +++ b/awx/ui_next/src/components/AnsibleSelect/AnsibleSelect.test.jsx @@ -19,6 +19,7 @@ describe('', () => { test('initially renders succesfully', async () => { mountWithContexts( {}} @@ -31,6 +32,7 @@ describe('', () => { const spy = jest.spyOn(_AnsibleSelect.prototype, 'onSelectChange'); const wrapper = mountWithContexts( {}} @@ -45,6 +47,7 @@ describe('', () => { test('Returns correct select options', () => { const wrapper = mountWithContexts( {}} diff --git a/awx/ui_next/src/components/Lookup/Lookup.jsx b/awx/ui_next/src/components/Lookup/Lookup.jsx index 49586324ca..b1dfc331c6 100644 --- a/awx/ui_next/src/components/Lookup/Lookup.jsx +++ b/awx/ui_next/src/components/Lookup/Lookup.jsx @@ -186,6 +186,7 @@ class Lookup extends React.Component { columns, multiple, name, + onBlur, required, i18n, } = this.props; @@ -209,7 +210,7 @@ class Lookup extends React.Component { return ( - +