diff --git a/src/main/resources/static/js/controllers/indexController.js b/src/main/resources/static/js/controllers/indexController.js index 2898650..c1f7622 100644 --- a/src/main/resources/static/js/controllers/indexController.js +++ b/src/main/resources/static/js/controllers/indexController.js @@ -8,8 +8,8 @@ var app = angular.module('app'); app.controller('LoginController', function ($scope, AuthService, Session, $rootScope, $location, $cookieStore, $http) { $scope.currentUser = null; - //$scope.URL = 'http://lore:8080'; - $scope.URL = ''; + $scope.URL = 'http://lore:8080'; + //$scope.URL = ''; $scope.credential = { "username": '', "password": '', @@ -88,6 +88,7 @@ app.controller('LoginController', function ($scope, AuthService, Session, $rootS app.controller('IndexCtrl', function ($document, $scope, $compile, $routeParams, serviceAPI, $interval, $cookieStore, $location, AuthService, http, $rootScope, $window, $route) { $('#side-menu').metisMenu(); + $scope.adminRole = "ADMIN"; $scope.superProject = "*"; $scope.numberNSR = 0; @@ -190,14 +191,22 @@ app.controller('IndexCtrl', function ($document, $scope, $compile, $routeParams, console.log(newValue); if (!angular.isUndefined(newValue) && !angular.isUndefined(oldValue)) { $cookieStore.put('project', newValue); + + loadNumbers(); + loadQuota(); + getConfig(); + loadCurrentUser(); } if (!angular.isUndefined(newValue) && angular.isUndefined(oldValue)) { $cookieStore.put('project', newValue); + loadNumbers(); loadQuota(); getConfig(); loadCurrentUser(); } + + });