summaryrefslogtreecommitdiff
path: root/client/js/controllers/home/machineDetails.js
diff options
context:
space:
mode:
authorroot <root@kabir-PC>2016-03-02 15:11:56 +0100
committerroot <root@kabir-PC>2016-03-02 15:11:56 +0100
commitdac5c28a6795984a32687fe21c41783de2e85d8b (patch)
treebb5b719f923b33e31d5a0880d1d50dbe49543e45 /client/js/controllers/home/machineDetails.js
parent70fcf3553abb4a25672ee198dafb89e430e2bd79 (diff)
parentb6d7d2c30efe5e9758072bb82ea3a947bda7fd1d (diff)
Merge branch 'develop' of https://github.com/manzerbredes/istic-openstack into othmane
Diffstat (limited to 'client/js/controllers/home/machineDetails.js')
-rw-r--r--client/js/controllers/home/machineDetails.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js
new file mode 100644
index 0000000..24fac42
--- /dev/null
+++ b/client/js/controllers/home/machineDetails.js
@@ -0,0 +1,41 @@
+/**
+ * The home controller
+ *
+ * @param {$scope} $scope The $scope service from angular
+ */
+mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout)
+{
+
+ $scope.machine={};
+ $("#waitingForToggleMachine").hide();
+
+ $scope.$on('showMachineDetailsEvent', function(eventName ,machine, axioms){
+ $scope.machine=machine;
+ $scope.axioms=axioms;
+ console.log(machine);
+ $('#machineDetailsModal').modal({backdrop: false, keyboard: true});
+ });
+
+
+ $scope.toggleMachineState=function(){
+ $("#waitingForToggleMachine").show();
+
+ // Fake timeout
+ $timeout(function(){
+ $("#waitingForToggleMachine").hide();
+ }, 3000);
+ $timeout(function(){
+ $scope.machine.online=!$scope.machine.online;
+
+ }, 3000);
+
+
+ };
+
+ $scope.applyModifications=function(){
+ //Todo
+ }
+
+
+
+}]);