mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
Merge pull request #2169 from anoek/1192
Fixed stdout viewing on management job pages
This commit is contained in:
@@ -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() {
|
function loadStdout() {
|
||||||
|
if (!$scope.stdoutEndpoint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Rest.setUrl($scope.stdoutEndpoint + '?format=json&start_line=0&end_line=' + page_size);
|
Rest.setUrl($scope.stdoutEndpoint + '?format=json&start_line=0&end_line=' + page_size);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
@@ -123,6 +134,10 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getNextSection() {
|
function getNextSection() {
|
||||||
|
if (!$scope.stdoutEndpoint) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the next range of data from the API
|
// get the next range of data from the API
|
||||||
var start = loaded_sections[loaded_sections.length - 1].end, url;
|
var start = loaded_sections[loaded_sections.length - 1].end, url;
|
||||||
url = $scope.stdoutEndpoint + '?format=json&start_line=' + start + '&end_line=' + (start + page_size);
|
url = $scope.stdoutEndpoint + '?format=json&start_line=' + start + '&end_line=' + (start + page_size);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export default [ 'templateUrl',
|
|||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
stdoutEndpoint: '=',
|
stdoutEndpoint: '=',
|
||||||
|
stdoutText: '=',
|
||||||
jobId: '='
|
jobId: '='
|
||||||
},
|
},
|
||||||
templateUrl: templateUrl('standard-out/log/standard-out-log'),
|
templateUrl: templateUrl('standard-out/log/standard-out-log'),
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user