diff --git a/client/js/controllers/home/main.js b/client/js/controllers/home/main.js index 2e9c00b..f84f625 100644 --- a/client/js/controllers/home/main.js +++ b/client/js/controllers/home/main.js @@ -3,7 +3,7 @@ * * @param {$scope} $scope The $scope service from angular */ -mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading', function ($scope, Compute, $rootScope, Loading) +mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','Identity', function ($scope, Compute, $rootScope, Loading, Identity) { var callMeAfterPullData=function(data){ @@ -11,8 +11,12 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading', f Loading.stop(); } - Loading.start(); - Compute.pullData(callMeAfterPullData); + ; + if(Compute.getData().machines == null && Identity.isAlreadyLogin()){ + Loading.start(); + Compute.pullData(callMeAfterPullData); + } + diff --git a/client/partials/home/main.html b/client/partials/home/main.html index 77a9bc4..f9f8878 100644 --- a/client/partials/home/main.html +++ b/client/partials/home/main.html @@ -4,7 +4,7 @@