diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-02-28 17:29:34 +0100 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-02-28 17:29:34 +0100 |
| commit | 04b66da25740e569f9d66e21077a1e998b9f9d0f (patch) | |
| tree | 8524bd14eebb990d342c5032027a442f432c5f5a /client/js/controllers/home/machineDetails.js | |
| parent | 1f397cf0c6a4f177c9f66e4a0f4d2274f26ae5be (diff) | |
Edit machine details
Diffstat (limited to 'client/js/controllers/home/machineDetails.js')
| -rw-r--r-- | client/js/controllers/home/machineDetails.js | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js index 43cfe07..3ee4625 100644 --- a/client/js/controllers/home/machineDetails.js +++ b/client/js/controllers/home/machineDetails.js @@ -3,11 +3,11 @@ * * @param {$scope} $scope The $scope service from angular */ -mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope) +mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout) { - - + $scope.machine={}; + $("#waitingForToggleMachine").hide(); $scope.$on('showMachineDetailsEvent', function(eventName ,machine){ $scope.machine=machine; @@ -15,6 +15,24 @@ mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', fu }); + $scope.toggleMachineState=function(){ + $("#waitingForToggleMachine").show(); + + // Fake timeout + $timeout(function(){ + $("#waitingForToggleMachine").hide(); + }, 1000); + $timeout(function(){ + $scope.machine.online=!$scope.machine.online; + + }, 1000); + + + }; + + $scope.applyModifications=function(){ + //Todo + } |
