Skip to content

Commit 425c1bb

Browse files
committed
fix(pci-kubernetes): fix issue private network
ref: #TAPC-5312 Signed-off-by: Pierre-Philippe <[email protected]>
1 parent b31df1b commit 425c1bb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/manager/apps/pci-kubernetes/src/components/create/BillingStep.component.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ export default function BillingStep(props: TBillingStepProps): ReactElement {
6666
const savingsPlanUrl = `${projectURL}/savings-plan`;
6767
const showSavingPlan = useSavingsPlanAvailable();
6868

69+
const calculatePrice = (basePrice: number | null, zonesNumber?: number | null): number => {
70+
const price = Number(basePrice);
71+
return zonesNumber ? zonesNumber * price : price;
72+
};
73+
const computedPrice = calculatePrice(props.price, props.selectedAvailabilityZonesNumber);
74+
const hourlyPrice = getFormattedHourlyCatalogPrice(computedPrice);
75+
const monthlyPrice = getFormattedMonthlyCatalogPrice(convertHourlyPriceToMonthly(computedPrice));
6976
return (
7077
<>
7178
<div className="my-6">
@@ -149,15 +156,15 @@ export default function BillingStep(props: TBillingStepProps): ReactElement {
149156
<strong>
150157
{t('flavor-billing:pci_project_flavors_billing_price_hourly_price_label')}
151158
</strong>
152-
{` ${getFormattedHourlyCatalogPrice(Number(props.price))}`}
159+
{hourlyPrice}
153160
</OsdsText>
154161
<OsdsText
155162
level={ODS_THEME_TYPOGRAPHY_LEVEL.body}
156163
size={ODS_THEME_TYPOGRAPHY_SIZE._400}
157164
color={ODS_THEME_COLOR_INTENT.text}
158165
>
159166
<strong>{t('node-pool:kube_common_node_pool_estimation_cost_tile')}:</strong>
160-
{` ${getFormattedMonthlyCatalogPrice(convertHourlyPriceToMonthly(props.selectedAvailabilityZonesNumber ? props.selectedAvailabilityZonesNumber * Number(props.price) : Number(props.price)))}`}
167+
{monthlyPrice}
161168
</OsdsText>
162169
</div>
163170
</OsdsTile>

packages/manager/apps/pci-kubernetes/src/components/network/NoGatewayLinkedWarning.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const NoGatewayLinkedMessage = ({ network, gateways, type }: Props) => {
5353
};
5454
}
5555
return null;
56-
}, [noNetwork, invalidGateway, t]);
56+
}, [noNetwork, invalidGateway, t, privateNetworkURL, createPrivateGatewayURL]);
5757

5858
if (!content) return null;
5959

0 commit comments

Comments
 (0)