mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Fixed removing host filter search term with encoded character
This commit is contained in:
@@ -132,7 +132,7 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(params.singleSearchParam) {
|
if(params.singleSearchParam) {
|
||||||
return {[params.singleSearchParam]: encodeURIComponent(paramString + "=" + valueString)};
|
return {[params.singleSearchParam]: paramString + "=" + valueString};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return {[paramString] : encodeURIComponent(valueString)};
|
return {[paramString] : encodeURIComponent(valueString)};
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', '
|
|||||||
function searchWithoutKey(term) {
|
function searchWithoutKey(term) {
|
||||||
if($scope.singleSearchParam) {
|
if($scope.singleSearchParam) {
|
||||||
return {
|
return {
|
||||||
[$scope.singleSearchParam]: encodeURIComponent("search=" + term)
|
[$scope.singleSearchParam]: "search=" + encodeURIComponent(term)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -329,6 +329,10 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', '
|
|||||||
else {
|
else {
|
||||||
if($scope.singleSearchParam && set[$scope.singleSearchParam] && set[$scope.singleSearchParam].includes("%20and%20")) {
|
if($scope.singleSearchParam && set[$scope.singleSearchParam] && set[$scope.singleSearchParam].includes("%20and%20")) {
|
||||||
let searchParamParts = set[$scope.singleSearchParam].split("%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);
|
var index = searchParamParts.indexOf(value);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
searchParamParts.splice(index, 1);
|
searchParamParts.splice(index, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user