Erreur !
This commit is contained in:
parent
847e4c04ae
commit
d1991fca2b
2 changed files with 13 additions and 2 deletions
client/js
|
@ -13,6 +13,8 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($s
|
|||
// Retrieve all Data
|
||||
Compute.pullData(updatePage);
|
||||
|
||||
Compute.getMachines(function(adzda){});
|
||||
|
||||
$scope.raiseShowMachineDetailsEvent=function(){
|
||||
var machine={name: "Machine 1", online:true};
|
||||
$rootScope.$broadcast("showMachineDetailsEvent", machine);
|
||||
|
|
|
@ -15,9 +15,18 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
|
|||
|
||||
// Get Machine
|
||||
var getMachines=function(callback){
|
||||
|
||||
|
||||
var result=$http.post('../server/index.php',
|
||||
$.param({"token" : Identity.profile.token, "task" : "Compute"}));
|
||||
$.param({"token" : Identity.getToken(), "task" : "compute", action:"getImage", serverID:"69d5bcc4-2fab-4634-b0d2-f455fee5b7bd"}));
|
||||
|
||||
// Wait and handle the response
|
||||
result.then(function (response){
|
||||
alert(response);
|
||||
callback(parseGetMachinesAnswer(response, false));
|
||||
},function(response){
|
||||
alert(response.status);
|
||||
callback(parseGetMachinesAnswer(response, true));
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue