summaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js')
-rw-r--r--client/js/controllers/home/main.js4
-rw-r--r--client/js/services/Compute.js30
2 files changed, 32 insertions, 2 deletions
diff --git a/client/js/controllers/home/main.js b/client/js/controllers/home/main.js
index e629779..d42e413 100644
--- a/client/js/controllers/home/main.js
+++ b/client/js/controllers/home/main.js
@@ -3,8 +3,8 @@
*
* @param {$scope} $scope The $scope service from angular
*/
-mainApp.controller('homeCtrl', function ($scope)
+mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute)
{
-}); \ No newline at end of file
+}]);
diff --git a/client/js/services/Compute.js b/client/js/services/Compute.js
new file mode 100644
index 0000000..748510e
--- /dev/null
+++ b/client/js/services/Compute.js
@@ -0,0 +1,30 @@
+
+mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
+
+
+
+ // Parser
+ var parseGetMachinesAnswer=function(response, failedToSendRequest){
+
+ };
+
+
+ // Get Machine
+ var getMachines=function(callback){
+
+ var result=$http.post('../server/index.php',
+ $.param({"token" : Identity.profile.token, "task" : "Compute"}));
+
+
+
+ };
+
+
+
+ // Return services objects
+ return {
+ getMachines: getMachines
+ };
+
+
+}]);