mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Merge pull request #2169 from anoek/1192
Fixed stdout viewing on management job pages
This commit is contained in:
commit
8a884894c5
@ -94,7 +94,18 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
|
||||
}
|
||||
});
|
||||
|
||||
// stdoutText optionall gets passed through in the directive declaration.
|
||||
$scope.$watch('stdoutText', function(newVal, oldVal) {
|
||||
if(newVal && newVal !== oldVal) {
|
||||
$('#pre-container-content').html(newVal);
|
||||
}
|
||||
});
|
||||
|
||||
function loadStdout() {
|
||||
if (!$scope.stdoutEndpoint) {
|
||||
return;
|
||||
}
|
||||
|
||||
Rest.setUrl($scope.stdoutEndpoint + '?format=json&start_line=0&end_line=' + page_size);
|
||||
Rest.get()
|
||||
.success(function(data) {
|
||||
@ -123,6 +134,10 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
|
||||
}
|
||||
|
||||
function getNextSection() {
|
||||
if (!$scope.stdoutEndpoint) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get the next range of data from the API
|
||||
var start = loaded_sections[loaded_sections.length - 1].end, url;
|
||||
url = $scope.stdoutEndpoint + '?format=json&start_line=' + start + '&end_line=' + (start + page_size);
|
||||
|
||||
@ -10,6 +10,7 @@ export default [ 'templateUrl',
|
||||
return {
|
||||
scope: {
|
||||
stdoutEndpoint: '=',
|
||||
stdoutText: '=',
|
||||
jobId: '='
|
||||
},
|
||||
templateUrl: templateUrl('standard-out/log/standard-out-log'),
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<standard-out-log stdout-endpoint="job.related.stdout"></standard-out-log>
|
||||
<standard-out-log stdout-text="job.result_stdout"></standard-out-log>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user