1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #2788 from mabashian/portal-mode-job-list-order

Only sort portal jobs on the first init
This commit is contained in:
Michael Abashian 2016-07-05 13:55:55 -04:00 committed by GitHub
commit c1b2ba5a24

View File

@ -23,7 +23,7 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
$scope.iterator = list.iterator;
$scope.activeFilter = 'user';
var init = function(){
var init = function(sort){
view.inject(list, {
id: 'portal-jobs',
mode: 'edit',
@ -45,8 +45,10 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
pageSize: pageSize
});
$scope.search (list.iterator);
// hack to default to descending sort order
$scope.sort('job','finished');
if(sort) {
// hack to default to descending sort order
$scope.sort('job','finished');
}
};
@ -67,7 +69,7 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
$scope.search(list.iterator);
};
init();
init(true);
}
PortalModeJobsController.$inject = ['$scope', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',