Make the "Select Boot Source" order deterministic
This patch makes the "Select Boot Source" dropdown in the Source step of the new Launch Instance have a deterministic order. The slight downside to this is that the order needs to be recalculated as new possible boot sources are loaded. However, given that this is the second step of the workflow, this is unlikely to ever be noticed by a user. Change-Id: Iaa2e37bae02c9ce5ab654ac8a3327c0834e7b49e Closes-Bug: 1640493
This commit is contained in:
parent
1f9e7b685e
commit
b0099bbb87
|
@ -671,6 +671,9 @@
|
|||
type: type,
|
||||
label: label
|
||||
});
|
||||
model.allowedBootSources.sort(function(a, b) {
|
||||
return a.type > b.type;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -393,8 +393,7 @@
|
|||
return $scope.model.allowedBootSources;
|
||||
},
|
||||
function changeBootSource(newValue) {
|
||||
if (angular.isArray(newValue) && newValue.length > 0 &&
|
||||
!$scope.model.newInstanceSpec.source_type) {
|
||||
if (angular.isArray(newValue) && newValue.length > 0) {
|
||||
updateBootSourceSelection(newValue[0].type);
|
||||
$scope.model.newInstanceSpec.source_type = newValue[0];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue