Merge "Make the "Select Boot Source" order deterministic"

This commit is contained in:
Jenkins 2017-05-30 17:14:27 +00:00 committed by Gerrit Code Review
commit 7a5b4a71a3
2 changed files with 4 additions and 2 deletions

View File

@ -671,6 +671,9 @@
type: type,
label: label
});
model.allowedBootSources.sort(function(a, b) {
return a.type > b.type;
});
}
}

View File

@ -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];
}