mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Search
Fixed ?& and mishandling of 'in' search type. Trello: https://trello.com/c/qrkTCicN/316-update-inventory-source-types-in-home-groups
This commit is contained in:
parent
f4cce01af0
commit
caff0572a5
@ -278,7 +278,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
connect = (/\/$/.test(url)) ? '?' : '&';
|
||||
url += connect + scope[iterator + 'ExtraParms'];
|
||||
}
|
||||
url = url.replace(/\&\&/g, '&');
|
||||
url = url.replace(/\&\&/g, '&').replace(/\?\&/,'?');
|
||||
if (calcOnly) {
|
||||
scope.$emit('searchParamsReady', url);
|
||||
}
|
||||
@ -405,6 +405,11 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
} else if ( (list.fields[scope[iterator + 'SearchField' + modifier]].searchType === 'select') &&
|
||||
Empty(scope[iterator + 'SearchSelectValue' + modifier].value) && !/\_\_$/.test(scope[iterator + 'SearchParams']) ) {
|
||||
scope[iterator + 'SearchParams'] += '=iexact=';
|
||||
} else if (list.fields[scope[iterator + 'SearchField' + modifier]].searchType === 'in') {
|
||||
if (!/\_\_$/.test(scope[iterator + 'SearchParams'])) {
|
||||
scope[iterator + 'SearchParams'] += '__';
|
||||
}
|
||||
scope[iterator + 'SearchParams'] += 'in=';
|
||||
} else if (/\_\_$/.test(scope[iterator + 'SearchParams'])) {
|
||||
scope[iterator + 'SearchParams'] += 'icontains=';
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user