diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index 6386a5289e..e57d103a85 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -112,9 +112,6 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $routePa jobs_scope.search('queued_job'); jobs_scope.search('running_job'); jobs_scope.search('completed_job'); - // queued_scope.search('queued_job'); - // running_scope.search('running_job'); - // completed_scope.search('completed_job'); scheduled_scope.search('schedule'); }; diff --git a/awx/ui/static/js/helpers/Schedules.js b/awx/ui/static/js/helpers/Schedules.js index 1769bbf992..07212e8e61 100644 --- a/awx/ui/static/js/helpers/Schedules.js +++ b/awx/ui/static/js/helpers/Schedules.js @@ -562,8 +562,8 @@ export default * */ .factory('LoadSchedulesScope', ['$compile', '$location', '$routeParams','SearchInit', 'PaginateInit', 'generateList', 'SchedulesControllerInit', - 'SchedulesListInit', 'SearchWidget', - function($compile, $location, $routeParams, SearchInit, PaginateInit, GenerateList, SchedulesControllerInit, SchedulesListInit, SearchWidget) { + 'SchedulesListInit', + function($compile, $location, $routeParams, SearchInit, PaginateInit, GenerateList, SchedulesControllerInit, SchedulesListInit) { return function(params) { var parent_scope = params.parent_scope, scope = params.scope, @@ -571,37 +571,17 @@ export default id = params.id, url = params.url, pageSize = params.pageSize || 5, - spinner = (params.spinner === undefined) ? true : params.spinner, - base = $location.path().replace(/^\//, '').split('/')[0], - e, html; + spinner = (params.spinner === undefined) ? true : params.spinner; - if (base === 'jobs') { - // on jobs page the search widget appears on the right - html = SearchWidget({ - iterator: list.iterator, - template: params.list, - includeSize: false - }); - e = angular.element(document.getElementById(id + '-search-container')).append(html); - $compile(e)(scope); - GenerateList.inject(list, { - mode: 'edit', - id: id, - breadCrumbs: false, - scope: scope, - showSearch: false - }); - } - else { - GenerateList.inject(list, { - mode: 'edit', - id: id, - breadCrumbs: false, - scope: scope, - searchSize: 'col-lg-6 col-md-6 col-sm-6 col-xs-12', - showSearch: true - }); - } + + GenerateList.inject(list, { + mode: 'edit', + id: id, + breadCrumbs: false, + scope: scope, + searchSize: 'col-lg-6 col-md-6 col-sm-6 col-xs-12', + showSearch: true + }); SearchInit({ scope: scope, diff --git a/awx/ui/static/js/lists/AllJobs.js b/awx/ui/static/js/lists/AllJobs.js index ed708dfe27..8d64002093 100644 --- a/awx/ui/static/js/lists/AllJobs.js +++ b/awx/ui/static/js/lists/AllJobs.js @@ -96,11 +96,19 @@ export default dataPlacement: 'top', ngHide: "all_job.type == 'system_job' " }, + cancel: { + mode: 'all', + ngClick: 'deleteJob(all_job.id)', + awToolTip: 'Cancel the job', + dataPlacement: 'top', + ngShow: "all_job.status === 'running'" + }, "delete": { mode: 'all', ngClick: 'deleteJob(all_job.id)', awToolTip: 'Delete the job', - dataPlacement: 'top' + dataPlacement: 'top', + ngShow: "all_job.status !== 'running'" }, stdout: { mode: 'all', diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index f2a7ca1631..ce739ac4df 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -102,12 +102,6 @@ export default dataPlacement: 'top', ngShow: "job.status != 'running'" }, - // job_details: { - // mode: 'all', - // ngClick: "viewJobLog(job.id)", - // awToolTip: 'View job details', - // dataPlacement: 'top' - // }, stdout: { mode: 'all', href: '/#/jobs/{{ job.id }}/stdout', diff --git a/awx/ui/static/js/widgets/DashboardJobs.js b/awx/ui/static/js/widgets/DashboardJobs.js index 6f3a90ebf6..ca4affefd5 100644 --- a/awx/ui/static/js/widgets/DashboardJobs.js +++ b/awx/ui/static/js/widgets/DashboardJobs.js @@ -76,7 +76,7 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities']) scope: jobs_scope, list: JobsList, id: 'active-jobs', - url: GetBasePath('unified_jobs') + '?status__in=running,completed,failed,successful,error,canceled', + url: GetBasePath('unified_jobs') + '?status__in=pending,running,completed,failed,successful,error,canceled', pageSize: max_rows, spinner: false }); diff --git a/awx/ui/static/partials/jobs.html b/awx/ui/static/partials/jobs.html index ce5e2a6108..a69a8f8e84 100644 --- a/awx/ui/static/partials/jobs.html +++ b/awx/ui/static/partials/jobs.html @@ -12,22 +12,7 @@ - - - +
+
+
+
+