diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index b26219eed9..fb2ddc7841 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -28,7 +28,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest, $rootScope.flashMessage = null; scope.selected = []; scope.expand = true; //on load, automatically expand all nodes - + scope.parentNode = 'parent-event'; // used in ngClass to dynamicall set row level class and control scope.childNode = 'child-event'; // link color and cursor @@ -48,6 +48,9 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest, set[i]['level'] = 0; set[i]['spaces'] = 0; set[i]['class'] = 'parentNode'; + if (set[i]['event_data']['name']) { + set[i]['event_display'] = set[i]['event_data']['name']; + } } scope.jobevents[i].status = (scope.jobevents[i].failed) ? 'error' : 'success'; cDate = new Date(set[i].created); @@ -66,11 +69,11 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest, if (set[i]['related']['children'] && (set[i]['ngicon'] == undefined || set[i]['ngicon'] == 'icon-expand-alt')) { found = true; ToggleChildren({ - scope: scope, - list: list, - id: set[i].id, - children: set[i]['related']['children'] - }); + scope: scope, + list: list, + id: set[i].id, + children: set[i]['related']['children'] + }); } } if (found == false) { diff --git a/awx/ui/static/js/helpers/Children.js b/awx/ui/static/js/helpers/Children.js index 3b153d5dea..70f6cd24e9 100644 --- a/awx/ui/static/js/helpers/Children.js +++ b/awx/ui/static/js/helpers/Children.js @@ -59,6 +59,24 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities']) else { data.results[j]['class'] = 'childNode'; } + if (data.results[j]['event_data']['name']) { + // Display the actual task name + data.results[j]['event_display'] = data.results[j]['event_data']['name']; + } + if (data.results[j]['event_data']['res'] && data.results[j]['event_data']['res']['msg']) { + // Display the actual result message + data.results[j]['event_display'] = data.results[j]['event_data']['res']['msg']; + } + if (data.results[j]['event'] == 'playbook_on_stats') { + data.results[j]['event_display'] = 'Play Recap ****** '; + for (var key in data.results[j]['event_data']) { + var count = 0; + for (var itm in data.results[j]['event_data'][key]) { + count += data.results[j]['event_data'][key][itm]; + } + data.results[j]['event_display'] += key + ": " + count + " "; + } + } if (clicked == (set.length - 1)) { set.push(data.results[j]); }