Skip to content

Commit

Permalink
fix(dedicated): sort disk list on installation
Browse files Browse the repository at this point in the history
ref: MANAGER-11948

Signed-off-by: Bruno MARQUES <[email protected]>
  • Loading branch information
BrunoMarquesOVH committed Aug 10, 2023
1 parent 218c88c commit 2a8eff7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export default class DedicatedServerInstallImageOptionsCtrl {
$onInit() {
[this.model.diskGroup] = this.server.hardware.specifications.diskGroups;
[this.model.diskGroup] = !this.server.hardware.specifications.diskGroups
? []
: this.server.hardware.specifications.diskGroups.sort((a, b) =>
a.description.localeCompare(b.description),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ angular
function getHardwareSpecification() {
return Server.getHardwareSpecifications($stateParams.productId).then(
(spec) => {
$scope.informations.diskGroups = spec.diskGroups;
$scope.informations.diskGroups = !spec.diskGroups
? []
: spec.diskGroups.sort((a, b) =>
a.description.localeCompare(b.description),
);
resetDiskGroup();
},
);
Expand Down

0 comments on commit 2a8eff7

Please sign in to comment.