From ff1832adcfe10fadb6cbf738c874611f77f6dd43 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Mon, 22 Feb 2016 17:30:25 +0100 Subject: Edit Compute service and home controller --- client/js/services/Compute.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'client/js/services/Compute.js') diff --git a/client/js/services/Compute.js b/client/js/services/Compute.js index 748510e..c5c8da9 100644 --- a/client/js/services/Compute.js +++ b/client/js/services/Compute.js @@ -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 }; -- cgit v1.2.3