mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03:30
fix performance for the last time of 3.1.0?
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') {
|
||||||
@@ -412,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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -591,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