diff --git a/awx/ui/client/features/credentials/input-source-lookup.component.js b/awx/ui/client/features/credentials/input-source-lookup.component.js index beea7e72ec..50f78abe38 100644 --- a/awx/ui/client/features/credentials/input-source-lookup.component.js +++ b/awx/ui/client/features/credentials/input-source-lookup.component.js @@ -1,14 +1,22 @@ const templateUrl = require('~features/credentials/input-source-lookup.partial.html'); -function InputSourceLookupController (strings) { +function InputSourceLookupController (strings, wait) { const vm = this || {}; vm.strings = strings; vm.title = strings.get('inputSources.TITLE'); + + vm.$onInit = () => wait('start'); + + vm.onReady = () => { + vm.isReady = true; + wait('stop'); + }; } InputSourceLookupController.$inject = [ 'CredentialsStrings', + 'Wait', ]; export default { diff --git a/awx/ui/client/features/credentials/input-source-lookup.partial.html b/awx/ui/client/features/credentials/input-source-lookup.partial.html index b7c420fcf0..0f5a0f8e94 100644 --- a/awx/ui/client/features/credentials/input-source-lookup.partial.html +++ b/awx/ui/client/features/credentials/input-source-lookup.partial.html @@ -1,4 +1,4 @@ - + diff --git a/awx/ui/client/lib/components/lookup-list/lookup-list.component.js b/awx/ui/client/lib/components/lookup-list/lookup-list.component.js index 207456ba84..4a78625414 100644 --- a/awx/ui/client/lib/components/lookup-list/lookup-list.component.js +++ b/awx/ui/client/lib/components/lookup-list/lookup-list.component.js @@ -15,7 +15,8 @@ function LookupListController (GetBasePath, Rest, strings) { Rest.get({ params }) .then(({ data }) => { setData(resultsFilter(data)); - }); + }) + .finally(() => vm.onReady()); }; function setData ({ results, count }) { @@ -43,6 +44,7 @@ export default { bindings: { onSelect: '=', onRowClick: '=', + onReady: '=', selectedId: '=', resourceName: '@', baseParams: '=',