mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Merge pull request #5424 from jlmitch5/jobResultsFixes
Job results fixes
This commit is contained in:
commit
71c6fc2fa1
@ -298,6 +298,14 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
$scope.job.finished = mungedEvent.finishedTime;
|
||||
$scope.jobFinished = true;
|
||||
$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') {
|
||||
@ -365,25 +373,30 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
|
||||
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;
|
||||
} else {
|
||||
appendToBottom(mungedEvent);
|
||||
}
|
||||
});
|
||||
|
||||
if ($(".header_" + putIn + ",." + putIn).length === 0) {
|
||||
appendToBottom(mungedEvent);
|
||||
} else {
|
||||
$(".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;
|
||||
} else {
|
||||
appendToBottom(mungedEvent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!isDup) {
|
||||
$(putAfter).after($compile(mungedEvent
|
||||
@ -407,17 +420,6 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
// container
|
||||
$(".JobResultsStdOut-followAnchor")
|
||||
.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 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]);
|
||||
buffer.splice(i, 1);
|
||||
}
|
||||
|
||||
follow();
|
||||
};
|
||||
|
||||
var bufferInterval;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user