mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Fixed removing host filter search term with encoded character
This commit is contained in:
parent
8d043e6f85
commit
c3fbb07535
@ -132,7 +132,7 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
|
||||
}
|
||||
|
||||
if(params.singleSearchParam) {
|
||||
return {[params.singleSearchParam]: encodeURIComponent(paramString + "=" + valueString)};
|
||||
return {[params.singleSearchParam]: paramString + "=" + valueString};
|
||||
}
|
||||
else {
|
||||
return {[paramString] : encodeURIComponent(valueString)};
|
||||
|
@ -140,7 +140,7 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', '
|
||||
function searchWithoutKey(term) {
|
||||
if($scope.singleSearchParam) {
|
||||
return {
|
||||
[$scope.singleSearchParam]: encodeURIComponent("search=" + term)
|
||||
[$scope.singleSearchParam]: "search=" + encodeURIComponent(term)
|
||||
};
|
||||
}
|
||||
return {
|
||||
@ -329,6 +329,10 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', '
|
||||
else {
|
||||
if($scope.singleSearchParam && set[$scope.singleSearchParam] && set[$scope.singleSearchParam].includes("%20and%20")) {
|
||||
let searchParamParts = set[$scope.singleSearchParam].split("%20and%20");
|
||||
// The value side of each paramPart might have been encoded in SmartSearch.splitFilterIntoTerms
|
||||
_.each(searchParamParts, (paramPart, paramPartIndex) => {
|
||||
searchParamParts[paramPartIndex] = decodeURIComponent(paramPart);
|
||||
});
|
||||
var index = searchParamParts.indexOf(value);
|
||||
if (index !== -1) {
|
||||
searchParamParts.splice(index, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user