mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
resolves kickback on #2841
This commit is contained in:
parent
c8b8cdf7f5
commit
0d1f5f1e54
@ -43,6 +43,7 @@ export default
|
||||
searchable: false,
|
||||
filter: "longDate",
|
||||
key: true,
|
||||
desc: true,
|
||||
columnClass: "col-lg-4 col-md-4 col-sm-3"
|
||||
}
|
||||
},
|
||||
|
||||
@ -23,7 +23,8 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
|
||||
$scope.iterator = list.iterator;
|
||||
$scope.activeFilter = 'user';
|
||||
|
||||
var init = function(sort){
|
||||
var init = function(url){
|
||||
defaultUrl = url ? url : defaultUrl;
|
||||
view.inject(list, {
|
||||
id: 'portal-jobs',
|
||||
mode: 'edit',
|
||||
@ -44,31 +45,26 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
|
||||
url: defaultUrl,
|
||||
pageSize: pageSize
|
||||
});
|
||||
$scope.search (list.iterator);
|
||||
if(sort) {
|
||||
// hack to default to descending sort order
|
||||
$scope.sort('job','finished');
|
||||
}
|
||||
|
||||
$scope.search(list.iterator);
|
||||
};
|
||||
|
||||
$scope.filterUser = function(){
|
||||
$scope.activeFilter = 'user';
|
||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id;
|
||||
init(true);
|
||||
init(defaultUrl);
|
||||
};
|
||||
|
||||
$scope.filterAll = function(){
|
||||
$scope.activeFilter = 'all';
|
||||
defaultUrl = GetBasePath('jobs');
|
||||
init(true);
|
||||
init(defaultUrl);
|
||||
};
|
||||
|
||||
$scope.refresh = function(){
|
||||
$scope.search(list.iterator);
|
||||
};
|
||||
|
||||
init(true);
|
||||
init();
|
||||
}
|
||||
|
||||
PortalModeJobsController.$inject = ['$scope', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user