Correct bug

This commit is contained in:
manzerbredes 2016-03-02 07:25:28 +01:00
parent 2d99f1ecf2
commit b6d7d2c30e
2 changed files with 8 additions and 4 deletions

View file

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

View file

@ -4,7 +4,7 @@
</div>
<div class="panel-body">
Pour charger les machines, recharger la page (temporaire)<br />
Selectionner une machine:
<div ng-repeat="machine in machines"> <a ng-click="raiseShowMachineDetailsEvent(machine.id)"> {{ machine.name }}</a></div>