mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
rearranging logic to match integrity of existing logic
This commit is contained in:
@@ -220,6 +220,25 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
|
|
||||||
// EVENT STUFF BELOW
|
// EVENT STUFF BELOW
|
||||||
|
|
||||||
|
var appendToBottom = function(mungedEvent){
|
||||||
|
// if we get here then the event type was either a
|
||||||
|
// header line, recap line, or one of the additional
|
||||||
|
// event types, so we append it to the bottom.
|
||||||
|
// These are the event types for captured
|
||||||
|
// stdout not directly related to playbook or runner
|
||||||
|
// events:
|
||||||
|
// (0, 'debug', _('Debug'), False),
|
||||||
|
// (0, 'verbose', _('Verbose'), False),
|
||||||
|
// (0, 'deprecated', _('Deprecated'), False),
|
||||||
|
// (0, 'warning', _('Warning'), False),
|
||||||
|
// (0, 'system_warning', _('System Warning'), False),
|
||||||
|
// (0, 'error', _('Error'), True),
|
||||||
|
angular
|
||||||
|
.element(".JobResultsStdOut-stdoutContainer")
|
||||||
|
.append($compile(mungedEvent
|
||||||
|
.stdout)($scope.events[mungedEvent
|
||||||
|
.counter]));
|
||||||
|
};
|
||||||
// This is where the async updates to the UI actually happen.
|
// This is where the async updates to the UI actually happen.
|
||||||
// Flow is event queue munging in the service -> $scope setting in here
|
// Flow is event queue munging in the service -> $scope setting in here
|
||||||
var processEvent = function(event, context) {
|
var processEvent = function(event, context) {
|
||||||
@@ -275,9 +294,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
$scope.events[mungedEvent.counter]
|
$scope.events[mungedEvent.counter]
|
||||||
.event = mungedEvent;
|
.event = mungedEvent;
|
||||||
|
|
||||||
if (mungedEvent.stdout.indexOf("not_skeleton") > -1 &&
|
if (mungedEvent.stdout.indexOf("not_skeleton")) {
|
||||||
mungedEvent.name.indexOf("plabyook_") > -1 ||
|
|
||||||
mungedEvent.name.indexOf("runner_") > -1 ) {
|
|
||||||
// put non-duplicate lines into the standard
|
// put non-duplicate lines into the standard
|
||||||
// out pane where they should go (within the
|
// out pane where they should go (within the
|
||||||
// right header section, before the next line
|
// right header section, before the next line
|
||||||
@@ -292,11 +309,15 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
.length) {
|
.length) {
|
||||||
putIn = classList
|
putIn = classList
|
||||||
.filter(v => v.indexOf("task_") > -1)[0];
|
.filter(v => v.indexOf("task_") > -1)[0];
|
||||||
} else {
|
} else if(classList
|
||||||
|
.filter(v => v.indexOf("play_") > -1)
|
||||||
|
.length) {
|
||||||
putIn = classList
|
putIn = classList
|
||||||
.filter(v => v.indexOf("play_") > -1)[0];
|
.filter(v => v.indexOf("play_") > -1)[0];
|
||||||
|
} else {
|
||||||
|
appendToBottom(mungedEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
var putAfter;
|
var putAfter;
|
||||||
var isDup = false;
|
var isDup = false;
|
||||||
$(".header_" + putIn + ",." + putIn)
|
$(".header_" + putIn + ",." + putIn)
|
||||||
@@ -323,26 +344,11 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
.counter]));
|
.counter]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
classList = null;
|
classList = null;
|
||||||
putIn = null;
|
putIn = null;
|
||||||
} else {
|
} else {
|
||||||
// if we get here then the event type was either a
|
appendToBottom(mungedEvent);
|
||||||
// header line, recap line, or one of the additional
|
|
||||||
// event types, so we append it to the bottom.
|
|
||||||
// These are the event types for captured
|
|
||||||
// stdout not directly related to playbook or runner
|
|
||||||
// events:
|
|
||||||
// (0, 'debug', _('Debug'), False),
|
|
||||||
// (0, 'verbose', _('Verbose'), False),
|
|
||||||
// (0, 'deprecated', _('Deprecated'), False),
|
|
||||||
// (0, 'warning', _('Warning'), False),
|
|
||||||
// (0, 'system_warning', _('System Warning'), False),
|
|
||||||
// (0, 'error', _('Error'), True),
|
|
||||||
angular
|
|
||||||
.element(".JobResultsStdOut-stdoutContainer")
|
|
||||||
.append($compile(mungedEvent
|
|
||||||
.stdout)($scope.events[mungedEvent
|
|
||||||
.counter]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// move the followAnchor to the bottom of the
|
// move the followAnchor to the bottom of the
|
||||||
|
|||||||
Reference in New Issue
Block a user