From 66ba60c475b20095fb8e3a49f386d4a1de6f4e0d Mon Sep 17 00:00:00 2001 From: jonny64 Date: Sat, 21 Feb 2015 18:09:12 +0000 Subject: [PATCH] logs: added spinner during refresh --- app/components/containerLogs/containerLogsController.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/containerLogs/containerLogsController.js b/app/components/containerLogs/containerLogsController.js index ff8330a98..97db2a5b9 100644 --- a/app/components/containerLogs/containerLogsController.js +++ b/app/components/containerLogs/containerLogsController.js @@ -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(); }); }