diff --git a/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.component.js b/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.component.js index 597be822df35..022659725b4c 100644 --- a/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.component.js +++ b/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.component.js @@ -23,5 +23,6 @@ export default { trackEncryptionAction: '<', catalog: '<', projectActivationPageHref: '<', + isLocalzoneAvailable: '<', }, }; diff --git a/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.controller.js b/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.controller.js index 5cb860f45aa0..12c23e982b4e 100644 --- a/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.controller.js +++ b/packages/manager/modules/pci/src/projects/project/storages/containers/add/add.controller.js @@ -106,6 +106,7 @@ export default class PciStoragesContainersAddController { }, ); + this.featureFlipLocalzoneContainer(); this.setOffersPrices(); this.setDeploymentModePrices(); } @@ -147,6 +148,18 @@ export default class PciStoragesContainersAddController { return hourlyPrice * 730 * 1024 * 0.00000001; } + featureFlipLocalzoneContainer() { + if (!this.isLocalzoneAvailable) { + const index = OBJECT_CONTAINER_DEPLOYMENT_MODES.indexOf( + OBJECT_CONTAINER_MODE_LOCAL_ZONE, + ); + + if (index > -1) { + OBJECT_CONTAINER_DEPLOYMENT_MODES.splice(index, 1); + } + } + } + setOffersPrices() { this.OBJECT_CONTAINER_OFFERS_LABELS[ OBJECT_CONTAINER_OFFER_STORAGE_STANDARD diff --git a/packages/manager/modules/pci/src/projects/project/storages/containers/container/container.component.js b/packages/manager/modules/pci/src/projects/project/storages/containers/container/container.component.js index d8e7e955ba2b..a26083a8b9a8 100644 --- a/packages/manager/modules/pci/src/projects/project/storages/containers/container/container.component.js +++ b/packages/manager/modules/pci/src/projects/project/storages/containers/container/container.component.js @@ -26,5 +26,6 @@ export default { trackEncryptionAction: '<', encryptionAvailable: '<', enableVersioning: '<', + isLocalzoneAvailable: '<', }, }; diff --git a/packages/manager/modules/pci/src/projects/project/storages/object-storage/object-storage.routing.js b/packages/manager/modules/pci/src/projects/project/storages/object-storage/object-storage.routing.js index c5e6bd4b58c2..41d24653f0e8 100644 --- a/packages/manager/modules/pci/src/projects/project/storages/object-storage/object-storage.routing.js +++ b/packages/manager/modules/pci/src/projects/project/storages/object-storage/object-storage.routing.js @@ -177,6 +177,12 @@ export default /* @ngInject */ ($stateProvider) => { ), ), + isLocalzoneAvailable: /* @ngInject */ (ovhFeatureFlipping) => + ovhFeatureFlipping + .checkFeatureAvailability('public-cloud:object-storage:localzone') + .then((feature) => + feature.isFeatureAvailable('public-cloud:object-storage:localzone'), + ), breadcrumb: () => null, }, });