diff --git a/packages/manager/apps/web/client/app/hosting/database/private-sql-activation/private-sql-activation.service.js b/packages/manager/apps/web/client/app/hosting/database/private-sql-activation/private-sql-activation.service.js index 9fc288300b51..d3923e9f7a7b 100644 --- a/packages/manager/apps/web/client/app/hosting/database/private-sql-activation/private-sql-activation.service.js +++ b/packages/manager/apps/web/client/app/hosting/database/private-sql-activation/private-sql-activation.service.js @@ -53,28 +53,30 @@ export default class PrivateSql { } static getPrivateSqlCategory(catalog) { - return catalog.addons.reduce((acc, current) => { - const { planCode } = current; - if (planCode.startsWith(PRIVATE_SQL_PLAN_CODE_PREFIX)) { - const dbOffer = { - ...current, - productSize: current.product.split('-')[2], - tracking: DB_OFFERS.PRIVATE.TRACKING, - }; - const dbms = dbOffer.configurations - .find(({ name }) => name === 'engine') - .values.map((db) => { - const [dbName, dbVersion] = db.split('_'); - return { db, dbName, dbVersion }; - }); - const groupedDbms = groupBy(dbms, 'dbName'); - dbOffer.engines = Object.keys(groupedDbms).map((dbGroup) => ({ - dbGroup, - versions: groupedDbms[dbGroup], - })); - acc.push(dbOffer); - } - return acc; - }, []); + return catalog.addons + .reduce((acc, current) => { + const { planCode } = current; + if (planCode.startsWith(PRIVATE_SQL_PLAN_CODE_PREFIX)) { + const dbOffer = { + ...current, + productSize: current.product.split('-')[2], + tracking: DB_OFFERS.PRIVATE.TRACKING, + }; + const dbms = dbOffer.configurations + .find(({ name }) => name === 'engine') + .values.map((db) => { + const [dbName, dbVersion] = db.split('_'); + return { db, dbName, dbVersion }; + }); + const groupedDbms = groupBy(dbms, 'dbName'); + dbOffer.engines = Object.keys(groupedDbms).map((dbGroup) => ({ + dbGroup, + versions: groupedDbms[dbGroup], + })); + acc.push(dbOffer); + } + return acc; + }, []) + .sort((a, b) => a.productSize - b.productSize); } }