mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 02:31:03 -03:30
Set iterator property explicitly in credentials view
The CredentialList iterator seems to get clobbered after setting an Insights credential in Inventory. This quick fix forces the iterator to be the correct value on page load.
This commit is contained in:
@@ -18,6 +18,8 @@ function LegacyCredentialsService (pathService) {
|
||||
},
|
||||
'list@credentials': {
|
||||
templateProvider: function(CredentialList, generateList) {
|
||||
CredentialList.iterator = 'credential';
|
||||
|
||||
let html = generateList.build({
|
||||
list: CredentialList,
|
||||
mode: 'edit'
|
||||
@@ -33,6 +35,7 @@ function LegacyCredentialsService (pathService) {
|
||||
Dataset: ['CredentialList', 'QuerySet', '$stateParams', 'GetBasePath',
|
||||
function(list, qs, $stateParams, GetBasePath) {
|
||||
let path = GetBasePath(list.basePath) || GetBasePath(list.name);
|
||||
|
||||
return qs.search(path, $stateParams[`${list.iterator}_search`]);
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user