mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
Merge branch '2841' into release_3.0.0
This commit is contained in:
@@ -43,6 +43,7 @@ export default
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
filter: "longDate",
|
filter: "longDate",
|
||||||
key: true,
|
key: true,
|
||||||
|
desc: true,
|
||||||
columnClass: "col-lg-4 col-md-4 col-sm-3"
|
columnClass: "col-lg-4 col-md-4 col-sm-3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
export function PortalModeJobsController($scope, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
export function PortalModeJobsController($scope, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
||||||
PaginateInit){
|
PaginateInit){
|
||||||
|
|
||||||
var list = _.cloneDeep(PortalJobsList),
|
var list = _.cloneDeep(PortalJobsList),
|
||||||
view = GenerateList,
|
view = GenerateList,
|
||||||
// show user jobs by default
|
// show user jobs by default
|
||||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
||||||
@@ -23,7 +23,8 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
|
|||||||
$scope.iterator = list.iterator;
|
$scope.iterator = list.iterator;
|
||||||
$scope.activeFilter = 'user';
|
$scope.activeFilter = 'user';
|
||||||
|
|
||||||
var init = function(sort){
|
var init = function(url){
|
||||||
|
defaultUrl = url ? url : defaultUrl;
|
||||||
// We need to explicitly set the lists base path so that tag searching will keep the '?created_by'
|
// We need to explicitly set the lists base path so that tag searching will keep the '?created_by'
|
||||||
// query param when it's present. If we don't do this, then tag search will just grab the base
|
// query param when it's present. If we don't do this, then tag search will just grab the base
|
||||||
// path for this list (/api/v1/jobs) and lose the created_by filter
|
// path for this list (/api/v1/jobs) and lose the created_by filter
|
||||||
@@ -49,31 +50,26 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
|
|||||||
url: defaultUrl,
|
url: defaultUrl,
|
||||||
pageSize: pageSize
|
pageSize: pageSize
|
||||||
});
|
});
|
||||||
$scope.search (list.iterator);
|
$scope.search(list.iterator);
|
||||||
if(sort) {
|
|
||||||
// hack to default to descending sort order
|
|
||||||
$scope.sort('job','finished');
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.filterUser = function(){
|
$scope.filterUser = function(){
|
||||||
$scope.activeFilter = 'user';
|
$scope.activeFilter = 'user';
|
||||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id;
|
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id;
|
||||||
init(true);
|
init(defaultUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.filterAll = function(){
|
$scope.filterAll = function(){
|
||||||
$scope.activeFilter = 'all';
|
$scope.activeFilter = 'all';
|
||||||
defaultUrl = GetBasePath('jobs');
|
defaultUrl = GetBasePath('jobs');
|
||||||
init(true);
|
init(defaultUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.refresh = function(){
|
$scope.refresh = function(){
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
};
|
};
|
||||||
|
|
||||||
init(true);
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
PortalModeJobsController.$inject = ['$scope', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
PortalModeJobsController.$inject = ['$scope', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
||||||
|
|||||||
Reference in New Issue
Block a user