Make log lines backlog configurable

This commit is contained in:
Johannes Zellner
2017-08-08 10:07:33 +02:00
parent 96e2fa159c
commit 9f1af572a0
2 changed files with 7 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ angular.module('Application').controller('LogsController', ['$scope', '$location
$scope.logs = [];
$scope.selected = '';
$scope.activeEventSource = null;
$scope.lines = 10;
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint16Array(buf));
@@ -36,7 +37,7 @@ angular.module('Application').controller('LogsController', ['$scope', '$location
}
var func = newVal.type === 'platform' ? Client.getPlatformLogs : Client.getAppLogs;
func(newVal.value, true, function handleLogs(error, result) {
func(newVal.value, true, $scope.lines, function handleLogs(error, result) {
if (error) return console.error(error);
var logViewer = $('.log-line-container');