diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index b3af52cbc3..e97ecfd9cc 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -124,7 +124,6 @@ var tower = angular.module('Tower', [ 'PermissionsHelper', 'CompletedJobsDefinition', 'AllJobsDefinition', - 'RunningJobsDefinition', 'JobFormDefinition', 'JobSummaryDefinition', 'ParseHelper', @@ -153,7 +152,6 @@ var tower = angular.module('Tower', [ 'AngularScheduler', 'Timezones', 'SchedulesHelper', - 'QueuedJobsDefinition', 'JobsListDefinition', 'LogViewerStatusDefinition', 'LogViewerHelper', diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index e57d103a85..a2db37b2b5 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -156,39 +156,27 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $routePa available_height, search_row, page_row, height, header, row_height; $log.debug('docw: ' + docw); - if (docw > 1200) { - // customize the container height and # of rows based on available viewport height - available_height = $(window).height() - $('#main-menu-container .navbar').outerHeight() - 80; - if (docw < 1350) { - available_height = (available_height < 800) ? 800 : available_height; - } else { - available_height = (available_height < 550) ? 550 : available_height; - } - $log.debug('available_height: ' + available_height); - $('.jobs-list-container').each(function() { - $(this).height(Math.floor(available_height)); - }); - search_row = Math.max($('.search-row:eq(0)').outerHeight(), 50); - page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); - header = Math.max($('#active_jobs_table thead').height(), 24); - height = Math.floor(available_height ) - header - page_row - search_row - 30; - // row_height = (docw < 1350) ? 47 : 44; - if(docw < 1424){ - row_height = 55; - } - else { - row_height = 44; - } - max_rows = Math.floor(height / row_height); - max_rows = (max_rows < 5) ? 5 : max_rows; - } - else { - // when width < 1240px || height < 800px put things back to their default state - $('.jobs-list-container').each(function() { - $(this).css({ 'height': 'auto' }); - }); - max_rows = 5; + + // customize the container height and # of rows based on available viewport height + available_height = $(window).height() - $('#main-menu-container .navbar').outerHeight() - 80; + if (docw < 1350) { + available_height = (available_height < 800) ? 800 : available_height; + } else { + available_height = (available_height < 550) ? 550 : available_height; } + $log.debug('available_height: ' + available_height); + $('.jobs-list-container').each(function() { + $(this).height(Math.floor(available_height)); + }); + search_row = Math.max($('.search-row:eq(0)').outerHeight(), 50); + page_row = Math.max($('.page-row:eq(0)').outerHeight(), 33); + header = Math.max($('#active_jobs_table thead').height(), 24); + height = Math.floor(available_height ) - header - page_row - search_row - 30; + row_height = 44; + + max_rows = Math.floor(height / row_height); + max_rows = (max_rows < 5) ? 5 : max_rows; + $log.debug('max_rows: ' + max_rows); } diff --git a/awx/ui/static/js/lists.js b/awx/ui/static/js/lists.js index 5cb576d745..fefa73d0d1 100644 --- a/awx/ui/static/js/lists.js +++ b/awx/ui/static/js/lists.js @@ -21,8 +21,6 @@ import Permissions from "tower/lists/Permissions"; import PortalJobTemplates from "tower/lists/PortalJobTemplates"; import PortalJobs from "tower/lists/PortalJobs"; import Projects from "tower/lists/Projects"; -import QueuedJobs from "tower/lists/QueuedJobs"; -import RunningJobs from "tower/lists/RunningJobs"; import ScanJobsList from "tower/lists/ScanJobs"; import ScheduledJobs from "tower/lists/ScheduledJobs"; import Schedules from "tower/lists/Schedules"; @@ -54,8 +52,6 @@ export PortalJobTemplates, PortalJobs, Projects, - QueuedJobs, - RunningJobs, ScanJobsList, ScheduledJobs, Schedules, diff --git a/awx/ui/static/js/lists/QueuedJobs.js b/awx/ui/static/js/lists/QueuedJobs.js deleted file mode 100644 index 00884cddf1..0000000000 --- a/awx/ui/static/js/lists/QueuedJobs.js +++ /dev/null @@ -1,96 +0,0 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - * - * QueuedJobs.js - * - * - */ - - - -export default - angular.module('QueuedJobsDefinition', ['sanitizeFilter']) - .value( 'QueuedJobsList', { - - name: 'queued_jobs', - iterator: 'queued_job', - editTitle: 'Queued Jobs', - 'class': 'table-condensed', - index: false, - hover: true, - well: false, - - fields: { - id: { - label: 'ID', - ngClick:"viewJobLog(queued_job.id)", - key: true, - searchType: 'int', - columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2', - awToolTip: "{{ queued_job.status_tip }}", - awTipPlacement: "top", - }, - status: { - label: 'Status', - columnClass: 'col-lg-1 col-md-2 col-sm-2 col-xs-2', - awToolTip: "{{ queued_job.status_tip }}", - awTipPlacement: "top", - dataTitle: "{{ queued_job.status_popover_title }}", - icon: 'icon-job-{{ queued_job.status }}', - iconOnly: true, - ngClick:"viewJobLog(queued_job.id)", - searchable: false, - nosort: true - }, - created: { - label: 'Created', - noLink: true, - searchable: false, - filter: "date:'MM/dd HH:mm:ss'", - columnClass: 'col-lg-2 col-md-2 hidden-xs' - }, - type: { - label: 'Type', - ngBind: 'queued_job.type_label', - link: false, - columnClass: "col-lg-2 col-md-2 hidden-sm hidden-xs", - searchable: true, - searchType: 'select', - searchOptions: [] // populated via GetChoices() in controller - }, - name: { - label: 'Name', - columnClass: 'col-md-3 col-sm-4 col-xs-4', - ngClick: "viewJobLog(queued_job.id, queued_job.nameHref)", - defaultSearchField: true, - awToolTip: "{{ queued_job.name | sanitize }}", - awTipPlacement: "top" - } - }, - - actions: { }, - - fieldActions: { - submit: { - icon: 'icon-rocket', - mode: 'all', - ngClick: 'relaunchJob($event, queued_job.id)', - awToolTip: 'Relaunch using the same parameters', - dataPlacement: 'top', - ngHide: "queued_job.type == 'system_job' " - }, - 'cancel': { - mode: 'all', - ngClick: 'deleteJob(queued_job.id)', - awToolTip: 'Cancel the job', - dataPlacement: 'top' - }, - // job_details: { - // mode: 'all', - // ngClick: "viewJobLog(queued_job.id)", - // awToolTip: 'View job details', - // dataPlacement: 'top', - // ngShow: "queued_job.type == 'job'" - // } - } - }); diff --git a/awx/ui/static/js/lists/RunningJobs.js b/awx/ui/static/js/lists/RunningJobs.js deleted file mode 100644 index 31bb2f1e3d..0000000000 --- a/awx/ui/static/js/lists/RunningJobs.js +++ /dev/null @@ -1,103 +0,0 @@ -/********************************************* - * Copyright (c) 2014 AnsibleWorks, Inc. - * - * RunningJobs.js - * - * - */ - - - -export default - angular.module('RunningJobsDefinition', ['sanitizeFilter']) - .value( 'RunningJobsList', { - - name: 'running_jobs', - iterator: 'running_job', - editTitle: 'Completed Jobs', - 'class': 'table-condensed', - index: false, - hover: true, - well: false, - - fields: { - id: { - label: 'ID', - ngClick:"viewJobLog(running_job.id)", - key: true, - desc: true, - searchType: 'int', - columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2', - awToolTip: "{{ running_job.status_tip }}", - awTipPlacement: "top", - }, - status: { - label: 'Status', - columnClass: 'col-lg-1 col-md-2 col-sm-2 col-xs-2', - awToolTip: "{{ running_job.status_tip }}", - awTipPlacement: "top", - dataTitle: "{{ running_job.status_popover_title }}", - icon: 'icon-job-{{ running_job.status }}', - iconOnly: true, - ngClick:"viewJobLog(running_job.id)", - searchable: false, - nosort: true - }, - started: { - label: 'Started', - noLink: true, - searchable: false, - filter: "date:'MM/dd HH:mm:ss'", - columnClass: "col-lg-2 col-md-2 hidden-xs" - }, - type: { - label: 'Type', - ngBind: 'running_job.type_label', - link: false, - columnClass: "col-lg-2 col-md-2 hidden-sm hidden-xs", - searchable: true, - searchType: 'select', - searchOptions: [] // populated via GetChoices() in controller - }, - name: { - label: 'Name', - columnClass: 'col-md-3 col-sm-4 col-xs-4', - ngClick: "viewJobLog(running_job.id, running_job.nameHref)", - defaultSearchField: true, - awToolTip: "{{ running_job.name | sanitize }}", - awTipPlacement: "top" - } - }, - - actions: { }, - - fieldActions: { - submit: { - icon: 'icon-rocket', - mode: 'all', - ngClick: 'relaunchJob($event, running_job.id)', - awToolTip: 'Relaunch using the same parameters', - dataPlacement: 'top', - ngHide: "running_job.type == 'system_job' " - }, - cancel: { - mode: 'all', - ngClick: 'deleteJob(running_job.id)', - awToolTip: 'Cancel the job', - dataPlacement: 'top' - }, - // job_details: { - // mode: 'all', - // ngClick: "viewJobLog(running_job.id)", - // awToolTip: 'View job details', - // dataPlacement: 'top' - // }, - stdout: { - mode: 'all', - href: '/#/jobs/{{ running_job.id }}/stdout', - awToolTip: 'View standard output', - dataPlacement: 'top', - ngShow: "running_job.type == 'job'" - } - } - });