Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release - hotfix new web offer multi site #9723

Merged
merged 1 commit into from
Jul 26, 2023
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 @@ -42,6 +42,16 @@ angular
'PRO',
'START',
])
.constant('HOSTING_NEW_OFFER_UPGRADES', [
'HOSTING_STARTER',
'HOSTING_STARTER_OVH',
'HOSTING_PERSO',
'HOSTING_PRO',
'HOSTING_PERFORMANCE_1',
'HOSTING_PERFORMANCE_2',
'HOSTING_PERFORMANCE_3',
'HOSTING_PERFORMANCE_4',
])
.constant('HOSTING_FLUSH_STATE', {
OK: 'ok',
CHECK: 'check',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import union from 'lodash/union';
WucConverterService,
HOSTING,
HOSTING_UPGRADES,
HOSTING_NEW_OFFER_UPGRADES,
HOSTING_OPERATION_STATUS,
DETACHABLE_PRODUCT_NAMES,
OvhHttp,
Expand All @@ -42,6 +43,7 @@ import union from 'lodash/union';
this.WucConverterService = WucConverterService;
this.HOSTING = HOSTING;
this.HOSTING_UPGRADES = HOSTING_UPGRADES;
this.HOSTING_NEW_OFFER_UPGRADES = HOSTING_NEW_OFFER_UPGRADES;
this.HOSTING_OPERATION_STATUS = HOSTING_OPERATION_STATUS;
this.DETACHABLE_PRODUCT_NAMES = DETACHABLE_PRODUCT_NAMES;
this.OvhHttp = OvhHttp;
Expand Down Expand Up @@ -491,9 +493,14 @@ import union from 'lodash/union';
* @param {string} offer
*/
getOfferCapabilities(offer) {
const formattedOffer = this.HOSTING_UPGRADES.includes(offer)
? offer
: replace(toLower(offer), /_/g, '');
let formattedOffer = '';
if (this.HOSTING_UPGRADES.includes(offer)) {
formattedOffer = offer;
} else if (this.HOSTING_NEW_OFFER_UPGRADES.includes(offer)) {
formattedOffer = replace(toLower(offer), /_/g, '-');
} else {
formattedOffer = replace(toLower(offer), /_/g, '');
}

return this.OvhHttp.get('/hosting/web/offerCapabilities', {
rootPath: 'apiv6',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
data-wizard-step
data-wizard-step-on-load="loadStep2"
data-wizard-step-valid="model.step2Valid && !domainsAlreadyExists() && !domainIsNotValid() && isPathValid() && (selected.mode === model.mode.EXTERNAL || ((selected.ownLog === 'ACTIVE' && selected.ownLogDomain) || (!selected.ownLog || selected.ownLog === 'NONE')))"
data-ng-if="!model.needChangeOffer"
>
<div class="text-center" data-ng-if="model.domains == null">
<oui-spinner></oui-spinner>
Expand All @@ -160,7 +159,6 @@
data-wizard-step
data-wizard-step-on-load="loadStep3"
data-wizard-step-valid="!loading"
data-ng-if="!model.needChangeOffer"
>
<p
data-translate="hosting_tab_DOMAINS_configuration_add_step3_summary"
Expand Down