diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index 9687c67057..ca1e5e0cb3 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -25,10 +25,10 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log, scope.tasks = []; scope.hostResults = []; - scope.hostResultsMaxRows = 15; - scope.hostSummariesMaxRows = 15; - scope.tasksMaxRows = 15; - scope.playsMaxRows = 15; + scope.hostResultsMaxRows = 100; + scope.hostSummariesMaxRows = 100; + scope.tasksMaxRows = 100; + scope.playsMaxRows = 100; scope.liveEventProcessing = true; // control play/pause state of event processing @@ -126,7 +126,7 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log, $rootScope.jobDetailInterval = setInterval(function() { $log.debug('Updating the DOM...'); UpdateDOM({ scope: scope }); - }, 5000); + }, 2500); } }); @@ -149,7 +149,8 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log, ok: event.ok, changed: event.changed, unreachable: event.dark, - failed: event.failures + failed: event.failures, + status: (event.failed) ? 'failed' : 'successful' }; }); scope.$emit('InitialLoadComplete'); @@ -222,7 +223,7 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log, data.results.forEach(function(event, idx) { var end, elapsed; - if (!play.firstTask) { + if (play.firstTask === undefined || play.firstTask === null) { play.firstTask = event.id; play.hostCount = (event.host_count) ? event.host_count : 0; } @@ -341,6 +342,8 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log, hostCount: 0, fistTask: null, playActiveClass: '', + unreachableCount: (data.unreachable_count) ? data.unreachable_count : 0, + status_text: status, tasks: {} }; diff --git a/awx/ui/static/js/helpers/JobDetail.js b/awx/ui/static/js/helpers/JobDetail.js index 4ea6fd265a..4dcb9d046a 100644 --- a/awx/ui/static/js/helpers/JobDetail.js +++ b/awx/ui/static/js/helpers/JobDetail.js @@ -67,6 +67,8 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge elapsed: '00:00:00', hostCount: 0, fistTask: null, + unreachableCount: 0, + status_text: (event.failed) ? 'failed' : (event.changed) ? 'changed' : 'successful', tasks: {} }; if (scope.activePlay) { @@ -406,7 +408,8 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge ok: (status === 'successful') ? 1 : 0, changed: (status === 'changed') ? 1 : 0, unreachable: (status === 'unreachable') ? 1 : 0, - failed: (status === 'failed') ? 1 : 0 + failed: (status === 'failed') ? 1 : 0, + status: (status === 'failed') ? 'failed' : 'successful' }; } @@ -454,6 +457,11 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge msg: msg }; + // increment the unreachable count on the play + if (status === 'unreachable' && scope.jobData.plays[scope.activePlay]) { + scope.jobData.plays[scope.activePlay].unreachableCount++; + } + // update the task status bar if (scope.jobData.plays[scope.activePlay].tasks[task_id] !== undefined) { task = scope.jobData.plays[scope.activePlay].tasks[task_id]; @@ -464,7 +472,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge } task.reportedHosts += 1; - task.failedCount += (status === 'failed' || status === 'unreachable') ? 1 : 0; + task.failedCount += (status === 'failed') ? 1 : 0; task.changedCount += (status === 'changed') ? 1 : 0; task.successfulCount += (status === 'successful') ? 1 : 0; task.skippedCount += (status === 'skipped') ? 1 : 0; @@ -745,10 +753,9 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge url = scope.job.related.job_host_summaries + '?'; url += (scope.search_all_hosts_name) ? 'host__name__icontains=' + scope.search_all_hosts_name + '&': ''; url += (scope.searchAllStatus === 'failed') ? 'failed=true&' : ''; - url += 'page_size=' + scope.hostSummaryTableRows + '&order_by=host__name'; + url += 'page_size=' + scope.hostSummariesMaxRows + '&order_by=host__name'; scope.hosts = []; - scope.hostsMap = {}; Rest.setUrl(url); Rest.get() @@ -760,7 +767,8 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge ok: event.ok, changed: event.changed, unreachable: event.dark, - failed: event.failures + failed: event.failures, + status: (event.failed) ? 'failed' : 'successful' }); }); $('#hosts-summary-table').mCustomScrollbar("update"); @@ -790,7 +798,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge } scope.host_summary.unreachable = 0; for (host in data.dark) { - scope.host_summary.dark += data.dark[host]; + scope.host_summary.unreachable += data.dark[host]; } scope.host_summary.failed = 0; for (host in data.failures) { diff --git a/awx/ui/static/js/lists/Admins.js b/awx/ui/static/js/lists/Admins.js index 6d03eebb83..fa7d5b62cc 100644 --- a/awx/ui/static/js/lists/Admins.js +++ b/awx/ui/static/js/lists/Admins.js @@ -19,7 +19,7 @@ angular.module('AdminListDefinition', []) selectInstructions: '

Select existing users by clicking each user or checking the related checkbox. When finished, click the blue ' + 'Select button, located bottom right.

', base: 'users', - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/CloudCredentials.js b/awx/ui/static/js/lists/CloudCredentials.js index 9c0c0b3050..92edcc994e 100644 --- a/awx/ui/static/js/lists/CloudCredentials.js +++ b/awx/ui/static/js/lists/CloudCredentials.js @@ -18,7 +18,7 @@ angular.module('CloudCredentialsListDefinition', []) editTitle: 'Cloud Credentials', selectInstructions: '

Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue ' + 'Select button, located bottom right.

Create a brand new credential by clicking the green Create New button.

', - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/Credentials.js b/awx/ui/static/js/lists/Credentials.js index a6002cf48a..9f0236967b 100644 --- a/awx/ui/static/js/lists/Credentials.js +++ b/awx/ui/static/js/lists/Credentials.js @@ -19,7 +19,7 @@ angular.module('CredentialsListDefinition', []) selectInstructions: "

Select existing credentials by clicking each credential or checking the related checkbox. When " + "finished, click the blue Select button, located bottom right.

Create a brand new credential by clicking " + "the green Create New button.

", - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/Groups.js b/awx/ui/static/js/lists/Groups.js index 89381bae13..7facabbfac 100644 --- a/awx/ui/static/js/lists/Groups.js +++ b/awx/ui/static/js/lists/Groups.js @@ -16,7 +16,7 @@ angular.module('GroupListDefinition', []) iterator: 'copy_group', selectTitle: 'Copy Groups', editTitle: 'Groups', - index: true, + index: false, well: false, fields: { diff --git a/awx/ui/static/js/lists/HomeGroups.js b/awx/ui/static/js/lists/HomeGroups.js index df59a5e376..04b9caf140 100644 --- a/awx/ui/static/js/lists/HomeGroups.js +++ b/awx/ui/static/js/lists/HomeGroups.js @@ -16,7 +16,7 @@ angular.module('HomeGroupListDefinition', []) name: 'home_groups', iterator: 'group', editTitle: 'Groups', - index: true, + index: false, hover: true, well: true, diff --git a/awx/ui/static/js/lists/HomeHosts.js b/awx/ui/static/js/lists/HomeHosts.js index 62c97a4087..f71eb05321 100644 --- a/awx/ui/static/js/lists/HomeHosts.js +++ b/awx/ui/static/js/lists/HomeHosts.js @@ -7,7 +7,7 @@ * on the home tab. * */ - + 'use strict'; angular.module('HomeHostListDefinition', []) @@ -17,7 +17,7 @@ angular.module('HomeHostListDefinition', []) iterator: 'host', selectTitle: 'Add Existing Hosts', editTitle: 'Hosts', - index: true, + index: false, hover: true, well: true, diff --git a/awx/ui/static/js/lists/Hosts.js b/awx/ui/static/js/lists/Hosts.js index 769fe22e83..889a1093d4 100644 --- a/awx/ui/static/js/lists/Hosts.js +++ b/awx/ui/static/js/lists/Hosts.js @@ -16,7 +16,7 @@ angular.module('HostListDefinition', []) iterator: 'copy_host', selectTitle: 'Add Existing Hosts', editTitle: 'Hosts', - index: true, + index: false, well: false, fields: { diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js index 53983903e3..a2da04bf1e 100644 --- a/awx/ui/static/js/lists/Inventories.js +++ b/awx/ui/static/js/lists/Inventories.js @@ -17,7 +17,7 @@ angular.module('InventoriesListDefinition', []) editTitle: 'Inventories', selectInstructions: "Click on a row to select it, and click Finished when done. Use the green " + "button to create a new row.", - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/JobHosts.js b/awx/ui/static/js/lists/JobHosts.js index a79e559d65..3879db29ac 100644 --- a/awx/ui/static/js/lists/JobHosts.js +++ b/awx/ui/static/js/lists/JobHosts.js @@ -16,7 +16,7 @@ angular.module('JobHostDefinition', []) iterator: 'jobhost', editTitle: 'All summaries', "class": "table-condensed", - index: true, + index: false, hover: true, navigationLinks: { diff --git a/awx/ui/static/js/lists/JobTemplates.js b/awx/ui/static/js/lists/JobTemplates.js index 283f9a1ed9..c76aff5ac4 100644 --- a/awx/ui/static/js/lists/JobTemplates.js +++ b/awx/ui/static/js/lists/JobTemplates.js @@ -18,7 +18,7 @@ angular.module('JobTemplatesListDefinition', []) editTitle: 'Job Templates', selectInstructions: "Click on a row to select it, and click Finished when done. Use the green " + "button to create a new row.", - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/Organizations.js b/awx/ui/static/js/lists/Organizations.js index 9d68618059..3b67dda418 100644 --- a/awx/ui/static/js/lists/Organizations.js +++ b/awx/ui/static/js/lists/Organizations.js @@ -17,13 +17,13 @@ angular.module('OrganizationListDefinition', []) selectTitle: 'Add Organizations', editTitle: 'Organizations', hover: true, - index: true, + index: false, fields: { name: { key: true, label: 'Name', - columnClass: 'col-sm-8 col-xs-8' + columnClass: 'col-lg-4 col-md-6 col-sm-8 col-xs-8' }, description: { label: 'Description', diff --git a/awx/ui/static/js/lists/Permissions.js b/awx/ui/static/js/lists/Permissions.js index 89a896a5e6..fc714d9ffd 100644 --- a/awx/ui/static/js/lists/Permissions.js +++ b/awx/ui/static/js/lists/Permissions.js @@ -18,7 +18,7 @@ angular.module('PermissionListDefinition', []) selectInstructions: "Click on a row to select it, and click Finished when done. Use the green " + "button to create a new row.", editTitle: 'Permissions', - index: true, + index: false, well: true, fields: { diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index db542f73c8..5d5e8daf6e 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -18,7 +18,7 @@ angular.module('ProjectsListDefinition', []) editTitle: 'Projects', selectInstructions: '

Select existing projects by clicking each project or checking the related checkbox. When finished, click the blue ' + 'Select button, located bottom right.

Create a brand new project by clicking the green Create New button.

', - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/Schedules.js b/awx/ui/static/js/lists/Schedules.js index eb766a03e8..26f41377e5 100644 --- a/awx/ui/static/js/lists/Schedules.js +++ b/awx/ui/static/js/lists/Schedules.js @@ -16,7 +16,7 @@ angular.module('SchedulesListDefinition', []) selectTitle: '', editTitle: 'Schedules', well: false, - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/js/lists/Teams.js b/awx/ui/static/js/lists/Teams.js index dbb773a32d..2a01d266df 100644 --- a/awx/ui/static/js/lists/Teams.js +++ b/awx/ui/static/js/lists/Teams.js @@ -17,19 +17,19 @@ angular.module('TeamsListDefinition', []) editTitle: 'Teams', selectInstructions: "Click on a row to select it, and click Finished when done. Use the green " + "button to create a new row.", - index: true, + index: false, hover: true, fields: { name: { key: true, label: 'Name', - columnClass: 'col-md-4 col-sm-9 col-xs-9', + columnClass: 'col-lg-3 col-md-4 col-sm-9 col-xs-9', modalColumnClass: 'col-md-8' }, description: { label: 'Description', - columnClass: 'col-md-3 hidden-sm hidden-xs', + columnClass: 'col-lg-3 col-md-3 hidden-sm hidden-xs', excludeModal: true }, organization: { diff --git a/awx/ui/static/js/lists/Users.js b/awx/ui/static/js/lists/Users.js index fac3be7815..cdaea595ef 100644 --- a/awx/ui/static/js/lists/Users.js +++ b/awx/ui/static/js/lists/Users.js @@ -18,7 +18,7 @@ angular.module('UserListDefinition', []) selectInstructions: '

Select existing users by clicking each user or checking the related checkbox. When finished, click the blue ' + 'Select button, located bottom right.

When available, a brand new user can be created by clicking the green ' + 'Create New button.

', - index: true, + index: false, hover: true, fields: { diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 71868fc61b..d00d78101d 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -55,6 +55,7 @@ @import "inventory-edit.less"; @import "breadcrumbs.less"; @import "stdout.less"; +@import "lists.less"; /* Bootstrap fix that's causing a right margin to appear diff --git a/awx/ui/static/less/job-details.less b/awx/ui/static/less/job-details.less index d30f37fef6..abdec4de73 100644 --- a/awx/ui/static/less/job-details.less +++ b/awx/ui/static/less/job-details.less @@ -16,15 +16,15 @@ .job_summary { .table { margin-bottom: 0; - border: 1px solid @grey; + border: 1px solid @well-border; background-color: @white; } .table>tbody>tr>td { - border-top-color: @well; + border-top-color: @well-border; padding-bottom: 0; } .table>thead>tr>th { - border-bottom-color: @well; + border-bottom-color: @well-border; padding-bottom: 0; height: 22px; } @@ -185,12 +185,12 @@ .table-detail { overflow-x: hidden; overflow-y: auto; - border: 1px solid @grey; + border: 1px solid @well-border; border-radius: 4px; background-color: @white; /*padding-left: 3px; */ .row { - border-top: 1px solid @grey; + border-top: 1px solid @well-border; } .row:first-child { border: none; @@ -301,8 +301,8 @@ label.small-label { left: 0; #hosts-table-detail { padding: 3px 0 3px 5px; - border: 1px solid @grey; - border-top: 2px solid #ddd; + border: 1px solid @well-border; + border-top: 2px solid @well-border; height: 150px; background-color: @white; .col-lg-1, .col-md-1, .col-sm-1, .col-xs-1 { diff --git a/awx/ui/static/less/lists.less b/awx/ui/static/less/lists.less new file mode 100644 index 0000000000..afa2514006 --- /dev/null +++ b/awx/ui/static/less/lists.less @@ -0,0 +1,16 @@ +/********************************************* + * Copyright (c) 2014 AnsibleWorks, Inc. + * + * lists.less + * + * custom styles for generated lists + * + */ + + .list-well { + margin-top: 20px; + + table >thead >tr >th { + font-weight: normal; + } + } diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index f642dd43e3..e338bd92e1 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -729,7 +729,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job updateOnContentResize: true }, scrollButtons: { - enable: true + enable: false }, theme: theme, mouseWheel: true, diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js index 3bf00784bf..441411b277 100644 --- a/awx/ui/static/lib/ansible/list-generator.js +++ b/awx/ui/static/lib/ansible/list-generator.js @@ -168,7 +168,7 @@ angular.module('ListGenerator', ['GeneratorHelpers']) } if (options.mode !== 'lookup' && (list.well === undefined || list.well)) { - html += "
\n"; + html += "
\n"; } if (options.activityStream) { diff --git a/awx/ui/static/partials/job_detail.html b/awx/ui/static/partials/job_detail.html index a808473633..9999715852 100644 --- a/awx/ui/static/partials/job_detail.html +++ b/awx/ui/static/partials/job_detail.html @@ -77,8 +77,9 @@
-
Name
+
Name
+
@@ -88,11 +89,12 @@ -
+
{{ play.name }}
+