summaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js')
-rw-r--r--client/js/app.js2
-rwxr-xr-x[-rw-r--r--]client/js/controllers/home/home.js23
2 files changed, 20 insertions, 5 deletions
diff --git a/client/js/app.js b/client/js/app.js
index 1602e65..a26e0ec 100644
--- a/client/js/app.js
+++ b/client/js/app.js
@@ -24,7 +24,7 @@ mainApp.config(['$routeProvider', function($routeProvider){
templateUrl: 'partials/image/image.html',
controller: 'imageCtrl'
}).otherwise({
- redirectTo: '/home'
+ redirectTo: '/'
});
}]);
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js
index 2b355b1..3332a10 100644..100755
--- a/client/js/controllers/home/home.js
+++ b/client/js/controllers/home/home.js
@@ -9,16 +9,31 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
var callMeAfterPullData=function(data){
$scope.machines=Compute.getData().machines;
Loading.stop();
- };
-
-
+ }
+
+ ;
+ if(Compute.getData().machines == null && Identity.isAlreadyLogin()){
+ Loading.start();
+ Compute.pullData(callMeAfterPullData);
+ }
+ else{
+ if(Identity.isAlreadyLogin()){
+ callMeAfterPullData();
+ }
+ }
+
+
+ Image.getImages(function(){});
+
+
+
$scope.raiseShowMachineDetailsEvent=function(id){
var callback=function(){
Loading.stop();
var data=Compute.getData();
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[id], data.axioms);
-
+
}
Loading.start();
Compute.pullMachines(callback);