mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 21:21:21 -03:30
Fix some busted job stdout end-line calculation under certain
conditions. Make it to where the ui re-uses the endpoint from the last stdout request cycle instead of adding one to it since we are not left-inclusive on list slicing.
This commit is contained in:
parent
f8d70f03ea
commit
e19984d6db
@ -534,7 +534,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
else:
|
||||
start_actual = int(start_line)
|
||||
if end_line is not None:
|
||||
end_actual = min(int(start_line)+int(end_line), len(stdout_lines))
|
||||
end_actual = min(int(end_line), len(stdout_lines))
|
||||
else:
|
||||
end_actual = len(stdout_lines)
|
||||
return return_buffer, start_actual, end_actual, absolute_end
|
||||
|
||||
@ -237,7 +237,7 @@ function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams,
|
||||
|
||||
function getNextSection() {
|
||||
// get the next range of data from the API
|
||||
var start = loaded_sections[loaded_sections.length - 1].end + 1, url;
|
||||
var start = loaded_sections[loaded_sections.length - 1].end, url;
|
||||
url = stdout_url + '?format=json&start_line=' + start + '&end_line=' + (start + page_size);
|
||||
$('#stdoutMoreRowsBottom').fadeIn();
|
||||
Rest.setUrl(url);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user