mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Pass any existing search params (including sort_by) to updateFilteredUrl in tagSearch.service.js so that those params will persist to the tag search results.
This commit is contained in:
parent
41e231852a
commit
48d029defb
@ -36,10 +36,12 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
||||
var iterator = $scope.iterator;
|
||||
var pageSize = $scope
|
||||
.$parent[iterator + "_page_size"];
|
||||
var searchParams = $scope
|
||||
.$parent[iterator + "SearchParams"];
|
||||
var set = $scope.set;
|
||||
var listScope = $scope.$parent;
|
||||
var url = tagSearchService
|
||||
.updateFilteredUrl($scope.endpoint, tags, pageSize);
|
||||
.updateFilteredUrl($scope.endpoint, tags, pageSize, searchParams);
|
||||
|
||||
$scope.$parent[iterator + "_active_search"] = true;
|
||||
Refresh({
|
||||
|
@ -125,7 +125,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
||||
};
|
||||
|
||||
// returns the url with filter params
|
||||
this.updateFilteredUrl = function(basePath, tags, pageSize) {
|
||||
this.updateFilteredUrl = function(basePath, tags, pageSize, searchParams) {
|
||||
// remove the chain directive from all the urls that might have
|
||||
// been added previously
|
||||
tags = (tags || []).map(function(val) {
|
||||
@ -171,7 +171,8 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
||||
return returnedUrl +
|
||||
(tags || []).map(function (t) {
|
||||
return t.url;
|
||||
}).join("&") + "&page_size=" + pageSize;
|
||||
}).join("&") + "&page_size=" + pageSize +
|
||||
((searchParams) ? "&" + searchParams : "");
|
||||
};
|
||||
|
||||
// given the field and input filters, create the tag object
|
||||
|
Loading…
Reference in New Issue
Block a user