Edit Compute service and home controller

This commit is contained in:
manzerbredes 2016-02-22 17:30:25 +01:00
parent 0c31cbdbd4
commit ff1832adcf
4 changed files with 24 additions and 5 deletions

View file

@ -2,6 +2,10 @@
mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
var data={};
data.machines={};
// Parser
var parseGetMachinesAnswer=function(response, failedToSendRequest){
@ -13,17 +17,23 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
var getMachines=function(callback){
var result=$http.post('../server/index.php',
$.param({"token" : Identity.profile.token, "task" : "Compute"}));
$.param({"token" : Identity.profile.token, "task" : "Compute"}));
};
var pullData=function(callback){
// TODO call getMachines etc...
}
// Return services objects
return {
getMachines: getMachines
pullData: pullData
data:data
};