Correct bugs
This commit is contained in:
parent
2856a776db
commit
21ed091ba6
3 changed files with 12 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* @param {$scope} $scope The $scope service from angular
|
* @param {$scope} $scope The $scope service from angular
|
||||||
*/
|
*/
|
||||||
mainApp.controller('machineDetailsCtrl', ['$scope', 'Compute', '$rootScope', '$timeout', 'Identity', function ($scope, Compute, $rootScope, $timeout, Identity)
|
mainApp.controller('machineDetailsCtrl', ['$scope', 'Compute', '$rootScope', '$timeout', 'Identity', 'Image', function ($scope, Compute, $rootScope, $timeout, Identity, Image)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ mainApp.controller('machineDetailsCtrl', ['$scope', 'Compute', '$rootScope', '$t
|
||||||
$scope.machine = machine;
|
$scope.machine = machine;
|
||||||
// console.log(machine.flavor)
|
// console.log(machine.flavor)
|
||||||
$scope.axioms = axioms;
|
$scope.axioms = axioms;
|
||||||
|
Image.getImages(function(response){
|
||||||
|
$scope.images = Image.getData().images;
|
||||||
|
});
|
||||||
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
||||||
});
|
});
|
||||||
// Try to stop or start a machine
|
// Try to stop or start a machine
|
||||||
|
|
|
@ -26,6 +26,7 @@ mainApp.factory('Image', ['$http', 'Identity', function ($http, Identity) {
|
||||||
requestParserResult.status = 0;
|
requestParserResult.status = 0;
|
||||||
data.images = response.data.Images;
|
data.images = response.data.Images;
|
||||||
|
|
||||||
|
|
||||||
} else if (failedToSendRequest) {
|
} else if (failedToSendRequest) {
|
||||||
requestParserResult.failReason = "Failed to send request";
|
requestParserResult.failReason = "Failed to send request";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -49,7 +49,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">
|
<select class="col-sm-20" id="ramSelected">
|
||||||
<option ng-repeat="image in axioms.images" ng-selected="machine.imageId == Object.keys(image)">{{ image.name}}</option>
|
<option ng-repeat="image in images" ng-selected="machine.imageId == Object.keys(image)">{{ image.name}}</option>
|
||||||
</select>
|
</select>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue