Test
This commit is contained in:
parent
3cef0ea672
commit
60cfe3ebc0
3 changed files with 9 additions and 3 deletions
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue