From ba0a6ff2ae59f672ec62c429329ff8bccfd812fd Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Thu, 21 Nov 2024 00:49:09 +0800 Subject: [PATCH] tidy --- .../Connect/DatabaseConnectionNotices.tsx | 82 ------------------- .../interfaces/Connect/DatabaseSettings.tsx | 9 -- 2 files changed, 91 deletions(-) delete mode 100644 apps/studio/components/interfaces/Connect/DatabaseConnectionNotices.tsx diff --git a/apps/studio/components/interfaces/Connect/DatabaseConnectionNotices.tsx b/apps/studio/components/interfaces/Connect/DatabaseConnectionNotices.tsx deleted file mode 100644 index 0bd005cebb1..00000000000 --- a/apps/studio/components/interfaces/Connect/DatabaseConnectionNotices.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { ExternalLink } from 'lucide-react' - -import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui' -import { WarningIcon } from 'ui' - -export const IPv4DeprecationNotice = () => { - return ( - - - - Direct database access is only available via IPv6-compatible networks. - - -

- We strongly recommend using connection pooling to connect to your database because it's - compatible with both IPv4 and IPv6 networks. You'll only need to change the connection - credentials that you're using in your application to the pooler's connection credentials. -

- -
-
- ) -} - -export const IPv4AddonDirectConnectionNotice = () => { - return ( - - - Direct database connections are recommended if you're connecting with session mode. - - -

- If you are not connecting to the database from serverless environments, we strongly - recommend you connect to the database directly instead of using connection pooling for - lower latency. -

-

- Since your project has the IPv4 add on, you are not required to use the connection pooler - even if your network only supports IPv4. -

- -
-
- ) -} - -export const DefaultSessionModeNotice = () => { - return ( - - - You are not yet in Transaction mode. - -

- You need to set your Pool Mode to{' '} - Transaction in the{' '} - Connection pooling configuration section below in - order to use transaction mode on port 6543. -

-

- Otherwise, port 6543 will continue to connect in{' '} - Session mode. -

-
-
- ) -} diff --git a/apps/studio/components/interfaces/Connect/DatabaseSettings.tsx b/apps/studio/components/interfaces/Connect/DatabaseSettings.tsx index d5c104b5835..a2e2e533ded 100644 --- a/apps/studio/components/interfaces/Connect/DatabaseSettings.tsx +++ b/apps/studio/components/interfaces/Connect/DatabaseSettings.tsx @@ -3,8 +3,6 @@ import { useEffect, useRef, useState } from 'react' import { useParams } from 'common' import { getAddons } from 'components/interfaces/Billing/Subscription/Subscription.utils' import AlertError from 'components/ui/AlertError' -import DatabaseSelector from 'components/ui/DatabaseSelector' -import Panel from 'components/ui/Panel' import ShimmeringLoader from 'components/ui/ShimmeringLoader' import { usePoolingConfigurationQuery } from 'data/database/pooling-configuration-query' import { useReadReplicasQuery } from 'data/read-replicas/replicas-query' @@ -13,13 +11,6 @@ import { useSendEventMutation } from 'data/telemetry/send-event-mutation' import { pluckObjectFields } from 'lib/helpers' import { useDatabaseSelectorStateSnapshot } from 'state/database-selector' import { useDatabaseSettingsStateSnapshot } from 'state/database-settings' -import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Input, WarningIcon } from 'ui' -import { - DefaultSessionModeNotice, - IPv4AddonDirectConnectionNotice, - IPv4DeprecationNotice, -} from './DatabaseConnectionNotices' -import { UsePoolerCheckbox } from './UsePoolerCheckbox' const DatabaseSettings = () => { const { ref: projectRef, connectionString } = useParams()