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 @@ -15,6 +15,18 @@ export const CATEGORIES_MAP = {
'hosting-performance-4': 'PERFORMANCE',
};

export const OFFERS_MAP = {
'hosting-free-100M': 'Free hosting',
'hosting-starter': 'STARTER',
'hosting-perso': 'PERSO',
'hosting-startup': 'STARTUP',
'hosting-pro': 'PRO',
'hosting-performance-1': 'PERFORMANCE',
'hosting-agence': 'AGENCY',
'hosting-agence-plus': 'AGENCY PLUS',
'hosting-agence-max': 'AGENCY MAX',
};

export const CLOUDWEB_OFFER = ['cloudweb1', 'cloudweb2', 'cloudweb3'];

export const CLOUDWEB_VERSION_MAP = {
Expand Down Expand Up @@ -47,6 +59,18 @@ export const NEW_OFFERS_PLAN_CODES = {
PERFORMANCE_4: 'hosting-performance-4',
};

export const OFFERS_PLAN_CODES = {
FREE_100M: 'hosting-free-100M',
STARTER: 'hosting-starter',
PERSO: 'hosting-perso',
STARTUP: 'hosting-startup',
PRO: 'hosting-pro',
PERFORMANCE_1: 'hosting-performance-1',
AGENCY: 'hosting-agence',
AGENCY_PLUS: 'hosting-agence-plus',
AGENCY_MAX: 'hosting-agence-max',
};

export const WEB_CLOUD_DB_VALUES = '512MB RAM - 8GB';

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
NEW_OFFERS_END_DATE,
BADGES,
NEW_OFFERS_PLAN_CODES,
OFFERS_PLAN_CODES,
CATEGORIES_MAP,
VERSION_MAP,
CLOUDWEB_OFFER,
Expand All @@ -15,10 +16,174 @@ import {

export default class WebComponentsHostingDomainOffersController {
/* @ngInject */
constructor($translate, $filter) {
constructor($translate, $filter, ovhFeatureFlipping) {
this.$translate = $translate;
this.ovhFeatureFlipping = ovhFeatureFlipping;
const bytes = $filter('bytes');

this.OFFERS = {
FREE_100M: {
TECHNICALS: [
{ prefix: 'sites', values: [1] },
{ prefix: 'disk', values: ['100 Mo SSD'] },
{ prefix: 'emailStorage', values: [1, '5 Go'] },
],
SELECTORS: {
FREE_100M: {
planCode: OFFERS_PLAN_CODES.FREE_100M,
},
},
},
STARTER: {
TECHNICALS: [
{ prefix: 'sites', values: [1] },
{ prefix: 'nddFree', values: [1] },
{ prefix: 'emailStorage', values: [2, '5 Go'] },
{ prefix: 'disk', values: ['1 Go SSD'] },
{ prefix: 'cms', values: [] },
],
SELECTORS: {
STARTER: {
planCode: OFFERS_PLAN_CODES.STARTER,
},
},
},
PERSO: {
TECHNICALS: [
{ prefix: 'sites', values: [5] },
{ prefix: 'nddFree', values: [1] },
{ prefix: 'emailStorage', values: [10, '5 Go'] },
{ prefix: 'disk', values: ['100 Go SSD'] },
{ prefix: 'cms', values: [] },
],
SELECTORS: {
PERSO: {
planCode: OFFERS_PLAN_CODES.PERSO,
},
},
},
STARTUP: {
TECHNICALS: [
{ prefix: 'vcores', values: ['< 1'] },
{ prefix: 'ram', values: ['< 1 Go'] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'disk', values: ['100 Go SSD'] },
{ prefix: 'sites', values: [5] },
{ prefix: 'emailStorage', values: [10, '5 Go'] },
{ prefix: 'dbs', values: [5, '1 Go'] },
{ prefix: 'nddFree', values: [1] },
],
SELECTORS: {
STARTUP: {
planCode: OFFERS_PLAN_CODES.STARTUP,
},
},
},
PRO: {
TECHNICALS: [
{ prefix: 'vcores', values: [1] },
{ prefix: 'ram', values: ['2 Go'] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'disk', values: ['250 Go SSD'] },
{ prefix: 'sites', values: [100] },
{ prefix: 'emailStorage', values: [100, '5 Go'] },
{ prefix: 'dbs', values: [10, '2 Go'] },
{ prefix: 'nddFree', values: [1] },
{ prefix: 'cdn', values: [] },
],
SELECTORS: {
PRO: {
planCode: OFFERS_PLAN_CODES.PRO,
},
},
},
PERFORMANCE: {
TECHNICALS: [
{ prefix: 'vcores', values: [2] },
{ prefix: 'ram', values: ['4 Go'] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'disk', values: ['500 Go'] },
{ prefix: 'sites', values: [150] },
{ prefix: 'emailStorage', values: [1000, '5 Go'] },
{ prefix: 'dbs', values: [20, '2 Go'] },
{ prefix: 'webcloudDb', values: [] },
{ prefix: 'nddFree', values: [1] },
{ prefix: 'cdn', values: [] },
],
SELECTORS: {
PERFORMANCE_1: {
planCode: OFFERS_PLAN_CODES.PERFORMANCE_1,
},
},
},
AGENCE: {
TECHNICALS: [
{ prefix: 'sites', values: [200] },
{ prefix: 'disk', values: ['500 Go SSD'] },
{ prefix: 'ram', values: ['8 Go'] },
{ prefix: 'vcores', values: [6] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'userManagement', values: [] },
{ prefix: 'emailStorage', values: [1000, '5 Go'] },
{ prefix: 'dbs', values: [30, '2 Go'] },
{ prefix: 'webcloudDb', values: [] },
{ prefix: 'cdn', values: [] },
{ prefix: 'git', values: [] },
],
SELECTORS: {
AGENCE: {
planCode: OFFERS_PLAN_CODES.AGENCY,
},
},
},
AGENCE_PLUS: {
TECHNICALS: [
{ prefix: 'sites', values: [500] },
{ prefix: 'disk', values: ['700 Go SSD'] },
{ prefix: 'ram', values: ['12 Go'] },
{ prefix: 'vcores', values: [10] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'userManagement', values: [] },
{ prefix: 'emailStorage', values: [1000, '5 Go'] },
{ prefix: 'dbs', values: [40, '2 Go'] },
{ prefix: 'webcloudDb', values: [] },
{ prefix: 'cdn', values: [] },
{ prefix: 'git', values: [] },
],
SELECTORS: {
AGENCE_PLUS: {
planCode: OFFERS_PLAN_CODES.AGENCY_PLUS,
},
},
},
AGENCE_MAX: {
TECHNICALS: [
{ prefix: 'sites', values: [3000] },
{ prefix: 'disk', values: ['1 To SSD'] },
{ prefix: 'ram', values: ['16 Go'] },
{ prefix: 'vcores', values: [14] },
{ prefix: 'backupIncluded', values: [] },
{ prefix: 'uptime', values: ['99,9%'] },
{ prefix: 'userManagement', values: [] },
{ prefix: 'emailStorage', values: [1000, '5 Go'] },
{ prefix: 'dbs', values: [50, '2 Go'] },
{ prefix: 'webcloudDb', values: [] },
{ prefix: 'cdn', values: [] },
{ prefix: 'git', values: [] },
],
SELECTORS: {
AGENCE_MAX: {
planCode: OFFERS_PLAN_CODES.AGENCY_MAX,
},
},
},
};

this.NEW_OFFERS = {
PERSO: {
TECHNICALS: [
Expand Down Expand Up @@ -89,7 +254,19 @@ export default class WebComponentsHostingDomainOffersController {
}

$onInit() {
this.groupedOffers = this.buildOffersGroup();
return this.ovhFeatureFlipping
.checkFeatureAvailability(['web-hosting:change-offer'])
.then((featureAvailability) => {
this.useNewOffers = featureAvailability.isFeatureAvailable(
'web-hosting:change-offer',
);
})
.catch(() => {
this.useNewOffers = false;
})
.finally(() => {
this.groupedOffers = this.buildOffersGroup();
});
}

static buildBadgeModel(type, className) {
Expand Down Expand Up @@ -193,7 +370,8 @@ export default class WebComponentsHostingDomainOffersController {
}

getNewOffer(offerCategory) {
return this.NEW_OFFERS[offerCategory.toUpperCase()];
const offers = this.useNewOffers ? this.OFFERS : this.NEW_OFFERS;
return offers[offerCategory.toUpperCase()];
}

getOfferTechnicalsInfo(offerCategory) {
Expand All @@ -202,10 +380,13 @@ export default class WebComponentsHostingDomainOffersController {
let serviceDatas = values[1];
if (prefix === 'services' && !serviceDatas)
serviceDatas = WEB_CLOUD_DB_VALUES;
return this.$translate.instant(
`web_components_hosting_domain_offers_offer_${offerCategory}_technicals_${prefix}`,
{ value1: values[0], value2: serviceDatas },
);
const key = this.useNewOffers
? `web_components_hosting_domain_offers_${prefix}`
: `web_components_hosting_domain_offers_offer_${offerCategory}_technicals_${prefix}`;
return this.$translate.instant(key, {
value1: values[0],
value2: serviceDatas,
});
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,19 @@
"web_components_hosting_domain_offers_offer_badge_current": "Offre actuelle",
"web_components_hosting_domain_offers_offer_select_version_placeholder": "Choisir une version",
"web_components_hosting_domain_offers_offer_select_version_performance": "{{coreNumber}} vCores, {{ramSize}} RAM",
"web_components_hosting_domain_offers_offer_price": "{{priceValue}} HT/mois"
"web_components_hosting_domain_offers_offer_price": "{{priceValue}} HT/mois",
"web_components_hosting_domain_offers_sites": "{{value1}} Sites",
"web_components_hosting_domain_offers_disk": "{{value1}}",
"web_components_hosting_domain_offers_emailStorage": "{{value1}} mails {{value2}}",
"web_components_hosting_domain_offers_cms": "CMS 1clic",
"web_components_hosting_domain_offers_nddFree": "{{value1}} ndd free",
"web_components_hosting_domain_offers_vcores": "{{value1}} vCore",
"web_components_hosting_domain_offers_ram": "{{value1}} de RAM",
"web_components_hosting_domain_offers_backupIncluded": "Backup inclus",
"web_components_hosting_domain_offers_uptime": "Uptime {{value1}}",
"web_components_hosting_domain_offers_dbs": "{{value1}} db {{value2}}",
"web_components_hosting_domain_offers_webcloudDb": "WebCloud DB",
"web_components_hosting_domain_offers_cdn": "CDN",
"web_components_hosting_domain_offers_git": "GIT",
"web_components_hosting_domain_offers_userManagement": "Gestion user"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default class {
user,
userStatisticsLink,
userLogsLink,
isChangeOfferFeatureAvailable,
isWebsiteFeatureAvailable,
isOslToLdpFeatureAvailable,
HOSTING_STATUS,
Expand Down Expand Up @@ -140,6 +141,7 @@ export default class {
this.user = user;
this.userStatisticsLink = userStatisticsLink;
this.userLogsLink = userLogsLink;
this.isChangeOfferFeatureAvailable = isChangeOfferFeatureAvailable;
this.isOslToLdpFeatureAvailable = isOslToLdpFeatureAvailable;
this.DOMAIN_ORDER_URL = DOMAIN_ORDER_URL;
this.HOSTING_ORDER_URL = HOSTING_ORDER_URL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@ <h1 class="d-inline-block mb-0 word-break">
data-ovh-alert-hide-remove-button
class="mt-4"
></div>
<oui-message
data-type="info"
data-ng-if="$ctrl.isChangeOfferFeatureAvailable"
class="mb-3"
>
<span data-translate="hosting_change_offer_banner"></span>
<a
data-ng-href="{{ $ctrl.user.ovhSubsidiary === 'FR' ? 'https://blog.ovhcloud.com/fr-webhosting-2026' : 'https://blog.ovhcloud.com/en-webhosting-2026' }}"
target="_blank"
rel="noopener noreferrer"
data-translate="hosting_change_offer_banner_link"
></a>
</oui-message>

<oui-header-tabs>
<oui-header-tabs-item
href="{{ $ctrl.generalInformationLink }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ export default /* @ngInject */ ($stateProvider) => {
configurationSelected: true,
});
},
isChangeOfferFeatureAvailable: /* @ngInject */ (ovhFeatureFlipping) =>
ovhFeatureFlipping
.checkFeatureAvailability('web-hosting:change-offer')
.then((featureAvailability) =>
featureAvailability.isFeatureAvailable('web-hosting:change-offer'),
)
.catch(() => false),
isLocalSeoAvailable: /* @ngInject */ (availableOptions) =>
availableOptions.find(({ family }) => family === LOCAL_SEO_FAMILY),

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"hosting_change_offer_banner": "Our web hosting plans are evolving from June 1, 2026. Discover the improvements and new features included.",
"hosting_change_offer_banner_link": "Learn more",
"hosting_change_offer_for_service": "Der Dienst ist für dieses Angebot nicht verfügbar.",
"hosting_change_offer_for_service_offer": "Dieser Dienst ist für das {{offer}} Angebot nicht verfügbar.",
"hosting_common_password_conditions": "Bitte beachten Sie, dass das Passwort nach folgenden Regeln vergeben werden muss: <br/>- mindestens {{t0}} Zeichen<br/>- höchstens {{t1}} Zeichen<br/>- mindestens ein Großbuchstabe<br/>- mindestens ein Kleinbuchstabe<br/>- mindestens eine Zahl<br/>- ausschließlich Zahlen und Buchstaben",
Expand Down Expand Up @@ -1127,6 +1129,16 @@
"hosting_order_upgrade_start_time_summary_today": "Update geplant für heute um {{time}}.",
"hosting_order_upgrade_start_time_summary_tomorrow": "Update geplant für morgen um {{time}}.",
"hosting_order_upgrade_no_contract": "Keine neuen Verträge zur Validierung vorhanden",
"hosting_order_upgrade_summary_empty": "Your cart is empty",
"hosting_order_upgrade_summary_product": "Web Hosting",
"hosting_order_upgrade_summary_product_lower": "web hosting",
"hosting_order_upgrade_summary_duration": "Duration",
"hosting_order_upgrade_summary_duration_value": "12 months",
"hosting_order_upgrade_summary_options": "Options",
"hosting_order_upgrade_summary_included": "Included",
"hosting_order_upgrade_summary_total": "Total",
"hosting_order_upgrade_summary_vat_period": "ex. VAT/12 months",
"hosting_order_upgrade_summary_cta": "Continue order",
"hosting_migrate_my_ovh_org_success": "Die Migration Ihrer ovh.org-Domain wurde registriert. Sobald sie abgeschlossen ist, erhalten Sie eine E-Mail.",
"hosting_migrate_my_ovh_org_error": "Bei der Migration Ihrer OVH Domain ist ein Fehler aufgetreten.",
"hosting_tab_DATABASES_configuration_order_title_button_public": "Eine Datenbank bestellen",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"hosting_change_offer_banner": "Our web hosting plans are evolving from June 1, 2026. Discover the improvements and new features included.",
"hosting_change_offer_banner_link": "Learn more",
"hosting_change_offer_for_service": "This service is not available for this solution.",
"hosting_change_offer_for_service_offer": "This service is not accessible for the {{offer}} solution.",
"hosting_common_password_conditions": "Please note that the password must meet the following criteria: <br/>- Minimum {{t0}} characters<br/>- Maximum {{t1}} characters<br/>- At least one capital letter<br/>- At least one lower-case letter<br/>- At least one number<br/>- Must only contain letters and numbers",
Expand Down Expand Up @@ -1127,6 +1129,16 @@
"hosting_order_upgrade_start_time_summary_today": "Update scheduled at {{time}} today.",
"hosting_order_upgrade_start_time_summary_tomorrow": "Update scheduled at {{time}} tomorrow.",
"hosting_order_upgrade_no_contract": "No new contracts to validate",
"hosting_order_upgrade_summary_empty": "Your cart is empty",
"hosting_order_upgrade_summary_product": "Web Hosting",
"hosting_order_upgrade_summary_product_lower": "web hosting",
"hosting_order_upgrade_summary_duration": "Duration",
"hosting_order_upgrade_summary_duration_value": "12 months",
"hosting_order_upgrade_summary_options": "Options",
"hosting_order_upgrade_summary_included": "Included",
"hosting_order_upgrade_summary_total": "Total",
"hosting_order_upgrade_summary_vat_period": "ex. VAT/12 months",
"hosting_order_upgrade_summary_cta": "Continue order",
"hosting_migrate_my_ovh_org_success": "Your ovh.org domain migration has been processed. You will receive an email when it is complete.",
"hosting_migrate_my_ovh_org_error": "An error has occurred migrating your ovh.org domain. ",
"hosting_tab_DATABASES_configuration_order_title_button_public": "Order a database",
Expand Down
Loading
Loading