diff --git a/src/components/tables/DataPlanes/Rows.tsx b/src/components/tables/DataPlanes/Rows.tsx index 8325eafdc..e9db1d5d8 100644 --- a/src/components/tables/DataPlanes/Rows.tsx +++ b/src/components/tables/DataPlanes/Rows.tsx @@ -7,7 +7,6 @@ import { useIntl } from 'react-intl'; import { formatDataPlaneName, formatDataPlaneOption, - formatSshSubnets, } from 'utils/dataPlane-utils'; interface RowsProps { @@ -44,10 +43,8 @@ function Row({ row }: RowProps) { - {row.ssh_subnets ? ( - + {row.ssh_subnets && row.ssh_subnets.length > 0 ? ( + ) : ( intl.formatMessage({ id: 'admin.dataPlanes.table.columns.ips.missing', diff --git a/src/forms/renderers/Informational/SshEndpoint.tsx b/src/forms/renderers/Informational/SshEndpoint.tsx index 7d095879f..4624ec250 100644 --- a/src/forms/renderers/Informational/SshEndpoint.tsx +++ b/src/forms/renderers/Informational/SshEndpoint.tsx @@ -4,7 +4,6 @@ import AlertBox from 'components/shared/AlertBox'; import { useMemo } from 'react'; import { useIntl } from 'react-intl'; import { useDetailsFormStore } from 'stores/DetailsForm/Store'; -import { formatSshSubnets } from 'utils/dataPlane-utils'; function SshEndpointInfo() { const intl = useIntl(); @@ -16,7 +15,7 @@ function SshEndpointInfo() { const ipList = useMemo(() => { // Check if private data plane has IPs and use 'em if (sshSubnets && sshSubnets.length > 0) { - return sshSubnets.map(formatSshSubnets).join(', '); + return sshSubnets.join(', '); } return intl.formatMessage({ diff --git a/src/utils/dataPlane-utils.ts b/src/utils/dataPlane-utils.ts index 947248554..6727edbf2 100644 --- a/src/utils/dataPlane-utils.ts +++ b/src/utils/dataPlane-utils.ts @@ -324,7 +324,3 @@ export const isHttp = (ep: Endpoint): boolean => { export const formatHttpUrl = (fullHostName: string): string => { return `https://${fullHostName}/`; }; - -export const formatSshSubnets = (subnet: string) => { - return subnet.replaceAll('/32', '').replaceAll('/64', ''); -};