diff options
| author | Loic GUEGAN <loic@Manzerbredes.home> | 2016-05-06 14:39:30 +0200 |
|---|---|---|
| committer | Loic GUEGAN <loic@Manzerbredes.home> | 2016-05-06 14:39:30 +0200 |
| commit | f9eb9712b39ce94a9898daa281ddb0585198e3d9 (patch) | |
| tree | 4b92f04aa4f676db27f22afd60420271337c0759 | |
| parent | 21ed091ba6209d9c6fdaf9191412515a5f01d82f (diff) | |
Correct bug
| -rw-r--r-- | client/js/controllers/home/machineCreation.js | 5 | ||||
| -rw-r--r-- | client/partials/home/machineCreation.html | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/client/js/controllers/home/machineCreation.js b/client/js/controllers/home/machineCreation.js index aa488af..1b9fd7b 100644 --- a/client/js/controllers/home/machineCreation.js +++ b/client/js/controllers/home/machineCreation.js @@ -3,7 +3,7 @@ * * @param {$scope} $scope The $scope service from angular */ -mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$timeout', 'Identity', function ($scope, Compute, $rootScope, $timeout, Identity) +mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$timeout', 'Identity', 'Image', function ($scope, Compute, $rootScope, $timeout, Identity, Image) { $scope.name = ""; @@ -11,6 +11,9 @@ mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$ // When we need to show details of machine $scope.$on('showMachineCreationEvent', function (eventName, axioms) { $scope.axioms = axioms; + Image.getImages(function(response){ + $scope.images = Image.getData().images; + }); $('#machineCreationModal').modal({backdrop: false, keyboard: true}); }); diff --git a/client/partials/home/machineCreation.html b/client/partials/home/machineCreation.html index 7c23ec7..8abdf86 100644 --- a/client/partials/home/machineCreation.html +++ b/client/partials/home/machineCreation.html @@ -25,7 +25,7 @@ <fieldset class="form-group"> <label class="control-label col-sm-2">Image</label> <select class="col-sm-20" id="ramSelected" ng-model="selectedImage"> - <option ng-repeat="image in axioms.images" value="{{image.id}}">{{ image.name}}</option> + <option ng-repeat="image in images" value="{{image.id}}">{{ image.name}}</option> </select> </fieldset> </form> |
