1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00

logs: added spinner during refresh

This commit is contained in:
jonny64 2015-02-21 18:09:12 +00:00
parent b257216194
commit 66ba60c475

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();
});
}