mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
Merge pull request #2034 from kialam/fix/1884-scm-creds-filter
Fix Project SCM cred lookup
This commit is contained in:
commit
1b45e8b825
@ -235,10 +235,14 @@ function SmartSearchController (
|
||||
};
|
||||
|
||||
$scope.clearAllTerms = () => {
|
||||
_.forOwn(defaults, (value, key) => {
|
||||
// preserve the `credential_type` queryset param if it exists
|
||||
if (key === 'credential_type') {
|
||||
defaults[key] = queryset[key];
|
||||
}
|
||||
});
|
||||
const cleared = _(defaults).omit(_.isNull).value();
|
||||
|
||||
delete cleared.page;
|
||||
|
||||
queryset = cleared;
|
||||
|
||||
if (!$scope.querySet) {
|
||||
|
||||
@ -880,7 +880,11 @@ function($injector, $stateExtender, $log, i18n) {
|
||||
$stateParams[`${list.iterator}_search`].role_level = "admin_role";
|
||||
$stateParams[`${list.iterator}_search`].credential_type = InsightsCredTypePK.toString() ;
|
||||
}
|
||||
|
||||
if(list.iterator === 'credential') {
|
||||
if($state.current.name.includes('projects.edit') || $state.current.name.includes('projects.add')) {
|
||||
state.params[`${list.iterator}_search`].value = _.merge(state.params[`${list.iterator}_search`].value, $stateParams[`${list.iterator}_search`]);
|
||||
}
|
||||
}
|
||||
|
||||
return qs.search(path, $stateParams[`${list.iterator}_search`]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user