mirror of
https://github.com/ansible/awx.git
synced 2026-01-25 00:11:23 -03:30
don't show lookup until data is fetched
This commit is contained in:
parent
736bd2ed67
commit
6d0f2948aa
@ -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 {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<at-easy-modal title="vm.title" on-close="vm.onClose">
|
||||
<at-easy-modal title="vm.title" on-close="vm.onClose" ng-show="vm.isReady">
|
||||
<at-tab-group>
|
||||
<at-tab
|
||||
state="vm.tabs.credential"
|
||||
@ -23,6 +23,7 @@
|
||||
}"
|
||||
results-filter="vm.resultsFilter"
|
||||
selected-id="vm.selectedId"
|
||||
on-ready="vm.onReady"
|
||||
on-select="vm.onSelect"
|
||||
on-row-click="vm.onRowClick"
|
||||
/>
|
||||
|
||||
@ -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: '=',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user