From 1d3d6be0298e4e7270f5605f770fd489b3e26a15 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Tue, 18 Jul 2017 16:04:38 -0400 Subject: [PATCH] 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. --- awx/ui/client/features/credentials/legacy.credentials.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/ui/client/features/credentials/legacy.credentials.js b/awx/ui/client/features/credentials/legacy.credentials.js index 95cda7e94a..b4af6fea24 100644 --- a/awx/ui/client/features/credentials/legacy.credentials.js +++ b/awx/ui/client/features/credentials/legacy.credentials.js @@ -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`]); } ]