mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 03:17:38 -02:30
All lists (included related lists) now send the order_by parameter to the API. Use the key: true attribute in the list definition to specify the default sorting field.
This commit is contained in:
@@ -23,13 +23,16 @@ angular.module('RefreshRelatedHelper', ['RestServices', 'Utilities'])
|
||||
var iterator = params.iterator;
|
||||
var url = params.url;
|
||||
|
||||
url.replace(/page_size\=\d+/,''); //stop repeatedly appending page_size
|
||||
|
||||
Rest.setUrl(url);
|
||||
Rest.get()
|
||||
Rest.get({ params: { page_size: scope[iterator + 'PageSize'] }})
|
||||
.success( function(data, status, headers, config) {
|
||||
scope[set] = data['results'];
|
||||
scope[iterator + 'NextUrl'] = data.next;
|
||||
scope[iterator + 'PrevUrl'] = data.previous;
|
||||
scope[iterator + 'Count'] = data.count;
|
||||
scope[iterator + 'PageCount'] = Math.ceil((data.count / scope[iterator + 'PageSize']));
|
||||
scope[iterator + 'SearchSpin'] = false;
|
||||
})
|
||||
.error ( function(data, status, headers, config) {
|
||||
|
||||
Reference in New Issue
Block a user