Edit machine details
This commit is contained in:
parent
1f397cf0c6
commit
04b66da257
3 changed files with 59 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue