diff --git a/packages/manager/apps/dedicated/client/app/dedicated/server/details/server.service.js b/packages/manager/apps/dedicated/client/app/dedicated/server/details/server.service.js index 78c60a278a54..86000a2af417 100644 --- a/packages/manager/apps/dedicated/client/app/dedicated/server/details/server.service.js +++ b/packages/manager/apps/dedicated/client/app/dedicated/server/details/server.service.js @@ -8,7 +8,7 @@ import map from 'lodash/map'; import parseInt from 'lodash/parseInt'; import set from 'lodash/set'; import snakeCase from 'lodash/snakeCase'; -import sortBy from 'lodash/sortBy'; +import orderBy from 'lodash/orderBy'; import uniq from 'lodash/uniq'; export default class Server { @@ -2152,16 +2152,14 @@ export default class Server { ); } - getHighestPriorityPartitionScheme(productId, templateName) { + getPartitionSchemesByPriority(productId, templateName) { return this.getPartitionSchemes(productId, templateName).then((schemes) => { const getSchemes = map(schemes, (scheme) => this.getPartitionSchemePriority(productId, templateName, scheme), ); return this.$q.all(getSchemes).then((schemesDetails) => { - const list = sortBy(schemesDetails, 'priority').reverse(); - - return list[0]; + return map(orderBy(schemesDetails, 'priority', 'desc'), 'name'); }); }); } diff --git a/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.controller.js b/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.controller.js index 577fee9483ef..d367c8b768f0 100644 --- a/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.controller.js +++ b/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.controller.js @@ -77,6 +77,8 @@ angular $scope.load = function load() { $scope.loader.loading = true; $scope.installation.selectGabarit = null; + $scope.installation.partitionSchemesList = null; + $scope.installation.selectPartitionScheme = null; $scope.installation.selectFamily = null; $scope.installation.selectLanguage = null; $scope.installation.selectSoftRaidOnlyMirroring = null; @@ -165,20 +167,24 @@ angular validForm: true, }; - Server.getHighestPriorityPartitionScheme( + Server.getPartitionSchemesByPriority( $stateParams.productId, $scope.installation.selectGabarit.id, ) + .then((response) => { + $scope.installation.partitionSchemesList = response; + [$scope.installation.selectPartitionScheme] = response; + }) .then((response) => Server.getPartitionSchemeHardwareRaid( $stateParams.productId, $scope.installation.selectGabarit.id, - response.name, + response[0], ), ) .then((response) => { - if (response) { - tempHardwareRaid = response; + if (response[0]) { + [tempHardwareRaid] = response; return Server.getHardwareRaidProfile($stateParams.productId); } return null; diff --git a/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.html b/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.html index 68eb304434d5..4892c01ef49a 100644 --- a/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.html +++ b/packages/manager/apps/dedicated/client/app/dedicated/server/installation/gabarit/dedicated-server-installation-gabarit.html @@ -476,7 +476,7 @@

-
@@ -505,7 +505,28 @@

data-ng-model="installation.nbDiskUse" > -

+

+ + +

+ + +