mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Merge pull request #2317 from mabashian/sort-search-results
Sort tagsearch results
This commit is contained in:
commit
99ea3c63fb
@ -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…
x
Reference in New Issue
Block a user