Commit for testing
This commit is contained in:
parent
f819bc0c90
commit
0266c16ffc
4 changed files with 32 additions and 24 deletions
|
@ -32,8 +32,8 @@ mainApp.controller('homeCtrl', ['$scope', 'Compute', '$rootScope', 'Loading', 'I
|
|||
});
|
||||
|
||||
|
||||
$scope.raiseShowMachineCreationEvent = function (){
|
||||
$rootScope.$broadcast("showMachineCreationEvent");
|
||||
$scope.raiseShowMachineCreationEvent = function () {
|
||||
$rootScope.$broadcast("showMachineCreationEvent", Compute.getData().axioms);
|
||||
};
|
||||
|
||||
// Function to call from view to display the details of a machine
|
||||
|
|
|
@ -9,8 +9,17 @@ mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$
|
|||
|
||||
$scope.name = "loic"
|
||||
// When we need to show details of machine
|
||||
$scope.$on('showMachineCreationEvent', function (eventName) {
|
||||
$scope.$on('showMachineCreationEvent', function (eventName, axioms) {
|
||||
$scope.axioms=axioms;
|
||||
$('#machineCreationModal').modal({backdrop: false, keyboard: true});
|
||||
});
|
||||
|
||||
$scope.createMachine=function(){
|
||||
machine={}
|
||||
machine.name="loicTest"
|
||||
machine.flavorId=1
|
||||
machine.imageId="fd1ea580-a83e-4dc8-833c-96ce2b6f1358"
|
||||
Compute.createMachine(function(){console.log("done")}, machine)
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue