diff --git a/docs-web/src/main/webapp/src/app/docs/controller/Navigation.js b/docs-web/src/main/webapp/src/app/docs/controller/Navigation.js index 20c75b19..a7a45c8f 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/Navigation.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/Navigation.js @@ -3,47 +3,11 @@ /** * Navigation controller. */ -angular.module('docs').controller('Navigation', function($scope, $state, $rootScope, User, Restangular) { +angular.module('docs').controller('Navigation', function($scope, $state, $rootScope, User) { User.userInfo().then(function(data) { $rootScope.userInfo = data; }); - // Last time when the errors logs was checked - $scope.lastLogCheck = new Date().getTime(); - - // Number of errors logs - $scope.errorNumber = 0; - - // Check repeatedly if there is a new error log - setInterval(function() { - $scope.$apply(function() { - Restangular.one('app/log').get({ - // Error count will be wrong if there is more than 10 errors in 60 seconds - limit: 10, - level: 'ERROR' - }).then(function(data) { - // Add new errors - $scope.errorNumber += _.reduce(data.logs, function(number, log) { - if (log.date > $scope.lastLogCheck) { - return ++number; // It's a new error - } - return number; // Not a new error - }, 0); - - // Update last check timestamp - $scope.lastLogCheck = new Date().getTime(); - }); - }) - }, 60000); - - /** - * Navigate to error logs. - */ - $scope.openLogs = function() { - $scope.errorNumber = 0; - $state.go('settings.log'); - }; - /** * User logout. */ diff --git a/docs-web/src/main/webapp/src/index.html b/docs-web/src/main/webapp/src/index.html index f6b70f99..9230d5af 100644 --- a/docs-web/src/main/webapp/src/index.html +++ b/docs-web/src/main/webapp/src/index.html @@ -139,12 +139,6 @@