Correct bug
This commit is contained in:
parent
21ed091ba6
commit
f9eb9712b3
2 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* @param {$scope} $scope The $scope service from angular
|
* @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 = "";
|
$scope.name = "";
|
||||||
|
@ -11,6 +11,9 @@ mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$
|
||||||
// When we need to show details of machine
|
// When we need to show details of machine
|
||||||
$scope.$on('showMachineCreationEvent', function (eventName, axioms) {
|
$scope.$on('showMachineCreationEvent', function (eventName, axioms) {
|
||||||
$scope.axioms = axioms;
|
$scope.axioms = axioms;
|
||||||
|
Image.getImages(function(response){
|
||||||
|
$scope.images = Image.getData().images;
|
||||||
|
});
|
||||||
$('#machineCreationModal').modal({backdrop: false, keyboard: true});
|
$('#machineCreationModal').modal({backdrop: false, keyboard: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<fieldset class="form-group">
|
<fieldset class="form-group">
|
||||||
<label class="control-label col-sm-2">Image</label>
|
<label class="control-label col-sm-2">Image</label>
|
||||||
<select class="col-sm-20" id="ramSelected" ng-model="selectedImage">
|
<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>
|
</select>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Add table
Reference in a new issue