Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const SERVICE_TYPE = 'vps';
export const ADD_DOMAIN_LINK_SUFFIX_URL =
'webcloud/#/webCloud/domain/select?selection=~()';

export const NEW_RANGE_VERSION = ['2019v1', '2025v1'];
export const NEW_RANGE_VERSION = ['2019v1', '2025v1', '2027v1'];

export const VPS_STATES = {
ERROR: ['maintenance', 'stopped', 'stopping'],
Expand Down
17 changes: 17 additions & 0 deletions packages/manager/modules/vps/src/upscale/upscale.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ export const RANGES_2025 = [
MODEL_2025_6,
];

const MODEL_2027_1 = '2027-model1';
const MODEL_2027_2 = '2027-model2';
const MODEL_2027_3 = '2027-model3';
const MODEL_2027_4 = '2027-model4';

export const RANGES_2027 = [
MODEL_2027_1,
MODEL_2027_2,
MODEL_2027_3,
MODEL_2027_4,
];

export const RANGES = {
BESTVALUE: 'bv',
COMFORT: 'Comfort',
Expand All @@ -48,6 +60,10 @@ export const RANGES = {
MODEL_2025_4,
MODEL_2025_5,
MODEL_2025_6,
MODEL_2027_1,
MODEL_2027_2,
MODEL_2027_3,
MODEL_2027_4,
};

export const UPSCALE_TRACKING_PREFIX = 'vps::detail::upscale-step-';
Expand All @@ -57,6 +73,7 @@ export default {
RANGES,
LE_RANGES,
RANGES_2025,
RANGES_2027,
PRICING_PERIODS,
UPSCALE_TRACKING_PREFIX,
};
12 changes: 7 additions & 5 deletions packages/manager/modules/vps/src/upscale/upscale.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
PRICING_MODES,
RANGES,
RANGES_2025,
RANGES_2027,
LE_RANGES,
UPSCALE_TRACKING_PREFIX,
} from './upscale.constants';
Expand Down Expand Up @@ -197,7 +198,7 @@ export default class UpscaleController {
let vpsUpgradeRange = '';
if (LE_RANGES.includes(rangeName)) {
vpsUpgradeRange = `vps-${rangeName}-${memory}-${storage}`;
} else if (RANGES_2025.includes(rangeName)) {
} else if ([...RANGES_2025, ...RANGES_2027].includes(rangeName)) {
vpsUpgradeRange = `vps-${rangeName}`;
} else {
vpsUpgradeRange = `vps-${rangeName}-${cores}-${memory}-${storage}`;
Expand Down Expand Up @@ -255,7 +256,7 @@ export default class UpscaleController {
if (LE_RANGES.includes(rangeName)) {
return `vps-${rangeName}-${memory}-${storage}`;
}
if (RANGES_2025.includes(rangeName)) {
if ([...RANGES_2025, ...RANGES_2027].includes(rangeName)) {
return `vps-${rangeName}`;
}
return `vps-${rangeName}-${cores}-${memory}-${storage}`;
Expand Down Expand Up @@ -301,9 +302,10 @@ export default class UpscaleController {
},
),
formattedName: rangeName,
displayName: rangeName.includes('2025-model')
? rangeName.replace(/2025-model/, 'VPS-')
: rangeName,
displayName:
rangeName.includes('2025-model') || rangeName.includes('2027-model')
? rangeName.replace(/2025-model|2027-model/, 'VPS-')
: rangeName,
}));
}

Expand Down
Loading