diff --git a/app/pages/project/vpcs/VpcPage/tabs/VpcGatewaysTab.tsx b/app/pages/project/vpcs/VpcPage/tabs/VpcGatewaysTab.tsx index e7b8f8363..0fd50179d 100644 --- a/app/pages/project/vpcs/VpcPage/tabs/VpcGatewaysTab.tsx +++ b/app/pages/project/vpcs/VpcPage/tabs/VpcGatewaysTab.tsx @@ -51,7 +51,8 @@ const GatewayIpPoolCell = (gatewaySelector: PP.VpcInternetGateway) => { const GatewayRoutes = ({ project, vpc, gateway }: PP.VpcInternetGateway) => { const matchingRoutes = useGatewayRoutes({ project, vpc, gateway }) const to = pb.vpcInternetGateway({ project, vpc, gateway }) - return {matchingRoutes?.length || 0} + if (!matchingRoutes?.length) return + return {matchingRoutes.length} } const colHelper = createColumnHelper() diff --git a/app/pages/project/vpcs/internet-gateway-edit.tsx b/app/pages/project/vpcs/internet-gateway-edit.tsx index a93b10da2..0301fe869 100644 --- a/app/pages/project/vpcs/internet-gateway-edit.tsx +++ b/app/pages/project/vpcs/internet-gateway-edit.tsx @@ -104,9 +104,9 @@ export function EditInternetGatewayForm() { return ( @@ -145,7 +145,7 @@ export function EditInternetGatewayForm() {
- Internet Gateway IP Address + Internet gateway IP address {gatewayIpAddresses && gatewayIpAddresses.length > 1 ? 'es' : ''} {gatewayIpAddresses && gatewayIpAddresses.length > 0 ? ( @@ -164,10 +164,10 @@ export function EditInternetGatewayForm() { )) ) : (
- {'This internet gateway does not have any specific IP addresses attached. '} + {'This internet gateway does not have any IP addresses attached. '} {hasAttachedPool ? 'It will use an address from the attached IP pool.' - : 'Use the CLI to attach an IP Pool or specify an IP address to use with this gateway.'} + : 'Use the CLI to attach an IP pool or IP address to this gateway.'}
)}
@@ -176,7 +176,7 @@ export function EditInternetGatewayForm() {
- Internet Gateway IP Pool + Internet gateway IP pool {gatewayIpPools && gatewayIpPools.length > 1 ? 's' : ''} {hasAttachedPool ? ( diff --git a/test/e2e/vpcs.e2e.ts b/test/e2e/vpcs.e2e.ts index ffa43dbfc..f2e9ef10e 100644 --- a/test/e2e/vpcs.e2e.ts +++ b/test/e2e/vpcs.e2e.ts @@ -335,12 +335,14 @@ test('can view internet gateways', async ({ page }) => { description: 'internet gateway 1', 'Attached IP Address': '123.4.56.3', 'Attached IP Pool': 'ip-pool-1', + Routes: '1', }) await expectRowVisible(table, { name: 'internet-gateway-2', description: 'internet gateway 2', 'Attached IP Address': '—', 'Attached IP Pool': 'ip-pool-2', + Routes: '—', }) await page.getByRole('link', { name: 'internet-gateway-1' }).click()