Skip to content

Commit

Permalink
feat(pci-object-storage): feature flipping lz in the usa
Browse files Browse the repository at this point in the history
ref: TAPC-1189
Signed-off-by: Selmen AKRMI <[email protected]>
  • Loading branch information
Selmen AKRMI committed Oct 23, 2024
1 parent a3e4c1b commit 0f37445
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ export default {
trackEncryptionAction: '<',
catalog: '<',
projectActivationPageHref: '<',
isLocalzoneAvailable: '<',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default class PciStoragesContainersAddController {
},
);

this.featureFlipLocalzoneContainer();
this.setOffersPrices();
this.setDeploymentModePrices();
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ export default {
trackEncryptionAction: '<',
encryptionAvailable: '<',
enableVersioning: '<',
isLocalzoneAvailable: '<',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
});
Expand Down

0 comments on commit 0f37445

Please sign in to comment.