Merge pull request #2169 from anoek/1192

Fixed stdout viewing on management job pages
This commit is contained in:
Akita Noek 2016-06-07 13:09:04 -04:00
commit 8a884894c5
3 changed files with 17 additions and 1 deletions

View File

@ -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);

View File

@ -10,6 +10,7 @@ export default [ 'templateUrl',
return {
scope: {
stdoutEndpoint: '=',
stdoutText: '=',
jobId: '='
},
templateUrl: templateUrl('standard-out/log/standard-out-log'),

View File

@ -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>