diff --git a/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html b/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html index b0b3d85f10..c283d578f7 100644 --- a/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html +++ b/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html @@ -44,6 +44,9 @@
Too much previous output to display. Showing running standard output.
+ +
-1) { - // put non-duplicate lines into the standard - // out pane where they should go (within the - // right header section, before the next line - // as indicated by start_line) - window.$ = $; - var putIn; - var classList = $("div", - "
"+mungedEvent.stdout+"
") - .attr("class").split(" "); - if (classList - .filter(v => v.indexOf("task_") > -1) - .length) { - putIn = classList - .filter(v => v.indexOf("task_") > -1)[0]; - } else if(classList - .filter(v => v.indexOf("play_") > -1) - .length) { - putIn = classList - .filter(v => v.indexOf("play_") > -1)[0]; - } else { - appendToBottom(mungedEvent); } - var putAfter; - var isDup = false; - $(".header_" + putIn + ",." + putIn) - .each((i, v) => { - if (angular.element(v).scope() - .event.start_line < mungedEvent - .start_line) { - putAfter = v; - } else if (angular.element(v).scope() - .event.start_line === mungedEvent - .start_line) { - isDup = true; - return false; - } else if (angular.element(v).scope() - .event.start_line > mungedEvent - .start_line) { - return false; - } - }); - - if (!isDup) { - $(putAfter).after($compile(mungedEvent - .stdout)($scope.events[mungedEvent - .counter])); - } - - - classList = null; - putIn = null; - } else { - appendToBottom(mungedEvent); + // delete ref to the elem because it might leak scope + // if you don't + $prevElem = null; } // move the followAnchor to the bottom of the @@ -453,7 +394,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy }; $scope.stdoutContainerAvailable.promise.then(() => { - getSkeleton(jobData.related.job_events + "?order_by=id&or__event__in=playbook_on_start,playbook_on_play_start,playbook_on_task_start,playbook_on_stats"); + getSkeleton(jobData.related.job_events + "?order_by=start_line&or__event__in=playbook_on_start,playbook_on_play_start,playbook_on_task_start,playbook_on_stats"); }); var getEvents; diff --git a/awx/ui/client/src/job-results/parse-stdout.service.js b/awx/ui/client/src/job-results/parse-stdout.service.js index 20cb46f3c0..8630c0fa07 100644 --- a/awx/ui/client/src/job-results/parse-stdout.service.js +++ b/awx/ui/client/src/job-results/parse-stdout.service.js @@ -78,6 +78,12 @@ export default ['$log', 'moment', function($log, moment){ // .JobResultsStdOut-aLineOfStdOut element getLineClasses: function(event, line, lineNum) { var string = ""; + + if (lineNum === event.end_line) { + // used to tell you where to put stuff in the pane + string += ` next_is_${event.end_line + 1}`; + } + if (event.event_name === "playbook_on_play_start") { // play header classes string += " header_play";