summaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js')
-rw-r--r--client/js/controllers/home/home.js1
-rw-r--r--client/js/services/Compute.js10
-rw-r--r--client/js/services/Identity.js1
3 files changed, 9 insertions, 3 deletions
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js
index 835d6ac..b508c97 100644
--- a/client/js/controllers/home/home.js
+++ b/client/js/controllers/home/home.js
@@ -7,6 +7,7 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
{
var callMeAfterPullData=function(data){
+ console.log(data);
$scope.machines=Compute.getData().machines;
Loading.stop();
};
diff --git a/client/js/services/Compute.js b/client/js/services/Compute.js
index 36ddc16..2bf28d8 100644
--- a/client/js/services/Compute.js
+++ b/client/js/services/Compute.js
@@ -32,7 +32,7 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
}
else if(failedToSendRequest){
- requestParserResult.failReason="Failed to send request";
+ requestParserResult.failReason="Failed to send PullMachine request";
}
else{
requestParserResult.failReason="Error";
@@ -79,7 +79,7 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
data.axioms.images=response.data.Images;
}
else if(failedToSendRequest){
- requestParserResult.failReason="Failed to send request";
+ requestParserResult.failReason="Failed to send PullImage request";
}
else{
requestParserResult.failReason="Error";
@@ -101,8 +101,11 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
// Wait and handle the response
result.then(function (response){
+ alert(Identity.getToken());
+
callback(parsePullImagesAnswer(response, false));
},function(response){
+
callback(parsePullImagesAnswer(response, true));
});
};
@@ -117,6 +120,9 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
if(response.status==0){
pullMachines(callback);
}
+ else{
+ callback(response);
+ }
}
pullImages(nextFunction);
}
diff --git a/client/js/services/Identity.js b/client/js/services/Identity.js
index 1e8d9ff..73e5d86 100644
--- a/client/js/services/Identity.js
+++ b/client/js/services/Identity.js
@@ -31,7 +31,6 @@ mainApp.factory('Identity',[ '$http', '$cookies', '$rootScope', function($http,
// If yes, put it into variables
angular.extend(profile, profileInCookie);
token=tokenPart_0InCookie+tokenPart_1InCookie;
-
//}
// Return I'm Login