diff --git a/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx b/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx index a4aa4facf3f5..a807d59e19c7 100644 --- a/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx +++ b/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx @@ -49,7 +49,7 @@ export default function ServerSidebarIndex() { } else { setIsAccountMenu(false); } - }, [universe, location]); + }, [universe, location, application]); if (universe === 'hub') { return <> diff --git a/packages/manager/apps/container/src/container/legacy/server-sidebar/order/shop-config/web.ts b/packages/manager/apps/container/src/container/legacy/server-sidebar/order/shop-config/web.ts index b02a8b766ad5..1c42b6e2a9ac 100644 --- a/packages/manager/apps/container/src/container/legacy/server-sidebar/order/shop-config/web.ts +++ b/packages/manager/apps/container/src/container/legacy/server-sidebar/order/shop-config/web.ts @@ -93,14 +93,6 @@ const webShopConfig = ( tracking: 'web::orders::licences-office-reseller::order', } : null, - features.sharepoint - ? { - label: 'order_item_sharepoint', - icon: 'ms-Icon ms-Icon--SharepointLogo', - url: navigation.getURL('web', '#/sharepoint/order'), - tracking: 'web::orders::microsoft-sharepoint::order', - } - : null, features['cloud-database'] ? { label: 'order_item_cloudDatabase', diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenter.constants.js b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenter.constants.js new file mode 100644 index 000000000000..d5011f359e54 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenter.constants.js @@ -0,0 +1,56 @@ +export const REGEX_LEGACY_DATACENTER = /^PREMIER|SDDC/; + +export const REGEX_EXCLUDE_LEGACY_DATACENTER = /^ESSENTIALS/; + +export const MIGRATION_GUIDE = { + DE: + 'https://help.ovhcloud.com/csm/de-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058427', + GB: + 'https://help.ovhcloud.com/csm/en-gb-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058419', + IE: + 'https://help.ovhcloud.com/csm/en-ie-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058429', + NL: + 'https://help.ovhcloud.com/csm/en-ie-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058429', + ES: + 'https://help.ovhcloud.com/csm/es-es-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058421', + FR: + 'https://help.ovhcloud.com/csm/fr-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058423', + MA: + 'https://help.ovhcloud.com/csm/fr-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058423', + SN: + 'https://help.ovhcloud.com/csm/fr-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058423', + TN: + 'https://help.ovhcloud.com/csm/fr-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058423', + IT: + 'https://help.ovhcloud.com/csm/it-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058422', + PL: + 'https://help.ovhcloud.com/csm/pl-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058430', + PT: + 'https://help.ovhcloud.com/csm/pt-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058424', + CA: + 'https://help.ovhcloud.com/csm/en-ca-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058426', + QC: + 'https://help.ovhcloud.com/csm/fr-ca-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058433', + WS: + 'https://help.ovhcloud.com/csm/es-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058431', + AU: + 'https://help.ovhcloud.com/csm/en-au-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058434', + IN: + 'https://help.ovhcloud.com/csm/asia-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058432', + ASIA: + 'https://help.ovhcloud.com/csm/asia-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058432', + SG: + 'https://help.ovhcloud.com/csm/en-sg-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058425', + WE: + 'https://help.ovhcloud.com/csm/en-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058428', + US: + 'https://support.us.ovhcloud.com/hc/en-us/articles/17607258328979-VMware-NSX-V-End-of-Life', + DEFAULT: + 'https://help.ovhcloud.com/csm/en-vmware-nsx-v-eos?id=kb_article_view&sysparm_article=KB0058428', +}; + +export default { + REGEX_LEGACY_DATACENTER, + REGEX_EXCLUDE_LEGACY_DATACENTER, + MIGRATION_GUIDE, +}; diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.component.js b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.component.js index e5564170bb87..ae15b7b101d3 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.component.js +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.component.js @@ -11,6 +11,7 @@ export default { orderHost: '<', setMessage: '<', usesLegacyOrder: '<', + migrationBannerAvailable: '<', }, controller, template, diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.controller.js b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.controller.js index fb5f6e44c4a2..5caa45b074e8 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.controller.js +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.controller.js @@ -1,11 +1,27 @@ -import get from 'lodash/get'; import includes from 'lodash/includes'; +import { + REGEX_LEGACY_DATACENTER, + REGEX_EXCLUDE_LEGACY_DATACENTER, + MIGRATION_GUIDE, +} from './datacenter.constants'; export default class { /* @ngInject */ - constructor($q, DedicatedCloud) { + constructor($q, DedicatedCloud, coreConfig) { this.$q = $q; this.DedicatedCloud = DedicatedCloud; + this.hasNsxDatacenter = false; + this.migrationGuideUrl = + MIGRATION_GUIDE[coreConfig.getUser().ovhSubsidiary] || + MIGRATION_GUIDE.DEFAULT; + } + + displayMigrationBanner() { + return ( + (this.migrationBannerAvailable.firstBanner || + this.migrationBannerAvailable.secondBanner) && + this.hasLegacyDatacenter + ); } getRight(order) { @@ -25,12 +41,26 @@ export default class { pageSize, offset - 1, ) - .then((result) => ({ - data: get(result, 'list.results'), - meta: { - totalCount: result.count, - }, - })) + .then((result) => { + const data = result.list?.results; + + this.hasLegacyDatacenter = + !!data.find((datacenter) => { + return REGEX_LEGACY_DATACENTER.test(datacenter.commercialName); + }) && + !data.find((datacenter) => { + return REGEX_EXCLUDE_LEGACY_DATACENTER.test( + datacenter.commercialName, + ); + }); + + return { + data, + meta: { + totalCount: result.count, + }, + }; + }) .catch((err) => { this.setMessage( `${this.$translate.instant( diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.html b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.html index 5085924e4209..d10bb950a101 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.html +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/datacenters.html @@ -7,10 +7,23 @@

data-ng-click="$ctrl.onAddDatacenterClick()" data-translate="dedicatedCloud_datacenters_add" > - - + +

+

finden Sie in unseren Leitfäden.", + "dedicatedCloud_datacenters_migration_banner_second": "Die VMware NSX-V-Komponente WIRD am 15. Januar 2024 DEAKTIVIERT. Weitere Informationen finden Sie in unseren Migrationsleitfäden." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_en_GB.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_en_GB.json index 2f36c758806b..0b60edef74a0 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_en_GB.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_en_GB.json @@ -90,5 +90,7 @@ "dedicatedCloud_datacenters_commercial_name_VSPHERE-WITHOUT-NSX": "vSphere", "dedicatedCloud_datacenters_commercial_name_VSPHERE-VROPS-WITHOUT-NSX": "vSphere with vROps", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX with vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX with vROps", + "dedicatedCloud_datacenters_migration_banner_first": "End of life for the VMware NSX-V component as of 15 January 2024: please refer to the email sent in July/August 2023 for migration options. For technical information, please refer to our guides.", + "dedicatedCloud_datacenters_migration_banner_second": "IMMINENT DEACTIVATION of the VMware NSX-V component effective 15 January 15 2024. Please refer to our migration guides for more information." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_es_ES.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_es_ES.json index b1b9f1059e83..7ded977e8879 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_es_ES.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_es_ES.json @@ -90,5 +90,7 @@ "dedicatedCloud_datacenters_commercial_name_VSPHERE-WITHOUT-NSX": "vSphere", "dedicatedCloud_datacenters_commercial_name_VSPHERE-VROPS-WITHOUT-NSX": "vSphere con vROps", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX con vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX con vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Final de vida útil del componente VMware NSX-V el día 15 de enero de 2024: consulte el email que le enviamos en julio/agosto de 2023 para conocer las modalidades de migración. Para más información, consulte nuestras guías.", + "dedicatedCloud_datacenters_migration_banner_second": "DESACTIVACIÓN INMINENTE del componente VMware NSX-V a partir del 15 de enero de 2024. Para más información, consulte nuestras guías de migración." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_CA.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_CA.json index a356b8fcb940..ba3af12e094c 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_CA.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_CA.json @@ -8,7 +8,6 @@ "dedicatedCloud_datacenters_order_host": "Commander un Host", "dedicatedCloud_datacenters_order_datastore": "Commander un Datastore", "dedicatedCloud_datacenters_loading_error": "Une erreur est survenue lors du chargement des informations des datacentres.", - "dedicatedCloud_datacenters_add_not_available": "L’ajout de nouveau datacentre n’est pas disponible pour le moment. Nous travaillons à rendre cette fonctionnalité disponible très prochainement.", "dedicatedCloud_datacenters_commercial_name_DC": "Dedicated Cloud", "dedicatedCloud_datacenters_commercial_name_DC-HDS": "Dedicated Cloud HDS", "dedicatedCloud_datacenters_commercial_name_DC-HIPAA": "Dedicated Cloud HIPAA", @@ -82,5 +81,7 @@ "dedicatedCloud_datacenters_commercial_name_NSX-T-UNKNOWN": "NSX", "dedicatedCloud_datacenters_commercial_name_NSX-T-DEFAULT": "NSX", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX avec vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX avec vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Fin de vie du composant VMware NSX-V au 15 janvier 2024 : veuillez-vous reporter à l'email envoyé en juillet/aout 2023 pour connaitre les modalités de migration. Pour des compléments techniques, veuillez consulter nos guides.", + "dedicatedCloud_datacenters_migration_banner_second": "DÉSACTIVATION IMMINENTE du composant VMware NSX-V à compter du 15 janvier 2024. Veuillez consulter nos guides de migration pour plus d'informations." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_FR.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_FR.json index a356b8fcb940..ba3af12e094c 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_FR.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_fr_FR.json @@ -8,7 +8,6 @@ "dedicatedCloud_datacenters_order_host": "Commander un Host", "dedicatedCloud_datacenters_order_datastore": "Commander un Datastore", "dedicatedCloud_datacenters_loading_error": "Une erreur est survenue lors du chargement des informations des datacentres.", - "dedicatedCloud_datacenters_add_not_available": "L’ajout de nouveau datacentre n’est pas disponible pour le moment. Nous travaillons à rendre cette fonctionnalité disponible très prochainement.", "dedicatedCloud_datacenters_commercial_name_DC": "Dedicated Cloud", "dedicatedCloud_datacenters_commercial_name_DC-HDS": "Dedicated Cloud HDS", "dedicatedCloud_datacenters_commercial_name_DC-HIPAA": "Dedicated Cloud HIPAA", @@ -82,5 +81,7 @@ "dedicatedCloud_datacenters_commercial_name_NSX-T-UNKNOWN": "NSX", "dedicatedCloud_datacenters_commercial_name_NSX-T-DEFAULT": "NSX", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX avec vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX avec vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Fin de vie du composant VMware NSX-V au 15 janvier 2024 : veuillez-vous reporter à l'email envoyé en juillet/aout 2023 pour connaitre les modalités de migration. Pour des compléments techniques, veuillez consulter nos guides.", + "dedicatedCloud_datacenters_migration_banner_second": "DÉSACTIVATION IMMINENTE du composant VMware NSX-V à compter du 15 janvier 2024. Veuillez consulter nos guides de migration pour plus d'informations." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_it_IT.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_it_IT.json index a8c4be1521b3..1effb1f14022 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_it_IT.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_it_IT.json @@ -90,5 +90,7 @@ "dedicatedCloud_datacenters_commercial_name_VSPHERE-WITHOUT-NSX": "vSphere", "dedicatedCloud_datacenters_commercial_name_VSPHERE-VROPS-WITHOUT-NSX": "vSphere con vROps", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX con vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX con vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Fine del ciclo di vita del componente VMware NSX-V il 15 gennaio 2024: per conoscere le modalità di migrazione, fai riferimento all'email ricevuta a luglio/agosto 2023. Per maggiori dettagli di carattere tecnico, consulta le nostre guide.", + "dedicatedCloud_datacenters_migration_banner_second": "DISATTIVAZIONE IMMINENTE del componente VMware NSX-V a partire dal 15 gennaio 2024. Per maggiori informazioni, consulta le nostre guide sulla migrazione." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pl_PL.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pl_PL.json index bb7b4819a52e..d6dd6a21cc0b 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pl_PL.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pl_PL.json @@ -90,5 +90,7 @@ "dedicatedCloud_datacenters_commercial_name_VSPHERE-WITHOUT-NSX": "vSphere", "dedicatedCloud_datacenters_commercial_name_VSPHERE-VROPS-WITHOUT-NSX": "vSphere z vROps", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX z vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX z vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Koniec okresu eksploatacji komponentu VMware NSX-V w dniu 15 stycznia 2024 r.: szczegółowe informacje na temat migracji znajdziesz w wiadomości e-mail wysłanej w lipcu/sierpniu 2023 r. Więcej informacji technicznych znajdziesz w naszych przewodnikach.", + "dedicatedCloud_datacenters_migration_banner_second": "Od 15 stycznia 2024 DEZAKTYWACJA komponentu VMware NSX-V. Więcej informacji znajdziesz w przewodnikach dotyczących migracji." } diff --git a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pt_PT.json b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pt_PT.json index d5360bd3c791..8df6de7ad511 100644 --- a/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pt_PT.json +++ b/packages/manager/apps/dedicated/client/app/components/dedicated-cloud/datacenters/translations/Messages_pt_PT.json @@ -90,5 +90,7 @@ "dedicatedCloud_datacenters_commercial_name_VSPHERE-WITHOUT-NSX": "vSphere", "dedicatedCloud_datacenters_commercial_name_VSPHERE-VROPS-WITHOUT-NSX": "vSphere com vROps", "dedicatedCloud_datacenters_commercial_name_NSX-T-WITHOUT-NSX": "NSX", - "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX com vROps" + "dedicatedCloud_datacenters_commercial_name_NSX-T-VROPS-WITHOUT-NSX": "NSX com vROps", + "dedicatedCloud_datacenters_migration_banner_first": "Fim de vida do componente VMware NSX-V a 15 de janeiro de 2024: consulte o e-mail enviado em julho/agosto de 2023 para conhecer as modalidades de migração. Para mais pormenores técnicos, consulte os nossos manuais.", + "dedicatedCloud_datacenters_migration_banner_second": "DESATIVAÇÃO IMINENTE do componente VMware NSX-V, a 15 de janeiro de 2024. Consulte os nossos manuais de migração para obter mais informações." } diff --git a/packages/manager/apps/dedicated/client/app/dedicatedCloud/datacenters/dedicatedCloud-datacenters.routes.js b/packages/manager/apps/dedicated/client/app/dedicatedCloud/datacenters/dedicatedCloud-datacenters.routes.js index 40fd3f68b4ae..43f22c2be094 100644 --- a/packages/manager/apps/dedicated/client/app/dedicatedCloud/datacenters/dedicatedCloud-datacenters.routes.js +++ b/packages/manager/apps/dedicated/client/app/dedicatedCloud/datacenters/dedicatedCloud-datacenters.routes.js @@ -8,6 +8,18 @@ export default /* @ngInject */ ($stateProvider) => { resolve: { addDatacenter: /* @ngInject */ ($state) => () => $state.go('app.dedicatedCloud.details.datacenter.add-datacenter'), + migrationBannerAvailable: /* @ngInject */ (ovhFeatureFlipping) => { + const firstBannerFeature = 'dedicated-cloud:migrationBannerFirst'; + const secondBannerFeature = 'dedicated-cloud:migrationBannerSecond'; + return ovhFeatureFlipping + .checkFeatureAvailability([firstBannerFeature, secondBannerFeature]) + .then((result) => { + return { + firstBanner: result.isFeatureAvailable(firstBannerFeature), + secondBanner: result.isFeatureAvailable(secondBannerFeature), + }; + }); + }, breadcrumb: /* @ngInject */ ($translate) => $translate.instant('dedicated_cloud_datacenters'), trackClick: /* @ngInject */ (atInternet, trackingPrefix) => (click) => { diff --git a/packages/manager/apps/web/client/app/domain/webhosting/order/steps/payment/domain-webhosting-order-steps-payment.html b/packages/manager/apps/web/client/app/domain/webhosting/order/steps/payment/domain-webhosting-order-steps-payment.html index e1305b958e75..4f428c6dc6c2 100644 --- a/packages/manager/apps/web/client/app/domain/webhosting/order/steps/payment/domain-webhosting-order-steps-payment.html +++ b/packages/manager/apps/web/client/app/domain/webhosting/order/steps/payment/domain-webhosting-order-steps-payment.html @@ -2,7 +2,7 @@ data-header="{{:: 'domain_webhosting_order_payment_step_title' | translate }}" data-on-focus="$ctrl.getCheckout()" data-loading="$ctrl.stepper.loadingCheckout" - data-valid="$ctrl.agreeContracts" + data-valid="!$ctrl.contracts.length || $ctrl.agreeContracts" data-prevent-next="true" data-on-cancel="$ctrl.goBackToDashboard()" data-on-submit="$ctrl.preparePayment()" diff --git a/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.controller.js b/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.controller.js index 2fcde98816a9..06d5a8faeb6b 100644 --- a/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.controller.js +++ b/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.controller.js @@ -5,6 +5,8 @@ import isObject from 'lodash/isObject'; import { CDN_ADVANCED, QUOTA_DECIMAL_PRECISION, + BADGES, + HOSTING_FREE_100_M_OFFER, } from './general-informations.constants'; import { HOSTING_CDN_ORDER_CDN_VERSION_V1 } from '../cdn/order/hosting-cdn-order.constant'; import { NEW_OFFERS_NAME } from '../hosting.constants'; @@ -33,6 +35,8 @@ export default class HostingGeneralInformationsCtrl { hostingSSLCertificate, OvhApiScreenshot, user, + displayNewHostingOfferSticker, + HOSTING_NEW_OFFER_UPGRADES, ) { this.$q = $q; this.$scope = $scope; @@ -56,9 +60,14 @@ export default class HostingGeneralInformationsCtrl { this.hostingSSLCertificate = hostingSSLCertificate; this.OvhApiScreenshot = OvhApiScreenshot; this.user = user; + this.displayNewHostingOfferSticker = displayNewHostingOfferSticker; + this.HOSTING_NEW_OFFERS_WITH_STICKER = HOSTING_NEW_OFFER_UPGRADES.concat([ + HOSTING_FREE_100_M_OFFER, + ]); this.CDN_ADVANCED = CDN_ADVANCED; this.CDN_VERSION_V1 = HOSTING_CDN_ORDER_CDN_VERSION_V1; + this.BADGE_NEW = BADGES.NEW; } $onInit() { @@ -378,4 +387,14 @@ export default class HostingGeneralInformationsCtrl { return this.$translate.instant(translateKey); } + + hasNewHostingOfferSticker() { + const { + hosting: { offer }, + } = this.$scope; + return ( + this.displayNewHostingOfferSticker && + this.HOSTING_NEW_OFFERS_WITH_STICKER.includes(offer) + ); + } } diff --git a/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.html b/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.html index c70dc60ec26d..1a8865108401 100644 --- a/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.html +++ b/packages/manager/apps/web/client/app/hosting/general-informations/GENERAL_INFORMATIONS.html @@ -640,6 +640,11 @@ class="text-capitalized mr-2" data-ng-bind=":: $ctrl.getOfferName(hosting.offer)" > + + + {{ $row.nbSubscription || "-" }} + > + + this.LogsStreamsService.getStream(this.serviceName, this.streamId), + }); + this.stream.load(); + } + + /** + * Retrieve subscription list, according to pagination/sort/filter + * + * @param offset int element offset to retrieve results from + * @param pageSize int Number of results to retrieve + * @param sort Object Sort object from ovh-ui datagrid + * @param criteria Object Criteria object from ovh-ui datagrid + * @return {*|Promise} + */ + loadSubscriptions({ offset, pageSize = 1, sort, criteria }) { + const filters = criteria.map((criterion) => { + const name = criterion.property || 'resource.name'; + return datagridToIcebergFilter(name, criterion.operator, criterion.value); + }); + const pageOffset = Math.ceil(offset / pageSize); + return this.LogsStreamsSubscriptionsService.getPaginatedStreamSubscriptions( + this.serviceName, + this.streamId, + pageOffset, + pageSize, + { name: sort.property, dir: sort.dir === -1 ? 'DESC' : 'ASC' }, + filters, + ); + } + + /** + * Display a modal to confirm subscription deletion + * + * @param subscription Object Subscription object from API + * @return {*|Promise} + */ + showSubscriptionDeleteConfirm(subscription) { + this.CucCloudMessage.flushChildMessage(); + return this.CucControllerHelper.modal + .showDeleteModal({ + titleText: this.$translate.instant( + 'streams_subscriptions_delete_modal_title', + ), + textHtml: this.$translate.instant( + 'streams_subscriptions_delete_modal_content', + { + resourceName: `${subscription.resource.name}`, + }, + ), + }) + .then(() => this.removeSubscription(subscription)); + } + + /** + * Delete a subscription on API + * Update datagrid accordingly + * + * @param subscription Object Subscription object from API + */ + removeSubscription(subscription) { + this.CucCloudMessage.flushChildMessage(); + this.deleteSubscriptionLoading = true; + this.LogsStreamsSubscriptionsService.deleteSubscription( + this.serviceName, + this.streamId, + subscription, + ) + .then((operation) => + this.LogsHelperService.handleOperation( + this.serviceName, + operation.data, + 'streams_subscriptions_delete_success', + { resourceName: subscription.resource.name }, + ), + ) + .catch((err) => { + this.LogsHelperService.handleError( + 'streams_subscriptions_delete_error', + err, + { resourceName: subscription.resource.name }, + ); + }) + .finally(() => { + this.deleteSubscriptionLoading = false; + this.ouiDatagridService.refresh('subscriptions-datagrid', true); + this.CucControllerHelper.scrollPageToTop(); + }); + } +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.html b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.html new file mode 100644 index 000000000000..45e03f772cc5 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.html @@ -0,0 +1,65 @@ +
+ + +
+ {{'streams_subscriptions_current_title' | translate:{ name: + $ctrl.stream.data.title } }} +
+

+ + + + + + + + + + {{ ::'streams_subscriptions_resource_products_' + + $row.resource.type | translate }} + + + + {{ $row.updatedAt | cucMomentFormat:'L'}} + + + + + +
diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.service.js b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.service.js new file mode 100644 index 000000000000..671f21b370e1 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/streams-subscriptions.service.js @@ -0,0 +1,60 @@ +export default class LogsStreamsSubscriptionsService { + /* @ngInject */ + constructor($http, iceberg) { + this.$http = $http; + this.iceberg = iceberg; + } + + /** + * Retrieve list of stream's subscription with pagination, sorts, filters etc. + * @param serviceName string LDP service name + * @param streamId string LDP stream UUID + * @param offset int Offset to start from + * @param pageSize int Number of results to retrieve from API + * @param sort string Name of field to sort from + * @param filters Array List of Iceberg filters to apply + * @return {Object} + */ + getPaginatedStreamSubscriptions( + serviceName, + streamId, + offset = 0, + pageSize = 25, + sort = { name: 'nbArchive', dir: 'desc' }, + filters = null, + ) { + let res = this.iceberg( + `/dbaas/logs/${serviceName}/output/graylog/stream/${streamId}/subscription`, + ) + .query() + .expand('CachedObjectList-Pages') + .limit(pageSize) + .offset(offset) + .sort(sort.name, sort.dir); + if (filters !== null) { + filters.forEach((filter) => { + res = res.addFilter(filter.name, filter.operator, filter.value); + }); + } + return res.execute().$promise.then((response) => ({ + data: response.data, + meta: { + totalCount: + parseInt(response.headers['x-pagination-elements'], 10) || 0, + }, + })); + } + + /** + * Delete a subscription on the API side + * @param serviceName string LDP service name + * @param streamId string LDP stream UUID + * @param subscription Object Subscription object to delete + * @return {Promise} + */ + deleteSubscription(serviceName, streamId, subscription) { + return this.$http.delete( + `/dbaas/logs/${serviceName}/output/graylog/stream/${streamId}/subscription/${subscription.subscriptionId}`, + ); + } +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.component.js b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.component.js new file mode 100644 index 000000000000..c8de5bf1b94a --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.component.js @@ -0,0 +1,7 @@ +import controller from './streams-subscriptions.controller'; +import template from './streams-subscriptions.html'; + +export default { + controller, + template, +}; diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.module.js b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.module.js new file mode 100644 index 000000000000..9089d96099c2 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.module.js @@ -0,0 +1,28 @@ +import angular from 'angular'; + +import '@ovh-ux/manager-core'; +import '@ovh-ux/ng-ovh-cloud-universe-components'; +import '@uirouter/angularjs'; +import 'angular-translate'; +import '@ovh-ux/ui-kit'; + +import component from './subscriptions.component'; +import routing from './subscriptions.routing'; +import service from './streams-subscriptions.service'; + +const moduleName = 'ovhManagerDbaasLogsDetailStreamsSubscriptions'; + +angular + .module(moduleName, [ + 'ngOvhCloudUniverseComponents', + 'oui', + 'ovhManagerCore', + 'pascalprecht.translate', + 'ui.router', + ]) + .config(routing) + .service('LogsStreamsSubscriptionsService', service) + .component('dbaasLogsDetailStreamsSubscriptions', component) + .run(/* @ngTranslationsInject:json ./translations */); + +export default moduleName; diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.routing.js b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.routing.js new file mode 100644 index 000000000000..58730a73c051 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/subscriptions.routing.js @@ -0,0 +1,10 @@ +export default /* @ngInject */ ($stateProvider) => { + $stateProvider.state('dbaas-logs.detail.streams.stream.subscriptions', { + url: '/subscriptions', + component: 'dbaasLogsDetailStreamsSubscriptions', + resolve: { + breadcrumb: /* @ngInject */ ($translate) => + $translate.instant('dbaas_logs_streams_subscriptions'), + }, + }); +}; diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_de_DE.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_de_DE.json new file mode 100644 index 000000000000..22df2e1f638d --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_de_DE.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Abonnements" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_en_GB.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_en_GB.json new file mode 100644 index 000000000000..493c0643c85a --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_en_GB.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Subscriptions" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_es_ES.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_es_ES.json new file mode 100644 index 000000000000..c5391a35e71a --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_es_ES.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Suscripciones" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_CA.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_CA.json new file mode 100644 index 000000000000..22df2e1f638d --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_CA.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Abonnements" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_FR.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..22df2e1f638d --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_fr_FR.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Abonnements" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_it_IT.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_it_IT.json new file mode 100644 index 000000000000..acefa7d1e0a0 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_it_IT.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Abbonamenti" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pl_PL.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pl_PL.json new file mode 100644 index 000000000000..ac7b03ecc6bd --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pl_PL.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Subskrypcje" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pt_PT.json b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pt_PT.json new file mode 100644 index 000000000000..0446c48c8090 --- /dev/null +++ b/packages/manager/modules/dbaas-logs/src/logs/detail/streams/subscriptions/translations/Messages_pt_PT.json @@ -0,0 +1,3 @@ +{ + "dbaas_logs_streams_subscriptions": "Assinaturas" +} diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_de_DE.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_de_DE.json index d81ae929b6c2..9f1cb2abc6b5 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_de_DE.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_de_DE.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Mich per E-Mail benachrichtigen, wenn ein automatisches Skalieren stattfindet.", "inputs_logs_edit_min_instance_field": "Mindestanzahl an Instanzen", "inputs_logs_edit_max_instance_field": "Maximale Anzahl an Instanzen", - "inputs_info_ca_certificate": "Zertifikat der Zertifizierungsstelle" + "inputs_info_ca_certificate": "Zertifikat der Zertifizierungsstelle", + "logs_streams_subscriptions": "Abonnements", + "logs_streams_col_subscriptions": "Abonnements", + "streams_subscriptions_current_title": "Verwaltung Ihrer Abonnements für den Stream „{{ name }}“", + "streams_subscriptions_intro_text": "Mit diesen Abonnements können Sie die Logs Ihrer OVHcloud Produkte in Ihren eigenen Streams abrufen.", + "streams_subscriptions_resource_type_label": "Dienst", + "streams_subscriptions_resource_name_label": "Name des Dienstes", + "streams_subscriptions_delete_modal_title": "Abonnement löschen", + "streams_subscriptions_delete_modal_content": "Möchten Sie das Abonnement für die Ressource {{resourceName}} wirklich löschen?", + "streams_subscriptions_delete_success": "Das Abonnement für die Ressource „{{resourceName}}“ wurde erfolgreich gelöscht.", + "streams_subscriptions_delete_error": "Beim Löschen des Abonnements für die Ressource „{{resourceName}}“ ist ein Fehler aufgetreten: {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Webhosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_en_GB.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_en_GB.json index 130d33bfe111..d8ac8aff07ac 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_en_GB.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_en_GB.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Notify me via email when an automatic scaling occurs.", "inputs_logs_edit_min_instance_field": "Minimum number of instances", "inputs_logs_edit_max_instance_field": "Maximum number of instances", - "inputs_info_ca_certificate": "Certification authority certificate" + "inputs_info_ca_certificate": "Certificate authority certificate", + "logs_streams_subscriptions": "Subscriptions", + "logs_streams_col_subscriptions": "Subscriptions", + "streams_subscriptions_current_title": "Manage your subscriptions for the ‘{{ name }}’ data stream", + "streams_subscriptions_intro_text": "These subscriptions allow you to retrieve logs of your OVHcloud products from your own data streams.", + "streams_subscriptions_resource_type_label": "Service", + "streams_subscriptions_resource_name_label": "Service name", + "streams_subscriptions_delete_modal_title": "Remove the subscription", + "streams_subscriptions_delete_modal_content": "Are you sure you want to delete the resource subscription ‘{{resourceName}}’?", + "streams_subscriptions_delete_success": "The subscription to the resource ‘{{resourceName}}’ has been deleted.", + "streams_subscriptions_delete_error": "An error occurred while deleting the subscription to the resource ‘{{resourceName}}’: {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Web Hosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_es_ES.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_es_ES.json index 8f7a50bdf024..fdf5664d0a46 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_es_ES.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_es_ES.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Avisarme por correo electrónico cuando se realice un escalado automático.", "inputs_logs_edit_min_instance_field": "Número mínimo de instancias", "inputs_logs_edit_max_instance_field": "Número máximo de instancias", - "inputs_info_ca_certificate": "Certificado de la autoridad de certificación" + "inputs_info_ca_certificate": "Certificado de la autoridad de certificación", + "logs_streams_subscriptions": "Suscripciones", + "logs_streams_col_subscriptions": "Suscripciones", + "streams_subscriptions_current_title": "Gestión de sus suscripciones para el flujo «{{ name }}»", + "streams_subscriptions_intro_text": "Estas suscripciones le permiten recuperar los logs de sus productos OVHcloud en sus propios flujos de datos.", + "streams_subscriptions_resource_type_label": "Servicio", + "streams_subscriptions_resource_name_label": "Nombre del servicio", + "streams_subscriptions_delete_modal_title": "Eliminar la suscripción", + "streams_subscriptions_delete_modal_content": "¿Seguro/a que quiere eliminar la suscripción al recurso «{{resourceName}}»?", + "streams_subscriptions_delete_success": "La suscripción al recurso «{{resourceName}}» se ha eliminado correctamente.", + "streams_subscriptions_delete_error": "Se ha producido un error al eliminar la suscripción al recurso «{{resourceName}}»: {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Web hosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_CA.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_CA.json index 4941ecac456a..3e9dbcfbe905 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_CA.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_CA.json @@ -768,5 +768,18 @@ "logs_tile_subscription_contact_admin": "Administrateur", "logs_tile_subscription_contact_billing": "Facturation", "logs_tile_subscription_contact_technical": "Technique", - "logs_order": "Commander" + "logs_order": "Commander", + "logs_streams_subscriptions": "Abonnements", + "logs_streams_col_subscriptions": "Abonnements", + "streams_subscriptions_current_title": "Gestion de vos abonnements pour le flux '{{ name }}'", + "streams_subscriptions_intro_text": "Ces abonnements vous permettent de récupérer les logs de vos produits OVHcloud dans vos propres flux de données.", + "streams_subscriptions_resource_type_label": "Service", + "streams_subscriptions_resource_name_label": "Nom du service", + "streams_subscriptions_delete_modal_title": "Supprimer l'abonnement", + "streams_subscriptions_delete_modal_content": "Êtes-vous sûr de vouloir supprimer l'abonnement à la ressource {{resourceName}} ?", + "streams_subscriptions_delete_success": "L'abonnement à la ressource '{{resourceName}}' a été supprimée avec succès.", + "streams_subscriptions_delete_error": "Une erreur est survenue lors de la suppression de l'abonnement à la ressource '{{resourceName}}': {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Web Hosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_FR.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_FR.json index 4941ecac456a..3e9dbcfbe905 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_FR.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_fr_FR.json @@ -768,5 +768,18 @@ "logs_tile_subscription_contact_admin": "Administrateur", "logs_tile_subscription_contact_billing": "Facturation", "logs_tile_subscription_contact_technical": "Technique", - "logs_order": "Commander" + "logs_order": "Commander", + "logs_streams_subscriptions": "Abonnements", + "logs_streams_col_subscriptions": "Abonnements", + "streams_subscriptions_current_title": "Gestion de vos abonnements pour le flux '{{ name }}'", + "streams_subscriptions_intro_text": "Ces abonnements vous permettent de récupérer les logs de vos produits OVHcloud dans vos propres flux de données.", + "streams_subscriptions_resource_type_label": "Service", + "streams_subscriptions_resource_name_label": "Nom du service", + "streams_subscriptions_delete_modal_title": "Supprimer l'abonnement", + "streams_subscriptions_delete_modal_content": "Êtes-vous sûr de vouloir supprimer l'abonnement à la ressource {{resourceName}} ?", + "streams_subscriptions_delete_success": "L'abonnement à la ressource '{{resourceName}}' a été supprimée avec succès.", + "streams_subscriptions_delete_error": "Une erreur est survenue lors de la suppression de l'abonnement à la ressource '{{resourceName}}': {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Web Hosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_it_IT.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_it_IT.json index 758c9bdd5c4b..0ffc306821f3 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_it_IT.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_it_IT.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Ricevere una notifica via email quando viene effettuato uno scaling automatico.", "inputs_logs_edit_min_instance_field": "Numero minimo di istanze", "inputs_logs_edit_max_instance_field": "Numero massimo di istanze", - "inputs_info_ca_certificate": "Certificato dell'autorità di certificazione" + "inputs_info_ca_certificate": "Certificato dell'autorità di certificazione", + "logs_streams_subscriptions": "Abbonamenti", + "logs_streams_col_subscriptions": "Abbonamenti", + "streams_subscriptions_current_title": "Gestione degli abbonamenti per il flusso '{{ name }}'", + "streams_subscriptions_intro_text": "Questi abbonamenti permettono di recuperare i log dei tuoi prodotti OVHcloud nei flussi di dati.", + "streams_subscriptions_resource_type_label": "Servizio", + "streams_subscriptions_resource_name_label": "Nome del servizio", + "streams_subscriptions_delete_modal_title": "Elimina l'abbonamento", + "streams_subscriptions_delete_modal_content": "Vuoi davvero eliminare l'abbonamento alla risorsa {{resourceName}} ?", + "streams_subscriptions_delete_success": "L'abbonamento alla risorsa '{{resourceName}}' è stato eliminato correttamente.", + "streams_subscriptions_delete_error": "Si è verificato un errore durante l'eliminazione dell'abbonamento alla risorsa '{{resourceName}}': {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Hosting Web", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pl_PL.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pl_PL.json index 74cf561c2bb8..bd80ee234035 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pl_PL.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pl_PL.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Powiadom mnie w wiadomości e-mail, jeśli nastąpi automatyczne skalowanie.", "inputs_logs_edit_min_instance_field": "Minimalna liczba instancji", "inputs_logs_edit_max_instance_field": "Maksymalna liczba instancji", - "inputs_info_ca_certificate": "Certyfikat instytucji certyfikującej" + "inputs_info_ca_certificate": "Certyfikat urzędu certyfikacji", + "logs_streams_subscriptions": "Subskrypcje", + "logs_streams_col_subscriptions": "Subskrypcje", + "streams_subscriptions_current_title": "Zarządzanie subskrypcjami dla strumienia '{{name}}'", + "streams_subscriptions_intro_text": "Subskrypcje te pozwalają na pobieranie logów produktów OVHcloud z Twoich własnych strumieni danych.", + "streams_subscriptions_resource_type_label": "Usługa", + "streams_subscriptions_resource_name_label": "Nazwa usługi", + "streams_subscriptions_delete_modal_title": "Usuń subskrypcję", + "streams_subscriptions_delete_modal_content": "Czy na pewno chcesz usunąć subskrypcję zasobu {{resourceName}}?", + "streams_subscriptions_delete_success": "Subskrypcja zasobu '{{resourceName}}' została usunięta.", + "streams_subscriptions_delete_error": "Wystąpił błąd podczas usuwania subskrypcji zasobu '{{resourceName}}': {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Hosting", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service" } diff --git a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pt_PT.json b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pt_PT.json index 6fb57ac998ba..2a723c5292e1 100644 --- a/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pt_PT.json +++ b/packages/manager/modules/dbaas-logs/src/logs/translations/Messages_pt_PT.json @@ -768,5 +768,18 @@ "inputs_autoscaled_notification_detail": "Notificar-me por e-mail quando ocorrer uma escalabilidade automática.", "inputs_logs_edit_min_instance_field": "Número mínimo de instâncias", "inputs_logs_edit_max_instance_field": "Número máximo de instâncias", - "inputs_info_ca_certificate": "Certificado da autoridade de certificação" + "inputs_info_ca_certificate": "Certificado da autoridade de certificação", + "logs_streams_subscriptions": "Assinaturas", + "logs_streams_col_subscriptions": "Assinaturas", + "streams_subscriptions_current_title": "Gestão das suas subscrições para o fluxo '{{ name }}'", + "streams_subscriptions_intro_text": "Estas subscrições permitem-lhe recuperar os logs dos produtos OVHcloud nos seus próprios fluxos de dados.", + "streams_subscriptions_resource_type_label": "Serviço", + "streams_subscriptions_resource_name_label": "Nome do serviço", + "streams_subscriptions_delete_modal_title": "Eliminar a subscrição", + "streams_subscriptions_delete_modal_content": "Tem a certeza de que quer eliminar a subscrição do recurso {{resourceName}}?", + "streams_subscriptions_delete_success": "A subscrição do recurso '{{resourceName}}' foi eliminada com sucesso.", + "streams_subscriptions_delete_error": "Ocorreu um erro aquando da eliminação da subscrição do recurso '{{resourceName}}': {{message}}", + "streams_subscriptions_resource_products_ldp": "Logs Data Platform", + "streams_subscriptions_resource_products_webhosting": "Alojamento web", + "streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes" } diff --git a/packages/manager/modules/exchange/src/dashboard/translations/Messages_fr_FR.json b/packages/manager/modules/exchange/src/dashboard/translations/Messages_fr_FR.json index 6a049db59415..1def8ce8fb43 100644 --- a/packages/manager/modules/exchange/src/dashboard/translations/Messages_fr_FR.json +++ b/packages/manager/modules/exchange/src/dashboard/translations/Messages_fr_FR.json @@ -109,7 +109,6 @@ "exchange_tab_INFORMATIONS_webmail": "Webmail", "exchange_tab_INFORMATIONS_messaging": "Client de messagerie", "exchange_tab_INFORMATIONS_order_office": "Commander Office 365", - "exchange_tab_INFORMATIONS_order_sharepoint": "Commander SharePoint", "exchange_server_commercial_version_2010": "2010", "exchange_server_commercial_version_2013": "2013", "exchange_server_commercial_version_2016": "2016", diff --git a/packages/manager/modules/exchange/src/header/header.controller.js b/packages/manager/modules/exchange/src/header/header.controller.js index f6fcf094a768..22f18db058ee 100644 --- a/packages/manager/modules/exchange/src/header/header.controller.js +++ b/packages/manager/modules/exchange/src/header/header.controller.js @@ -48,14 +48,6 @@ export default class HeaderController { application: 'web', path: '#/configuration/microsoft/office/license/order', }, - ACTIVATE_SHAREPOINT: { - application: 'web', - path: '#/sharepoint/activate/:organizationId/:exchangeId', - params: { - organizationId: this.exchangeService.organization, - exchangeId: this.exchangeService.domain, - }, - }, }); } diff --git a/packages/manager/modules/exchange/src/header/header.html b/packages/manager/modules/exchange/src/header/header.html index f001389947e0..3db7774a3612 100644 --- a/packages/manager/modules/exchange/src/header/header.html +++ b/packages/manager/modules/exchange/src/header/header.html @@ -102,15 +102,6 @@ class="col-sm-offset-1 col-sm-1" data-text="{{:: 'common_actions' | translate }}" > - - - { + const { value } = + action !== WILDCARD ? this.findAction(action) : { value: action }; + this.tagAllEmbeddedActions({ value, selected }); + }); + } + /** * Find an action given its value * @param {string} value + * @returns {Action} */ findAction(value) { return this.actions.find((action) => action.value === value); } + /** + * Find all action provided by the wildcard action value + * @param {string} value + * @returns {Action[]} + */ + findAllActions(value) { + if (!value || !CUSTOM_ACTION_WILDCARD_PATTERN.test(value)) { + return []; + } + return value !== WILDCARD + ? this.actions.filter( + (action) => + action.value !== value && + action.value.startsWith(value.replace(WILDCARD, '')), + ) + : this.actions; + } + /** * Execute callback for each category of each actionTree * @param {(item: { actionTree: ActionTree, category: Category }) => void} callback @@ -181,16 +235,18 @@ export default class ActionTrees extends Array { const { actions } = input; this.buffer.actions = [...actions] .sort(({ action: a }, { action: b }) => (a > b ? 1 : -1)) - .map((action) => { - const value = action.action; + .map(({ resourceType, description, action }) => { return { - resourceType: action.resourceType, + description: + description !== ACTION_DESCRIPTION_UNDEFINED ? description : null, + resourceType, + embedded: false, selected: Boolean( input.selectedActions?.find( - (rawAction) => rawAction.action === value, + (rawAction) => rawAction.action === action, ), ), - value, + value: action, }; }); } @@ -206,7 +262,7 @@ export default class ActionTrees extends Array { const unknownActions = selectedActions ? selectedActions.filter( ({ action: selectedAction }) => - selectedAction !== '*' && + selectedAction !== WILDCARD && !actions.find(({ action }) => action === selectedAction), ) : []; @@ -315,7 +371,7 @@ export default class ActionTrees extends Array { .toLocaleLowerCase(), })), get selection() { - return actions.filter(({ selected }) => selected); + return this.actions.filter(({ selected }) => selected); }, }); }); diff --git a/packages/manager/modules/iam/src/components/actionSelect/actionSelect.controller.js b/packages/manager/modules/iam/src/components/actionSelect/actionSelect.controller.js index 71f2a8a8321e..7e602f889b54 100644 --- a/packages/manager/modules/iam/src/components/actionSelect/actionSelect.controller.js +++ b/packages/manager/modules/iam/src/components/actionSelect/actionSelect.controller.js @@ -3,8 +3,10 @@ import { cloneDeep } from 'lodash-es'; import { CUSTOM_ACTION_PATTERN, CUSTOM_ACTION_SAMPLE, + CUSTOM_ACTION_WILDCARD_PATTERN, CUSTOM_RESOURCE_TYPE, TAG, + WILDCARD, } from '../../iam.constants'; import ActionTrees from './ActionTrees.class'; @@ -159,9 +161,8 @@ export default class ActionSelectController { const successKey = `${key}_custom_action_success`; const { instant: $t } = this.$translate; - if (value === '*') { + if (value === WILDCARD) { this.isWildcardActive = true; - this.customActionModel = ''; this.customActionSuccessMessage = $t(`${successKey}_wildcard`); } else { const { action, created } = this.actionTrees.addAction(value); @@ -171,7 +172,6 @@ export default class ActionSelectController { action.resourceType, )}`, }; - this.customActionSuccessMessage = created ? $t(`${successKey}_created`, translateValues) : $t(`${successKey}_selected`, translateValues); @@ -192,14 +192,22 @@ export default class ActionSelectController { return; } + const selectedActions = this.ngModel?.selection || []; + this.actionTrees = ActionTrees.create({ $scope: this.$scope, actions: this.actions, actionTrees: this.actionTrees, resourceTypes: this.resourceTypes, - selectedActions: this.ngModel?.selection || [], + selectedActions, }); + this.actionTrees.initAllSelectedEmbeddedActions( + this.isWildcardActive + ? [{ action: WILDCARD, selected: true }] + : selectedActions, + ); + // The custom form is not in the DOM yet this.$timeout(() => { const { customAction, [this.name]: name } = this.form; @@ -259,24 +267,36 @@ export default class ActionSelectController { this.trackActionSelectClick( isEnabled ? TAG.ENABLE_ALLOW_ALL_ACTIONS : TAG.DISABLE_ALLOW_ALL_ACTIONS, ); - this.onModelChanged(); + this.onModelChanged({ value: WILDCARD, selected: isEnabled }); } /** * Set the required ngModel instance's value each time the model has changed * The ngModel is of type { action: string, resourceType?: string }[] */ - onModelChanged() { + onModelChanged(actionModel = null) { // Give time to the action selected flags to react on change this.$timeout(() => { - const mappedSelection = this.actionTrees?.selection.map( - ({ value: action, resourceType }) => ({ action, resourceType }), + const selection = this.actionTrees?.selection || []; + const mappedSelection = selection.map( + ({ value: action, resourceType, embedded }) => ({ + action, + resourceType, + embedded, + }), ); - this.requiredNgModel.$setViewValue({ isWildcardActive: this.isWildcardActive, - selection: mappedSelection || [], + selection: mappedSelection, }); + // if a custom action with wilcard exits(ie. resource:urn/*) + // all embedded actions have to be updated + if ( + actionModel && + CUSTOM_ACTION_WILDCARD_PATTERN.test(actionModel.value) + ) { + this.actionTrees.tagAllEmbeddedActions(actionModel); + } // Run a manual validation const { customAction, [this.name]: name } = this.form; @@ -347,11 +367,11 @@ export default class ActionSelectController { * @param {Category} category * @returns {string} */ - static getCategoryLabel({ actions, selection }) { - const { length: selectionLength } = selection; + getCategoryLabel({ actions }) { + const selectionCount = this.constructor.countSelectedActions(actions); const prefix = 'iam_action_select_category_count'; - if (selectionLength) { - return selectionLength === 1 + if (selectionCount) { + return selectionCount === 1 ? `${prefix}_selection_one` : `${prefix}_selection_many`; } @@ -359,4 +379,13 @@ export default class ActionSelectController { ? `${prefix}_no_selection_one` : `${prefix}_no_selection_many`; } + + /** + * compute the number of selected actions + * @param {Action[]} actions + * @returns {Number} + */ + static countSelectedActions(actions) { + return actions?.filter(({ selected }) => selected).length; + } } diff --git a/packages/manager/modules/iam/src/components/actionSelect/actionSelect.template.html b/packages/manager/modules/iam/src/components/actionSelect/actionSelect.template.html index edfe6c09cf99..12cdc8110252 100644 --- a/packages/manager/modules/iam/src/components/actionSelect/actionSelect.template.html +++ b/packages/manager/modules/iam/src/components/actionSelect/actionSelect.template.html @@ -104,11 +104,14 @@ class="ml-4" data-ng-repeat="action in actionTree.actions track by action.value" data-model="action.selected" - data-on-change="$ctrl.onModelChanged()" + data-on-change="$ctrl.onModelChanged(action)" data-disabled="$ctrl.isWildcardActive || $ctrl.readOnly" > - + @@ -129,9 +132,9 @@ @@ -164,7 +167,7 @@ name="{{ action.id }}" data-ng-model="action.selected" data-ng-change="$ctrl.onModelChanged()" - data-ng-disabled="$ctrl.isWildcardActive || $ctrl.readOnly" + data-ng-disabled="$ctrl.readOnly || action.embedded" data-ng-required="$ctrl.required" /> diff --git a/packages/manager/modules/iam/src/components/createPolicy/createPolicy.controller.js b/packages/manager/modules/iam/src/components/createPolicy/createPolicy.controller.js index 63145f64db6b..6be4d2f1c911 100644 --- a/packages/manager/modules/iam/src/components/createPolicy/createPolicy.controller.js +++ b/packages/manager/modules/iam/src/components/createPolicy/createPolicy.controller.js @@ -1,6 +1,12 @@ import { cloneDeep, isEqual } from 'lodash-es'; -import { ENTITY, ENTITY_NAME_PATTERN, TAG } from '../../iam.constants'; +import { + ENTITY, + WILDCARD, + ENTITY_DESCRIPTION_PATTERN, + ENTITY_NAME_PATTERN, + TAG, +} from '../../iam.constants'; import { URL } from '../../iam.service'; import { CREATE_POLICY_TAG } from './createPolicy.constants'; @@ -15,6 +21,7 @@ export default class CreatePolicyController { this.IAMService = IAMService; this.ENTITY_NAME_PATTERN = ENTITY_NAME_PATTERN; + this.ENTITY_DESCRIPTION_PATTERN = ENTITY_DESCRIPTION_PATTERN; this.ENTITY_RESOURCE_TYPE = ENTITY.RESOURCE_TYPE; this.URL_RESOURCE_GROUP = URL.RESOURCE_GROUP; this.TAG = TAG; @@ -55,6 +62,7 @@ export default class CreatePolicyController { */ this.model = { actions: { selection: [], isWildcardActive: false }, + description: '', name: '', resources: { selection: [], types: [] }, resourceGroups: [], @@ -151,6 +159,7 @@ export default class CreatePolicyController { errorHeading: `${prefix}_error_heading_${mode}`, formHeading: { name: `${prefix}_form_name_heading`, + description: `${prefix}_form_description_heading`, resources: `${prefix}_form_resources_heading`, resourceTypes: `${prefix}_form_resource_types_heading`, }, @@ -181,13 +190,14 @@ export default class CreatePolicyController { // Edit mode, feed the model if (this.mode === 'edit') { const wildcardAction = this.policy.permissions.allow.find( - ({ action }) => action === '*', + ({ action }) => action === WILDCARD, ); this.model.actions.selection = this.policy.permissions.allow.filter( (action) => action !== wildcardAction, ); this.model.actions.isWildcardActive = Boolean(wildcardAction); this.model.name = this.policy.name; + this.model.description = this.policy.description; this.model.resources.selection = this.policy.resources .filter(({ resource }) => Boolean(resource)) .map(({ urn, resource }) => ({ ...resource, urn })); @@ -385,10 +395,14 @@ export default class CreatePolicyController { return { identities: this.policy?.identities || [], name: this.model.name, + description: this.model.description, permissions: { allow: this.model.actions.isWildcardActive - ? [{ action: '*' }] + ? [{ action: WILDCARD }] : this.model.actions.selection + // actions tagged as embedded are covered by custom actions + // there is no need to persist them + .filter(({ embedded }) => !embedded) .map(({ action }) => ({ action })) .filter( (item, i, list) => diff --git a/packages/manager/modules/iam/src/components/createPolicy/createPolicy.template.html b/packages/manager/modules/iam/src/components/createPolicy/createPolicy.template.html index 6e96012299b1..39fc39d6d5c6 100644 --- a/packages/manager/modules/iam/src/components/createPolicy/createPolicy.template.html +++ b/packages/manager/modules/iam/src/components/createPolicy/createPolicy.template.html @@ -80,6 +80,25 @@

/> + + + + + + +
+ + + diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_de_DE.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_de_DE.json index f72b358d4eae..2dfd1446fdf3 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_de_DE.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_de_DE.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Anzahl der Identitäten", "iam_policies_datagrid_column_name": "Name", "iam_policies_datagrid_topbar_create_policy": "Richtlinie erstellen", - "iam_policies_description": "Verwalten Sie die Identitäten Ihrer Benutzer und Anwendungen sowie deren Zugriffsrechte in einem einzigen Interface für alle Ihre Dienste. Mit OVHcloud IAM können Sie alle Berechtigungen für OVHcloud Produkte präzise verwalten und sorgen dank einer zentralen Zugriffsübersicht für ein höheres Sicherheitsniveau." + "iam_policies_description": "Verwalten Sie die Identitäten Ihrer Benutzer und Anwendungen sowie deren Zugriffsrechte in einem einzigen Interface für alle Ihre Dienste. Mit OVHcloud IAM können Sie alle Berechtigungen für OVHcloud Produkte präzise verwalten und sorgen dank einer zentralen Zugriffsübersicht für ein höheres Sicherheitsniveau.", + "iam_policies_datagrid_column_description": "Beschreibung" } diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_en_GB.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_en_GB.json index 96f8a035c425..08f7c13afccf 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_en_GB.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_en_GB.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Number of identities", "iam_policies_datagrid_column_name": "Name", "iam_policies_datagrid_topbar_create_policy": "Create a policy", - "iam_policies_description": "Manage the identities of your users and applications, as well as their access permissions, in a single interface for all your services. With OVHcloud IAM, you can precisely manage all of the authorisations for OVHcloud products, and get a higher level of security with a centralised view of your access." + "iam_policies_description": "Manage the identities of your users and applications, as well as their access permissions, in a single interface for all your services. With OVHcloud IAM, you can precisely manage all of the authorisations for OVHcloud products, and get a higher level of security with a centralised view of your access.", + "iam_policies_datagrid_column_description": "Description" } diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_es_ES.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_es_ES.json index 0c47e14d3b24..9e12d1de93e4 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_es_ES.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_es_ES.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Número de identidades", "iam_policies_datagrid_column_name": "Nombre", "iam_policies_datagrid_topbar_create_policy": "Crear una política", - "iam_policies_description": "Gestione las identidades de sus usuarios y aplicaciones, así como sus derechos de acceso, en una única interfaz para todos sus servicios. El IAM de OVHcloud permite gestionar con precisión todos los permisos de los productos de OVHcloud y obtener un mejor nivel de seguridad gracias a una visión centralizada de sus accesos." + "iam_policies_description": "Gestione las identidades de sus usuarios y aplicaciones, así como sus derechos de acceso, en una única interfaz para todos sus servicios. El IAM de OVHcloud permite gestionar con precisión todos los permisos de los productos de OVHcloud y obtener un mejor nivel de seguridad gracias a una visión centralizada de sus accesos.", + "iam_policies_datagrid_column_description": "Descripción" } diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_CA.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_CA.json index a6eee5d0c203..cd63b792ae68 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_CA.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_CA.json @@ -6,6 +6,7 @@ "iam_policies_datagrid_action_read_policy": "Voir la politique", "iam_policies_datagrid_column_actions": "Nombre d'actions", "iam_policies_datagrid_column_identities": "Nombre d'identités", + "iam_policies_datagrid_column_description": "Description", "iam_policies_datagrid_column_name": "Nom", "iam_policies_datagrid_topbar_create_policy": "Créer une politique", "iam_policies_description": "Gérez les identités de vos utilisateurs et de vos applications, ainsi que leurs droits d’accès dans une interface unique pour tous vos services. OVHcloud IAM permet de gérer finement l’ensemble des autorisations des produits OVHcloud et d’obtenir un meilleur niveau de sécurité avec une vision centralisée de vos accès." diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_FR.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_FR.json index a6eee5d0c203..cd63b792ae68 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_FR.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_fr_FR.json @@ -6,6 +6,7 @@ "iam_policies_datagrid_action_read_policy": "Voir la politique", "iam_policies_datagrid_column_actions": "Nombre d'actions", "iam_policies_datagrid_column_identities": "Nombre d'identités", + "iam_policies_datagrid_column_description": "Description", "iam_policies_datagrid_column_name": "Nom", "iam_policies_datagrid_topbar_create_policy": "Créer une politique", "iam_policies_description": "Gérez les identités de vos utilisateurs et de vos applications, ainsi que leurs droits d’accès dans une interface unique pour tous vos services. OVHcloud IAM permet de gérer finement l’ensemble des autorisations des produits OVHcloud et d’obtenir un meilleur niveau de sécurité avec une vision centralisée de vos accès." diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_it_IT.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_it_IT.json index d1e8c1b95d43..6b2f40b9ba2c 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_it_IT.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_it_IT.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Numero di identità", "iam_policies_datagrid_column_name": "Nome", "iam_policies_datagrid_topbar_create_policy": "Crea una policy", - "iam_policies_description": "Gestisci le identità degli utenti e delle applicazioni e i loro diritti di accesso in un'interfaccia unica per tutti i tuoi servizi. OVHcloud IAM permette di gestire con precisione tutte le autorizzazioni dei prodotti OVHcloud e di ottenere un maggiore livello di sicurezza con una visione centralizzata degli accessi." + "iam_policies_description": "Gestisci le identità degli utenti e delle applicazioni e i loro diritti di accesso in un'interfaccia unica per tutti i tuoi servizi. OVHcloud IAM permette di gestire con precisione tutte le autorizzazioni dei prodotti OVHcloud e di ottenere un maggiore livello di sicurezza con una visione centralizzata degli accessi.", + "iam_policies_datagrid_column_description": "Descrizione" } diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pl_PL.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pl_PL.json index 12eea902cf76..020f690f9e2d 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pl_PL.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pl_PL.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Liczba tożsamości", "iam_policies_datagrid_column_name": "Nazwa", "iam_policies_datagrid_topbar_create_policy": "Tworzenie polityki", - "iam_policies_description": "Zarządzaj tożsamością swoich użytkowników i aplikacji oraz ich prawami dostępu w jednym interfejsie dla wszystkich usług. OVHcloud IAM umożliwia precyzyjne zarządzanie wszystkimi uprawnieniami do usług OVHcloud i uzyskanie wyższego poziomu bezpieczeństwa dzięki zcentralizowaniu zarządzania dostępami." + "iam_policies_description": "Zarządzaj tożsamością swoich użytkowników i aplikacji oraz ich prawami dostępu w jednym interfejsie dla wszystkich usług. OVHcloud IAM umożliwia precyzyjne zarządzanie wszystkimi uprawnieniami do usług OVHcloud i uzyskanie wyższego poziomu bezpieczeństwa dzięki zcentralizowaniu zarządzania dostępami.", + "iam_policies_datagrid_column_description": "Opis" } diff --git a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pt_PT.json b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pt_PT.json index 942372898710..1cc5460521bb 100644 --- a/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pt_PT.json +++ b/packages/manager/modules/iam/src/dashboard/policies/translations/Messages_pt_PT.json @@ -8,5 +8,6 @@ "iam_policies_datagrid_column_identities": "Número de identidades", "iam_policies_datagrid_column_name": "Nome", "iam_policies_datagrid_topbar_create_policy": "Criar uma política", - "iam_policies_description": "Faça a gestão das identidades dos seus utilizadores e das suas aplicações, assim como os seus direitos de acesso numa interface única para todos os seus serviços. A OVHcloud IAM permite gerir de forma precisa o conjunto das autorizações dos produtos OVHcloud e obter um melhor nível de segurança com uma visão centralizada dos seus acessos." + "iam_policies_description": "Faça a gestão das identidades dos seus utilizadores e das suas aplicações, assim como os seus direitos de acesso numa interface única para todos os seus serviços. A OVHcloud IAM permite gerir de forma precisa o conjunto das autorizações dos produtos OVHcloud e obter um melhor nível de segurança com uma visão centralizada dos seus acessos.", + "iam_policies_datagrid_column_description": "Descrição" } diff --git a/packages/manager/modules/iam/src/iam.constants.js b/packages/manager/modules/iam/src/iam.constants.js index 6fc27ca7bcae..464fe948ddbc 100644 --- a/packages/manager/modules/iam/src/iam.constants.js +++ b/packages/manager/modules/iam/src/iam.constants.js @@ -16,10 +16,16 @@ const CUSTOM_ACTION_PATTERN = /(^\*)|(\*$)/; const CUSTOM_ACTION_SAMPLE = 'vps:apiovh:automatedBackup/*'; +const CUSTOM_ACTION_WILDCARD_PATTERN = /^[^\d]*\*$/; + const CUSTOM_RESOURCE_TYPE = 'custom'; +const WILDCARD = '*'; + const DELETE_STATEMENT = 'Terminate'; +const ACTION_DESCRIPTION_UNDEFINED = 'missing description'; + const FEATURE = { MAIN: 'iam', }; @@ -32,6 +38,7 @@ const ENTITY = { }; const ENTITY_NAME_PATTERN = /^[a-zA-Z0-9-/_+]*$/; +const ENTITY_DESCRIPTION_PATTERN = /^[a-zA-Z0-9-/_+ ]*$/; const GUIDE = { IAM: { @@ -277,9 +284,11 @@ export { API_ERROR, CUSTOM_ACTION_PATTERN, CUSTOM_ACTION_SAMPLE, + CUSTOM_ACTION_WILDCARD_PATTERN, CUSTOM_RESOURCE_TYPE, DELETE_STATEMENT, ENTITY, + ENTITY_DESCRIPTION_PATTERN, ENTITY_NAME_PATTERN, FEATURE, GUIDE, @@ -288,4 +297,6 @@ export { TAG, UNAVAILABLE_STATE_NAME, URN_VERSION, + WILDCARD, + ACTION_DESCRIPTION_UNDEFINED, }; diff --git a/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/snapshots/translations/Messages_en_GB.json b/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/snapshots/translations/Messages_en_GB.json index b1120c2a5e69..463efdd1efbb 100644 --- a/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/snapshots/translations/Messages_en_GB.json +++ b/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/snapshots/translations/Messages_en_GB.json @@ -1,5 +1,5 @@ { - "netapp_volumes_snapshots": "Backups", + "netapp_volumes_snapshots": "Snapshots", "netapp_volumes_snapshots_breadcrumb": "Backups", "netapp_volumes_snapshots_actions": "Actions", "netapp_volumes_snapshots_actions_create": "Create a snapshot", diff --git a/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/translations/Messages_en_GB.json b/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/translations/Messages_en_GB.json index 79ff5e12f645..e3da1a6879db 100644 --- a/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/translations/Messages_en_GB.json +++ b/packages/manager/modules/netapp/src/dashboard/volumes/dashboard/translations/Messages_en_GB.json @@ -30,6 +30,6 @@ "netapp_volumes_dashboard_volume_name_update_error": "An error has occurred updating the volume name.", "netapp_volumes_dashboard_volume_description_update_error": "An error has occurred updating the volume description.", "netapp_volumes_dashboard_acl": "Access Control List (ACL)", - "netapp_volumes_dashboard_snapshots": "Backups", + "netapp_volumes_dashboard_snapshots": "Snapshots", "netapp_volumes_dashboard_volume_pattern": "May only contain numbers, letters, underscores, dashes or full stops, and a maximum of 256 characters." -} \ No newline at end of file +} diff --git a/packages/manager/modules/pci/src/components/project/flavors-list/flavor-group.class.js b/packages/manager/modules/pci/src/components/project/flavors-list/flavor-group.class.js index 713943bdad13..f629ba5e2e1f 100644 --- a/packages/manager/modules/pci/src/components/project/flavors-list/flavor-group.class.js +++ b/packages/manager/modules/pci/src/components/project/flavors-list/flavor-group.class.js @@ -81,4 +81,26 @@ export default class FlavorGroup { hasFlexOption() { return some(this.flavors, (flavor) => flavor.isFlex()); } + + /** + * @doc method + * @methodOf FlavorGroup + * @name FlavorGroup#getOsTypesByRegion + * @param {string} region The region for which we want the osTypes available. + * @returns {Array} The list of available osTypes + * + * @description + * Return os types available for a region. + */ + getOsTypesByRegion(region) { + return this.flavors.reduce((osTypes, flavor) => { + if ( + flavor.regions.find((regionInfo) => regionInfo.region === region) && + !osTypes.includes(flavor.osType) + ) { + osTypes.push(flavor.osType); + } + return osTypes; + }, []); + } } diff --git a/packages/manager/modules/pci/src/projects/new/payment/components/add/constants.js b/packages/manager/modules/pci/src/projects/new/payment/components/add/constants.js index 138c159f4dfd..f53e3aa50c42 100644 --- a/packages/manager/modules/pci/src/projects/new/payment/components/add/constants.js +++ b/packages/manager/modules/pci/src/projects/new/payment/components/add/constants.js @@ -23,7 +23,9 @@ export const CREDIT_PROVISIONING = { PRICE_MODE: 'default', }; -export const CHARGES = 2; +export const CONFIRM_CREDIT_CARD_TEST_AMOUNT = 2; + +export const LANGUAGE_OVERRIDE = { IN: `en-IN` }; export const PCI_FEATURES = FEATURES; @@ -31,5 +33,6 @@ export default { PAYMENT_METHOD_AUTHORIZED_ENUM, PREFERRED_PAYMENT_METHOD_ORDER, CREDIT_PROVISIONING, - CHARGES, + CONFIRM_CREDIT_CARD_TEST_AMOUNT, + LANGUAGE_OVERRIDE, }; diff --git a/packages/manager/modules/pci/src/projects/new/payment/components/add/controller.js b/packages/manager/modules/pci/src/projects/new/payment/components/add/controller.js index 560b657aadff..4fc39d900962 100644 --- a/packages/manager/modules/pci/src/projects/new/payment/components/add/controller.js +++ b/packages/manager/modules/pci/src/projects/new/payment/components/add/controller.js @@ -8,7 +8,8 @@ import { PAYMENT_METHOD_AUTHORIZED_ENUM, PREFERRED_PAYMENT_METHOD_ORDER, PCI_FEATURES, - CHARGES, + CONFIRM_CREDIT_CARD_TEST_AMOUNT, + LANGUAGE_OVERRIDE, } from './constants'; export default class PciProjectNewPaymentMethodAddCtrl { @@ -24,9 +25,16 @@ export default class PciProjectNewPaymentMethodAddCtrl { this.$location = $location; this.coreConfig = coreConfig; this.ovhPaymentMethodHelper = ovhPaymentMethodHelper; - this.registrationCharges = `${CHARGES}${ - this.coreConfig.getUser().currency.code - }`; + const { currency, ovhSubsidiary } = this.coreConfig.getUser(); + this.registrationCharges = new Intl.NumberFormat( + LANGUAGE_OVERRIDE[ovhSubsidiary] + ? LANGUAGE_OVERRIDE[ovhSubsidiary] + : ovhSubsidiary.toLowerCase(), + { + style: 'currency', + currency: currency.code, + }, + ).format(CONFIRM_CREDIT_CARD_TEST_AMOUNT); this.PCI_FEATURES = PCI_FEATURES; diff --git a/packages/manager/modules/pci/src/projects/project/instances/add/add.controller.js b/packages/manager/modules/pci/src/projects/project/instances/add/add.controller.js index 9349a17b2d9c..b862a0e4a2ec 100644 --- a/packages/manager/modules/pci/src/projects/project/instances/add/add.controller.js +++ b/packages/manager/modules/pci/src/projects/project/instances/add/add.controller.js @@ -1,11 +1,9 @@ import find from 'lodash/find'; import filter from 'lodash/filter'; -import forEach from 'lodash/forEach'; import get from 'lodash/get'; import includes from 'lodash/includes'; import isEmpty from 'lodash/isEmpty'; import map from 'lodash/map'; -import partition from 'lodash/partition'; import has from 'lodash/has'; import some from 'lodash/some'; import sortBy from 'lodash/sortBy'; @@ -92,6 +90,7 @@ export default class PciInstancesAddController { sshKey: null, isInstanceFlex: false, }; + this.osTypes = []; this.selectedCategory = null; this.instanceNamePattern = PATTERN; @@ -169,20 +168,33 @@ export default class PciInstancesAddController { this.projectId, planCode, this.coreConfig.getUser().ovhSubsidiary, - ).then((productAvailability) => { - const productRegionsAvailables = productAvailability?.plans[0]?.regions; + ).then((productCapability) => { + const productRegionsAllowed = productCapability?.plans[0]?.regions; - forEach(this.regions, (locationsMap, continent) => { + Object.entries(this.regions).forEach(([continent, locationsMap]) => { + // Create datacenters continent groups this.availableRegions[continent] = {}; this.unavailableRegions[continent] = {}; - forEach(locationsMap, (datacenters, location) => { - [ - this.availableRegions[continent][location], - this.unavailableRegions[continent][location], - ] = partition(datacenters, (datacenter) => { - return productRegionsAvailables.find( - (productRegion) => productRegion.name === datacenter.name, + Object.entries(locationsMap).forEach(([location, datacenters]) => { + // Create datacenters location sub groups + this.availableRegions[continent][location] = []; + this.unavailableRegions[continent][location] = []; + // Fill datacenters groups: a datacenter is considered available if + // it is in a region where we have the capability to add an instance + // and the selected flavor is available for the datacenter region + datacenters.forEach((datacenter) => { + const isDatacenterAvailable = !!productRegionsAllowed.find( + (productRegion) => + productRegion.name === datacenter.name && + this.model.flavorGroup.availableRegions.includes( + productRegion.name, + ), ); + if (isDatacenterAvailable) { + this.availableRegions[continent][location].push(datacenter); + } else { + this.unavailableRegions[continent][location].push(datacenter); + } }); }); }); @@ -234,6 +246,10 @@ export default class PciInstancesAddController { onRegionChange() { this.displaySelectedRegion = true; this.instance.region = this.model.datacenter.name; + // Retrieve list of os types availables for the selected region + this.osTypes = this.model.flavorGroup.getOsTypesByRegion( + this.model.datacenter.name, + ); this.availablePrivateNetworks = [ this.defaultPrivateNetwork, ...sortBy( diff --git a/packages/manager/modules/pci/src/projects/project/instances/add/add.html b/packages/manager/modules/pci/src/projects/project/instances/add/add.html index 40b14e2362fe..273ea09d3245 100644 --- a/packages/manager/modules/pci/src/projects/project/instances/add/add.html +++ b/packages/manager/modules/pci/src/projects/project/instances/add/add.html @@ -166,7 +166,7 @@

data-ng-if="$ctrl.currentStep >= 2" data-display-selected-image="$ctrl.displaySelectedImage" data-flavor-type="$ctrl.model.flavorGroup.name" - data-os-types="$ctrl.model.flavorGroup.osTypes" + data-os-types="$ctrl.osTypes" data-region="$ctrl.model.datacenter.name" data-service-name="{{:: $ctrl.projectId }}" data-selected-image="$ctrl.model.image" diff --git a/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.controller.js b/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.controller.js index ead9ce75ae51..10e059519a9d 100644 --- a/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.controller.js +++ b/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.controller.js @@ -1,12 +1,10 @@ import find from 'lodash/find'; import filter from 'lodash/filter'; -import forEach from 'lodash/forEach'; import get from 'lodash/get'; import includes from 'lodash/includes'; import isEmpty from 'lodash/isEmpty'; import toLower from 'lodash/toLower'; import map from 'lodash/map'; -import partition from 'lodash/partition'; import has from 'lodash/has'; import some from 'lodash/some'; import sortBy from 'lodash/sortBy'; @@ -66,6 +64,7 @@ export default class PciInstancesAddController { sshKey: null, isInstanceFlex: false, }; + this.osTypes = []; this.selectedCategory = null; this.instanceNamePattern = PATTERN; @@ -101,20 +100,33 @@ export default class PciInstancesAddController { this.projectId, planCode, this.coreConfig.getUser().ovhSubsidiary, - ).then((productAvailability) => { - const productRegionsAvailables = productAvailability?.plans[0]?.regions; + ).then((productCapability) => { + const productRegionsAllowed = productCapability?.plans[0]?.regions; - forEach(this.regions, (locationsMap, continent) => { + Object.entries(this.regions).forEach(([continent, locationsMap]) => { + // Create datacenters continent groups this.availableRegions[continent] = {}; this.unavailableRegions[continent] = {}; - forEach(locationsMap, (datacenters, location) => { - [ - this.availableRegions[continent][location], - this.unavailableRegions[continent][location], - ] = partition(datacenters, (datacenter) => { - return productRegionsAvailables.find( - (productRegion) => productRegion.name === datacenter.name, + Object.entries(locationsMap).forEach(([location, datacenters]) => { + // Create datacenters location sub groups + this.availableRegions[continent][location] = []; + this.unavailableRegions[continent][location] = []; + // Fill datacenters groups: a datacenter is considered available if + // it is in a region where we have the capability to add an instance + // and the selected flavor is available for the datacenter region + datacenters.forEach((datacenter) => { + const isDatacenterAvailable = !!productRegionsAllowed.find( + (productRegion) => + productRegion.name === datacenter.name && + this.model.flavorGroup.availableRegions.includes( + productRegion.name, + ), ); + if (isDatacenterAvailable) { + this.availableRegions[continent][location].push(datacenter); + } else { + this.unavailableRegions[continent][location].push(datacenter); + } }); }); }); @@ -166,7 +178,10 @@ export default class PciInstancesAddController { onRegionChange() { this.displaySelectedRegion = true; this.instance.region = this.model.datacenter.name; - + // Retrieve list of os types availables for the selected region + this.osTypes = this.model.flavorGroup.getOsTypesByRegion( + this.model.datacenter.name, + ); this.availablePrivateNetworks = [ this.defaultPrivateNetwork, ...sortBy( diff --git a/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.html b/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.html index f2131f4b62d8..102829af926e 100644 --- a/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.html +++ b/packages/manager/modules/pci/src/projects/project/instances/add/legacy/add.html @@ -166,7 +166,7 @@

data-ng-if="$ctrl.currentStep >= 2" data-display-selected-image="$ctrl.displaySelectedImage" data-flavor-type="$ctrl.model.flavorGroup.name" - data-os-types="$ctrl.model.flavorGroup.osTypes" + data-os-types="$ctrl.osTypes" data-region="$ctrl.model.datacenter.name" data-service-name="{{:: $ctrl.projectId }}" data-selected-image="$ctrl.model.image" diff --git a/packages/manager/modules/sharepoint/src/dashboard/sharepoint.module.js b/packages/manager/modules/sharepoint/src/dashboard/sharepoint.module.js index 593d8989f8f6..6ed3eb337dc9 100644 --- a/packages/manager/modules/sharepoint/src/dashboard/sharepoint.module.js +++ b/packages/manager/modules/sharepoint/src/dashboard/sharepoint.module.js @@ -23,7 +23,6 @@ import domainsCtrl from '../domain/sharepoint-domain.controller'; import domainAddCtrl from '../domain/add/sharepoint-domain-add.controller'; import domainDeleteCtrl from '../domain/delete/sharepoint-domain-delete.controller'; import informationsCtrl from '../information/sharepoint-information.controller'; -import orderCtrl from '../order/sharepoint-order.controller'; import updateRenewCtrl from '../renew/update/sharepoint-renew-update.controller'; import tasksCtrl from '../task/sharepoint-task.controller'; import urlCtrl from '../url/sharepoint-url.controller'; @@ -66,7 +65,6 @@ angular .controller('SharepointAddDomainController', domainAddCtrl) .controller('SharepointDeleteDomainController', domainDeleteCtrl) .controller('SharepointInformationsCtrl', informationsCtrl) - .controller('SharepointOrderCtrl', orderCtrl) .controller('SharepointUpdateRenewCtrl', updateRenewCtrl) .controller('SharepointTasksCtrl', tasksCtrl) .controller('SharepointUrlCtrl', urlCtrl); diff --git a/packages/manager/modules/sharepoint/src/dashboard/sharepoint.routes.js b/packages/manager/modules/sharepoint/src/dashboard/sharepoint.routes.js index 35b74ceac98c..6efa7649f9da 100644 --- a/packages/manager/modules/sharepoint/src/dashboard/sharepoint.routes.js +++ b/packages/manager/modules/sharepoint/src/dashboard/sharepoint.routes.js @@ -1,11 +1,9 @@ import set from 'lodash/set'; import sharepointCtrl from './sharepoint.controller'; -import orderCtrl from '../order/sharepoint-order.controller'; import urlCtrl from '../url/sharepoint-url.controller'; import sharepointTpl from './sharepoint.html'; -import sharepointOrderTpl from '../order/sharepoint-order.html'; import sharepointUrlTpl from '../url/sharepoint-url.html'; const routeBase = 'sharepoint'; @@ -22,22 +20,6 @@ export default /* @ngInject */ ($stateProvider) => { hideBreadcrumb: () => true, }; - $stateProvider.state(`${routeBase}.order`, { - url: '/order', - template: sharepointOrderTpl, - reloadOnSearch: false, - resolve, - }); - - $stateProvider.state(`${routeBase}.config`, { - url: '/activate/:organizationId/:exchangeId', - template: sharepointOrderTpl, - controller: orderCtrl, - controllerAs: 'SharepointOrderCtrl', - reloadOnSearch: false, - resolve, - }); - $stateProvider.state(`${routeBase}.product`, { url: '/:exchangeId/:productId', template: sharepointTpl, diff --git a/packages/manager/modules/sharepoint/src/dashboard/translations/Messages_fr_FR.json b/packages/manager/modules/sharepoint/src/dashboard/translations/Messages_fr_FR.json index c2d7e7125fa3..4109fdb27323 100644 --- a/packages/manager/modules/sharepoint/src/dashboard/translations/Messages_fr_FR.json +++ b/packages/manager/modules/sharepoint/src/dashboard/translations/Messages_fr_FR.json @@ -121,25 +121,12 @@ "sharepoint_accounts_upgrade": "Migrer vers l'offre Standard", "sharepoint_activate_back_to_exchange_label": "Revenir au détail du server Exchange {{t0}}", "sharepoint_activate_title_label": "Activer un SharePoint", - "sharepoint_order_title_label": "Commander un SharePoint", - "sharepoint_activate_intro_text": "SharePoint vous permet de créer des sites webs pour stocker, organiser et partager de l'information dans votre organisation.", - "sharepoint_activate_intro_warning_associated": "Attention, il est possible d'associer votre SharePoint Standalone à un service hosted existant, cette action ne sera plus réalisable une fois la commande effectuée.", - "sharepoint_activate_intro_warning_reseller": "En tant que revendeur, vous profitez d'une réduction sur l’achat de comptes SharePoint Standalone Provider uniquement. Vous pouvez tout de même choisir d'associer un SharePoint à un service existant, mais vous ne bénéficierez pas de ce tarif préférentiel.", - "sharepoint_activate_mode_associate": "Associer à un service Exchange existant", - "sharepoint_activate_mode_standalone": "Commander un compte SharePoint Standalone", - "sharepoint_activate_mode_standalone_provider": "Commander un compte SharePoint Standalone Provider", - "sharepoint_activate_standalone_accounts_number": "Nombre de licences SharePoint Standalone", "sharepoint_activate_fields_manadatory_label": "Tous les champs sont obligatoires", - "sharepoint_activate_which_service_label": "Serveur Exchange à associer", "sharepoint_activate_enter_account_label": "Saisir l'e-mail d'un compte du serveur Exchange.", "sharepoint_activate_see_account_list": "Voir la liste des comptes", "sharepoint_activate_invalid_account": "Ce compte n'existe pas sur le serveur exchange associé", "sharepoint_activate_url_placeholder": "Spécifier l'URL du SharePoint", "sharepoint_activate_button_label": "Lancer la demande d'activation", - "sharepoint_order_button_label": "Commander votre service", - "sharepoint_order_button_label_month": "Commander votre service pour un mois", - "sharepoint_order_button_label_year": "Commander", - "sharepoint_order_button_label_promo": "3 mois gratuits pour 12 mois d'engagement", "sharepoint_activate_message_failure": "La demande d'activation du SharePoint a échouée.", "sharepoint_action_activate_office_licence_title": "Activer la licence Office", "sharepoint_action_activate_office_licence_intro": "Pour utiliser les webapp Office incluses dans SharePoint, vous devez disposez d’une licence Office 2013 ou 2016 (Office 365)", diff --git a/packages/manager/modules/sharepoint/src/index.js b/packages/manager/modules/sharepoint/src/index.js index 9a622cb2b3be..0311ed2f7427 100644 --- a/packages/manager/modules/sharepoint/src/index.js +++ b/packages/manager/modules/sharepoint/src/index.js @@ -48,14 +48,6 @@ angular ); }, }) - .state(`${routeBase}.order.**`, { - url: '/order', - lazyLoad, - }) - .state(`${routeBase}.config.**`, { - url: '/activate/:organizationId/:exchangeId', - lazyLoad, - }) .state(`${routeBase}.product.**`, { url: '/:exchangeId/:productId', lazyLoad, diff --git a/packages/manager/modules/sharepoint/src/onboarding/onboarding.controller.js b/packages/manager/modules/sharepoint/src/onboarding/onboarding.controller.js index 1f8cae424704..3c900184f66c 100644 --- a/packages/manager/modules/sharepoint/src/onboarding/onboarding.controller.js +++ b/packages/manager/modules/sharepoint/src/onboarding/onboarding.controller.js @@ -15,6 +15,5 @@ export default class SharepointOnboardingController { description: this.$translate.instant(guide.description), title: this.$translate.instant(guide.title), })); - this.cta = this.ctaURL; } } diff --git a/packages/manager/modules/sharepoint/src/onboarding/onboarding.html b/packages/manager/modules/sharepoint/src/onboarding/onboarding.html index c548cf537585..ee3e4752a369 100644 --- a/packages/manager/modules/sharepoint/src/onboarding/onboarding.html +++ b/packages/manager/modules/sharepoint/src/onboarding/onboarding.html @@ -5,11 +5,5 @@

- -
diff --git a/packages/manager/modules/sharepoint/src/onboarding/onboarding.routing.js b/packages/manager/modules/sharepoint/src/onboarding/onboarding.routing.js index 09fcb507b15f..5a05b08acc18 100644 --- a/packages/manager/modules/sharepoint/src/onboarding/onboarding.routing.js +++ b/packages/manager/modules/sharepoint/src/onboarding/onboarding.routing.js @@ -17,7 +17,6 @@ export default /* @ngInject */ ($stateProvider) => { serviceType: 'aapi', }) .then(({ data }) => data), - ctaURL: ($state) => $state.href('sharepoint.order'), }, }); }; diff --git a/packages/manager/modules/sharepoint/src/onboarding/translations/Messages_fr_FR.json b/packages/manager/modules/sharepoint/src/onboarding/translations/Messages_fr_FR.json index 656127ffbfc5..42062a3be4eb 100644 --- a/packages/manager/modules/sharepoint/src/onboarding/translations/Messages_fr_FR.json +++ b/packages/manager/modules/sharepoint/src/onboarding/translations/Messages_fr_FR.json @@ -2,7 +2,6 @@ "sharepoint_onboarding_title": "Solutions collaboratives", "sharepoint_onboarding_description": "Que vous soyez au bureau ou en déplacement, partagez, éditez et communiquez où que vous soyez avec l’ensemble de vos équipes !", "sharepoint_onboarding_description2": "Découvrez toutes nos solutions collaboratives prêtes à l'emploi et sécurisées.", - "sharepoint_onboarding_order": "Commander", "sharepoint_onboarding_guide1_title": "Activer et gérer votre SharePoint OVHcloud", "sharepoint_onboarding_guide1_description": "Découvrez comment commander et configurer une plateforme SharePoint.", "sharepoint_onboarding_guide2_title": "Migrer votre Sharepoint via OVH Sharepoint Migrator", diff --git a/packages/manager/modules/sharepoint/src/order/sharepoint-order.controller.js b/packages/manager/modules/sharepoint/src/order/sharepoint-order.controller.js deleted file mode 100644 index 0982d3ff51aa..000000000000 --- a/packages/manager/modules/sharepoint/src/order/sharepoint-order.controller.js +++ /dev/null @@ -1,260 +0,0 @@ -import angular from 'angular'; -import filter from 'lodash/filter'; -import find from 'lodash/find'; -import get from 'lodash/get'; -import has from 'lodash/has'; -import head from 'lodash/head'; -import map from 'lodash/map'; -import thru from 'lodash/thru'; - -export default class SharepointOrderCtrl { - /* @ngInject */ - constructor( - $q, - $stateParams, - $window, - wucExchange, - MicrosoftSharepointLicenseService, - ouiDatagridService, - OvhApiMeVipStatus, - WucUser, - atInternet, - ) { - this.$q = $q; - this.$stateParams = $stateParams; - this.$window = $window; - this.wucExchange = wucExchange; - this.Sharepoint = MicrosoftSharepointLicenseService; - this.ouiDatagridService = ouiDatagridService; - this.OvhApiMeVipStatus = OvhApiMeVipStatus; - this.WucUser = WucUser; - this.atInternet = atInternet; - } - - $onInit() { - this.organizationId = this.$stateParams.organizationId; - this.exchangeId = this.$stateParams.exchangeId; - - this.alerts = { - main: 'sharepoint.alerts.main', - }; - - this.isReseller = false; - this.associateExchange = false; - this.associatedExchange = null; - this.exchanges = null; - this.accountsToAssociate = []; - - // Indicates that we are activating a SharePoint by coming from an exchange service. - this.isComingFromAssociatedExchange = false; - - this.loaders = { - init: true, - accounts: true, - }; - - this.standAloneQuantity = 1; - - this.getExchanges() - .then(() => this.WucUser.getUser()) - .then(({ ovhSubsidiary }) => { - this.userSubsidiary = ovhSubsidiary; - }) - .then(() => this.checkReseller()) - .then((isReseller) => { - this.isReseller = isReseller; - - // default mode for normal users is to associate - if ( - (!isReseller || this.isComingFromAssociatedExchange) && - this.exchanges && - this.exchanges.length > 0 - ) { - this.associateExchange = true; - } - }) - .finally(() => { - this.loaders.init = false; - this.associatedExchange = - this.associatedExchange || head(this.exchanges); - this.getAccounts(); - }); - } - - canAssociateExchange() { - return this.exchanges && this.exchanges.length > 0; - } - - canOrderProvider() { - return this.isReseller && this.userSubsidiary === 'FR'; - } - - checkReseller() { - return this.OvhApiMeVipStatus.v6() - .get() - .$promise.then((status) => get(status, 'web', false)); - } - - getExchanges() { - return this.Sharepoint.getAllExchangeServices() - .then((exchanges) => - map(exchanges, (exchange) => { - const newExchange = angular.copy(exchange); - newExchange.domain = newExchange.name; - return newExchange; - }), - ) - .then((exchanges) => this.filterSupportedExchanges(exchanges)) - .then((exchanges) => { - this.exchanges = exchanges; - if (exchanges.length === 0) { - this.associateExchange = false; - } - return exchanges; - }) - .then((exchanges) => - this.selectAssociatedExchangeFromRouteParams(exchanges), - ); - } - - filterSupportedExchanges(exchanges) { - return thru( - filter( - filter(exchanges, (exchange) => - this.constructor.isSupportedExchangeType(exchange), - ), - (exchange) => this.isSupportedExchangeAdditionalCondition(exchange), - ), - (exchangesList) => - this.filterExchangesThatAlreadyHaveSharepoint(exchangesList), - ); - } - - static isSupportedExchangeType(exchange) { - return exchange.type === 'EXCHANGE_HOSTED'; - } - - isSupportedExchangeAdditionalCondition(exchange) { - return this.wucExchange - .getExchangeServer(exchange.organization, exchange.name) - .then((server) => server.individual2010 === false); - } - - filterExchangesThatAlreadyHaveSharepoint(exchanges) { - return this.buildSharepointChecklist(exchanges).then((checklist) => - filter(exchanges, (exchange, index) => !checklist[index]), - ); - } - - selectAssociatedExchangeFromRouteParams(exchanges) { - this.associatedExchange = find( - exchanges, - (exchange) => - exchange.organization === this.organizationId && - exchange.name === this.exchangeId, - ); - if (this.associatedExchange) { - this.isComingFromAssociatedExchange = true; - } - } - - buildSharepointChecklist(exchanges) { - return this.$q.all( - map(exchanges, (exchange) => this.hasSharepoint(exchange)), - ); - } - - hasSharepoint(exchange) { - return this.wucExchange - .getSharepointServiceForExchange(exchange) - .then(() => true) - .catch(() => false); - } - - getAccounts() { - return this.wucExchange - .getAccountIds({ - organizationName: this.associatedExchange.organization, - exchangeService: this.associatedExchange.domain, - }) - .then((accountEmails) => ({ - data: map(accountEmails, (email) => ({ email })), - meta: { - totalCount: accountEmails.length, - }, - })); - } - - getAccount({ email }) { - return this.wucExchange.getAccount({ - organizationName: this.associatedExchange.organization, - exchangeService: this.associatedExchange.domain, - primaryEmailAddress: email, - }); - } - - onAssociateChange(associateExchange) { - if (!associateExchange) { - // we need to reset selected accounts if we leave the association interface - this.resetAccountsToAssociate(); - } - } - - resetAccountsToAssociate() { - this.accountsToAssociate = []; - } - - refreshAccounts(exchange) { - this.associatedExchange = exchange; - this.resetAccountsToAssociate(); - this.ouiDatagridService.refresh('exchangeAccountsDatagrid', true); - } - - onAccountsSelected(accounts) { - this.accountsToAssociate = accounts.map( - ({ primaryEmailAddress }) => primaryEmailAddress, - ); - } - - hasSelectedAccounts() { - return this.accountsToAssociate.length > 0; - } - - getSharepointOrderUrl() { - if (this.associateExchange) { - if ( - has(this.associatedExchange, 'name') && - this.accountsToAssociate.length >= 1 - ) { - return this.Sharepoint.getSharepointOrderUrl( - this.associatedExchange.name, - this.accountsToAssociate, - ); - } - return ''; - } - - const quantity = parseInt(this.standAloneQuantity, 10); - if (quantity >= 1 && quantity <= 30) { - return this.canOrderProvider() - ? this.Sharepoint.getSharepointProviderOrderUrl(quantity) - : this.Sharepoint.getSharepointStandaloneOrderUrl(quantity); - } - - return ''; - } - - goToSharepointOrder() { - this.trackSharepointOrder(); - const win = this.$window.open('', '_blank'); - win.opener = null; - win.location = this.getSharepointOrderUrl(); - } - - trackSharepointOrder() { - this.atInternet.trackClick({ - name: 'sharepoint::order::confirm', - type: 'action', - }); - } -} diff --git a/packages/manager/modules/sharepoint/src/order/sharepoint-order.html b/packages/manager/modules/sharepoint/src/order/sharepoint-order.html deleted file mode 100644 index c5d120000d1d..000000000000 --- a/packages/manager/modules/sharepoint/src/order/sharepoint-order.html +++ /dev/null @@ -1,123 +0,0 @@ -
- - - -
- - - -
-
-

- - - - - - - - - - -
- -
- - - - - - - - -
- - -
- - - - - - - - - - - - - - -
- -
- - - - -
-
-
-
-
diff --git a/packages/manager/modules/sharepoint/src/sharepoint.routing.js b/packages/manager/modules/sharepoint/src/sharepoint.routing.js index 7fe40edb8ce4..bb07e0d0fa3c 100644 --- a/packages/manager/modules/sharepoint/src/sharepoint.routing.js +++ b/packages/manager/modules/sharepoint/src/sharepoint.routing.js @@ -35,22 +35,6 @@ export default /* @ngInject */ ($stateProvider) => { exchangeId, productId, }), - topbarOptions: /* @ngInject */ ($translate, $state, atInternet) => ({ - cta: { - type: 'button', - displayed: true, - disabled: false, - label: $translate.instant('sharepoint_order'), - value: $translate.instant('sharepoint_order'), - onClick: () => { - atInternet.trackClick({ - name: 'sharepoint::index::order', - type: 'action', - }); - $state.go('sharepoint.order'); - }, - }, - }), hideBreadcrumb: () => true, }, }); diff --git a/packages/manager/modules/sharepoint/src/translations/Messages_fr_FR.json b/packages/manager/modules/sharepoint/src/translations/Messages_fr_FR.json index c7b5104f5460..ac49f4c0bd7f 100644 --- a/packages/manager/modules/sharepoint/src/translations/Messages_fr_FR.json +++ b/packages/manager/modules/sharepoint/src/translations/Messages_fr_FR.json @@ -1,4 +1,3 @@ { - "sharepoint_title": "SharePoint", - "sharepoint_order": "Commander" + "sharepoint_title": "SharePoint" }