mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Portal Mode UX / product audit items (#1867)
* finish Portal mode audit work items, resolves #1832, tracking #1335 * remove $state from injected dependencies #1872
This commit is contained in:
parent
57e24551b6
commit
7a0ea53211
@ -17,7 +17,7 @@ export default
|
||||
hover: true,
|
||||
well: true,
|
||||
searchSize: 'col-lg-8 col-md-8 col-sm-12 col-xs-12',
|
||||
|
||||
emptyListText: 'There are no job templates to display at this time',
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
|
||||
@ -17,6 +17,7 @@ export default
|
||||
well: true,
|
||||
listTitle: 'Jobs',
|
||||
searchSize: 'col-lg-8 col-md-8 col-sm-12 col-xs-12',
|
||||
emptyListText: 'There are no jobs to display at this time',
|
||||
|
||||
fields: {
|
||||
status: {
|
||||
@ -32,9 +33,8 @@ export default
|
||||
searchLabel: 'Status'
|
||||
},
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Name',
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-6',
|
||||
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-6 List-staticColumnAdjacent',
|
||||
defaultSearchField: true,
|
||||
linkTo: '/#/jobs/{{job.id}}'
|
||||
},
|
||||
@ -43,7 +43,7 @@ export default
|
||||
noLink: true,
|
||||
searchable: false,
|
||||
filter: "longDate",
|
||||
nosort: true,
|
||||
key: true,
|
||||
columnClass: "col-lg-4 col-md-4 col-sm-3"
|
||||
}
|
||||
},
|
||||
|
||||
@ -4,64 +4,67 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export function PortalModeJobsController($scope, $state, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
||||
PaginateInit){
|
||||
export function PortalModeJobsController($scope, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
||||
PaginateInit){
|
||||
|
||||
var list = PortalJobsList,
|
||||
view = GenerateList,
|
||||
// show user jobs by default
|
||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
||||
pageSize = 12;
|
||||
var list = PortalJobsList,
|
||||
view = GenerateList,
|
||||
// show user jobs by default
|
||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
||||
pageSize = 12;
|
||||
|
||||
if ($rootScope.removeJobStatusChange) {
|
||||
$rootScope.removeJobStatusChange();
|
||||
}
|
||||
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange-portal', function() {
|
||||
$scope.search('portal_job'); //processEvent(event);
|
||||
});
|
||||
if ($rootScope.removeJobStatusChange) {
|
||||
$rootScope.removeJobStatusChange();
|
||||
}
|
||||
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange-portal', function() {
|
||||
$scope.search('job');
|
||||
});
|
||||
|
||||
$scope.iterator = list.iterator;
|
||||
$scope.activeFilter = 'user';
|
||||
$scope.iterator = list.iterator;
|
||||
$scope.activeFilter = 'user';
|
||||
|
||||
var init = function(){
|
||||
view.inject(list, {
|
||||
id: 'portal-jobs',
|
||||
mode: 'edit',
|
||||
scope: $scope,
|
||||
var init = function(){
|
||||
view.inject(list, {
|
||||
id: 'portal-jobs',
|
||||
mode: 'edit',
|
||||
scope: $scope,
|
||||
searchSize: 'col-md-10 col-xs-12'
|
||||
});
|
||||
});
|
||||
|
||||
SearchInit({
|
||||
scope: $scope,
|
||||
set: 'jobs',
|
||||
list: list,
|
||||
url: defaultUrl
|
||||
});
|
||||
SearchInit({
|
||||
scope: $scope,
|
||||
set: 'jobs',
|
||||
list: list,
|
||||
url: defaultUrl
|
||||
});
|
||||
|
||||
PaginateInit({
|
||||
scope: $scope,
|
||||
list: list,
|
||||
url: defaultUrl,
|
||||
pageSize: pageSize
|
||||
});
|
||||
$scope.search (list.iterator);
|
||||
};
|
||||
PaginateInit({
|
||||
scope: $scope,
|
||||
list: list,
|
||||
url: defaultUrl,
|
||||
pageSize: pageSize
|
||||
});
|
||||
$scope.search (list.iterator);
|
||||
// hack to default to descending sort order
|
||||
$scope.sort('job','started');
|
||||
|
||||
};
|
||||
|
||||
|
||||
$scope.filterUser = function(){
|
||||
$scope.activeFilter = 'user';
|
||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id;
|
||||
init();
|
||||
};
|
||||
$scope.filterUser = function(){
|
||||
$scope.activeFilter = 'user';
|
||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id;
|
||||
init();
|
||||
};
|
||||
|
||||
$scope.filterAll = function(){
|
||||
$scope.activeFilter = 'all';
|
||||
defaultUrl = GetBasePath('jobs');
|
||||
init();
|
||||
};
|
||||
$scope.filterAll = function(){
|
||||
$scope.activeFilter = 'all';
|
||||
defaultUrl = GetBasePath('jobs');
|
||||
init();
|
||||
};
|
||||
|
||||
init();
|
||||
init();
|
||||
}
|
||||
|
||||
PortalModeJobsController.$inject = ['$scope', '$state', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
||||
'PaginateInit'];
|
||||
PortalModeJobsController.$inject = ['$scope', '$rootScope', 'GetBasePath', 'generateList', 'PortalJobsList', 'SearchInit',
|
||||
'PaginateInit'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user