mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
Merge pull request #5424 from jlmitch5/jobResultsFixes
Job results fixes
This commit is contained in:
@@ -298,6 +298,14 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
$scope.job.finished = mungedEvent.finishedTime;
|
$scope.job.finished = mungedEvent.finishedTime;
|
||||||
$scope.jobFinished = true;
|
$scope.jobFinished = true;
|
||||||
$scope.followTooltip = "Jump to last line of standard out.";
|
$scope.followTooltip = "Jump to last line of standard out.";
|
||||||
|
if ($scope.followEngaged) {
|
||||||
|
if (!$scope.followScroll) {
|
||||||
|
$scope.followScroll = function() {
|
||||||
|
$log.error("follow scroll undefined, standard out directive not loaded yet?");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$scope.followScroll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change === 'countFinished') {
|
if (change === 'countFinished') {
|
||||||
@@ -365,25 +373,30 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
|
|
||||||
var putAfter;
|
var putAfter;
|
||||||
var isDup = false;
|
var isDup = false;
|
||||||
$(".header_" + putIn + ",." + putIn)
|
|
||||||
.each((i, v) => {
|
if ($(".header_" + putIn + ",." + putIn).length === 0) {
|
||||||
if (angular.element(v).scope()
|
appendToBottom(mungedEvent);
|
||||||
.event.start_line < mungedEvent
|
} else {
|
||||||
.start_line) {
|
$(".header_" + putIn + ",." + putIn)
|
||||||
putAfter = v;
|
.each((i, v) => {
|
||||||
} else if (angular.element(v).scope()
|
if (angular.element(v).scope()
|
||||||
.event.start_line === mungedEvent
|
.event.start_line < mungedEvent
|
||||||
.start_line) {
|
.start_line) {
|
||||||
isDup = true;
|
putAfter = v;
|
||||||
return false;
|
} else if (angular.element(v).scope()
|
||||||
} else if (angular.element(v).scope()
|
.event.start_line === mungedEvent
|
||||||
.event.start_line > mungedEvent
|
.start_line) {
|
||||||
.start_line) {
|
isDup = true;
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else if (angular.element(v).scope()
|
||||||
appendToBottom(mungedEvent);
|
.event.start_line > mungedEvent
|
||||||
}
|
.start_line) {
|
||||||
});
|
return false;
|
||||||
|
} else {
|
||||||
|
appendToBottom(mungedEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!isDup) {
|
if (!isDup) {
|
||||||
$(putAfter).after($compile(mungedEvent
|
$(putAfter).after($compile(mungedEvent
|
||||||
@@ -407,17 +420,6 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
// container
|
// container
|
||||||
$(".JobResultsStdOut-followAnchor")
|
$(".JobResultsStdOut-followAnchor")
|
||||||
.appendTo(".JobResultsStdOut-stdoutContainer");
|
.appendTo(".JobResultsStdOut-stdoutContainer");
|
||||||
|
|
||||||
// if follow is engaged,
|
|
||||||
// scroll down to the followAnchor
|
|
||||||
if ($scope.followEngaged) {
|
|
||||||
if (!$scope.followScroll) {
|
|
||||||
$scope.followScroll = function() {
|
|
||||||
$log.error("follow scroll undefined, standard out directive not loaded yet?");
|
|
||||||
};
|
|
||||||
}
|
|
||||||
$scope.followScroll();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -586,10 +588,25 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
var buffer = [];
|
var buffer = [];
|
||||||
|
|
||||||
var processBuffer = function() {
|
var processBuffer = function() {
|
||||||
for (let i = 0; i < 20; i++) {
|
var follow = function() {
|
||||||
|
// if follow is engaged,
|
||||||
|
// scroll down to the followAnchor
|
||||||
|
if ($scope.followEngaged) {
|
||||||
|
if (!$scope.followScroll) {
|
||||||
|
$scope.followScroll = function() {
|
||||||
|
$log.error("follow scroll undefined, standard out directive not loaded yet?");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$scope.followScroll();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
processEvent(buffer[i]);
|
processEvent(buffer[i]);
|
||||||
buffer.splice(i, 1);
|
buffer.splice(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
follow();
|
||||||
};
|
};
|
||||||
|
|
||||||
var bufferInterval;
|
var bufferInterval;
|
||||||
|
|||||||
Reference in New Issue
Block a user