logs: added spinner during refresh

pull/2/head
jonny64 2015-02-21 18:09:12 +00:00
parent b257216194
commit 66ba60c475
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@ function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Containe
});
function getLogs() {
ViewSpinner.spin();
ContainerLogs.get($routeParams.id, {
stdout: 1,
stderr: 0,
@ -28,7 +29,9 @@ function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Containe
}, function(data, status, headers, config) {
// Replace carriage returns twith newlines to clean up output
$scope.stdout = data.replace(/[\r]/g, '\n');
ViewSpinner.stop();
});
ContainerLogs.get($routeParams.id, {
stdout: 0,
stderr: 1,
@ -36,6 +39,7 @@ function($scope, $routeParams, $location, $anchorScroll, ContainerLogs, Containe
tail: $scope.tailLines
}, function(data, status, headers, config) {
$scope.stderr = data.replace(/[\r]/g, '\n');
ViewSpinner.stop();
});
}