mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
Fix for deleting search tags on job details
This commit is contained in:
@@ -166,18 +166,23 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
|
|||||||
let encodeParams = {
|
let encodeParams = {
|
||||||
term: tagToRemove
|
term: tagToRemove
|
||||||
};
|
};
|
||||||
if(_.has($scope.models[$scope.list.name].base, root)) {
|
if($scope.models[$scope.list.name]) {
|
||||||
if($scope.models[$scope.list.name].base[root].type && $scope.models[$scope.list.name].base[root].type === 'field') {
|
if(_.has($scope.models[$scope.list.name].base, root)) {
|
||||||
|
if($scope.models[$scope.list.name].base[root].type && $scope.models[$scope.list.name].base[root].type === 'field') {
|
||||||
|
encodeParams.relatedSearchTerm = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
encodeParams.searchTerm = true;
|
||||||
|
}
|
||||||
|
removed = qs.encodeParam(encodeParams);
|
||||||
|
}
|
||||||
|
else if(_.contains($scope.models[$scope.list.name].related, root)) {
|
||||||
encodeParams.relatedSearchTerm = true;
|
encodeParams.relatedSearchTerm = true;
|
||||||
|
removed = qs.encodeParam(encodeParams);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
encodeParams.searchTerm = true;
|
removed = setDefaults(termParts[termParts.length-1]);
|
||||||
}
|
}
|
||||||
removed = qs.encodeParam(encodeParams);
|
|
||||||
}
|
|
||||||
else if(_.contains($scope.models[$scope.list.name].related, root)) {
|
|
||||||
encodeParams.relatedSearchTerm = true;
|
|
||||||
removed = qs.encodeParam(encodeParams);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
removed = setDefaults(termParts[termParts.length-1]);
|
removed = setDefaults(termParts[termParts.length-1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user