diff --git a/apps/docs/content/guides/database/connection-management.mdx b/apps/docs/content/guides/database/connection-management.mdx index 62a011328fbac..eab783c29286f 100644 --- a/apps/docs/content/guides/database/connection-management.mdx +++ b/apps/docs/content/guides/database/connection-management.mdx @@ -11,7 +11,7 @@ Every [Compute Add-On](/docs/guides/platform/compute-add-ons) has a pre-configur ### Configuring Supavisor's pool size -You can change how many database connections Supavisor can manage by altering the pool size in the "Connection pooling configuration" section of the [Database Settings](/dashboard/project/_/database/settings): +You can change how many database connections Supavisor can manage by altering the pool size in the "Connection pooling" section of the [Database Settings](/dashboard/project/_/database/settings): ![Connection Info and Certificate.](/docs/img/database/pool-size.png) diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx b/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx index 6cd8e9ae65ada..ad6188313281d 100644 --- a/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx +++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementPanelForm.tsx @@ -21,7 +21,7 @@ export function DiskManagementPanelForm() { - Disk Management + Disk management diff --git a/apps/studio/components/interfaces/Settings/Database/BannedIPs.tsx b/apps/studio/components/interfaces/Settings/Database/BannedIPs.tsx index 3d131b50ad911..79b5c1b1cbb28 100644 --- a/apps/studio/components/interfaces/Settings/Database/BannedIPs.tsx +++ b/apps/studio/components/interfaces/Settings/Database/BannedIPs.tsx @@ -84,64 +84,63 @@ const BannedIPs = () => { - Network Bans + Network bans - List of IP addresses that are temporarily blocked if their traffic pattern looks - abusive + IP addresses temporarily blocked due to suspicious traffic - + + {ipListLoading ? ( + + + + + + + ) : ipListError ? ( + + ) : ipList.banned_ipv4_addresses.length > 0 ? ( + + {ipList.banned_ipv4_addresses.map((ip) => ( + +
+ +

{ip}

+ {ip === userIPAddress && Your IP address} +
+ openConfirmationModal(ip)} + tooltip={{ + content: { + side: 'bottom', + text: !canUnbanNetworks + ? 'You need additional permissions to unban networks' + : undefined, + }, + }} + > + Unban IP + +
+ ))} +
+ ) : ( + + + There are no banned IP addresses for your project + + + )} +
- {/* TODO: Remove mockIpList usage - using mock data for UI testing */} - {ipListLoading ? ( - - - - - - - ) : ipListError ? ( - - ) : ipList.banned_ipv4_addresses.length > 0 ? ( - - {ipList.banned_ipv4_addresses.map((ip) => ( - -
- -

{ip}

- {ip === userIPAddress && Your IP address} -
- openConfirmationModal(ip)} - tooltip={{ - content: { - side: 'bottom', - text: !canUnbanNetworks - ? 'You need additional permissions to unban networks' - : undefined, - }, - }} - > - Unban IP - -
- ))} -
- ) : ( - - - There are no banned IP addresses for your project. - - - )} { }, [isSuccessPgbouncerConfig]) return ( -
- -
-

Connection pooling configuration

- {disablePoolModeSelection ? ( - Shared Pooler - ) : ( - Shared/Dedicated Pooler - )} -
- - - } - footer={ - resetForm()} - helper={ - !canUpdateConnectionPoolingConfiguration - ? 'You need additional permissions to update connection pooling settings' - : undefined - } + + + + Connection pooling + + + - } - > + + + {isSuccessAddons && !disablePoolModeSelection && !hasIpv4Addon && ( - +

If your network only supports IPv4, consider purchasing the{' '} IPv4 add-on + .

)} - - {isLoadingPgbouncerConfig && ( -
- {Array.from({ length: 4 }).map((_, i) => ( - -
- - -
- -
- ))} - -
- )} - {isErrorPgbouncerConfig && ( - - )} - {connectionPoolingUnavailable && ( - resetForm()} + helper={ + !canUpdateConnectionPoolingConfiguration + ? 'You need additional permissions to update connection pooling settings' + : undefined + } /> - )} - {isSuccessPgbouncerConfig && ( - -
- ( - - The maximum number of connections made to the underlying Postgres cluster, - per user+db combination. Pool size has a default of {defaultPoolSize}{' '} - based on your compute size of {computeSize}. -

- } - className="[&>div]:md:w-1/2 [&>div]:xl:w-2/5 [&>div>div]:w-full [&>div>div>div]:min-w-100" - > - - - - - - {!!maxConnData && - (default_pool_size ?? 15) > maxConnData.maxConnections * 0.8 && ( - - - Pool size is greater than 80% of the max connections ( - {maxConnData.maxConnections}) on your database - - - This may result in instability and unreliability with your database - connections. - - - )} -
- )} - /> + } + > + + {isLoadingPgbouncerConfig && ( +
+ {Array.from({ length: 4 }).map((_, i) => ( + +
+ + +
+ +
+ ))} + + +
+ )} + {isErrorPgbouncerConfig && ( + + )} + {connectionPoolingUnavailable && ( + + )} + {isSuccessPgbouncerConfig && !connectionPoolingUnavailable && ( + <> +
+
+
Connection poolers
+

+ Configuration is shared across all connection poolers. +

+
+
+ Shared + {!disablePoolModeSelection && Dedicated} +
+
+ + + + ( + + The maximum number of connections made to the underlying Postgres + cluster, per user+db combination. Pool size has a default of{' '} + {defaultPoolSize} based on your compute size of {computeSize}. +

+ } + className="[&>div]:md:w-1/2 [&>div]:xl:w-2/5 [&>div>div]:w-full [&>div>div>div]:min-w-100" + > + + + + + + {!!maxConnData && + (default_pool_size ?? 15) > maxConnData.maxConnections * 0.8 && ( + + + Pool size is greater than 80% of the max connections ( + {maxConnData.maxConnections}) on your database + + + This may result in instability and unreliability with your + database connections. + + + )} +
+ )} + /> - + - ( - -

- The maximum number of concurrent client connections allowed. This value - is fixed at {defaultMaxClientConn} based on your compute size of{' '} - {computeSize} and cannot be changed. -

-

- Please refer to our{' '} - - documentation - {' '} - to find out more. -

- - } - > - - - - - -
- )} - /> - -
- )} -
-
-
+ ( + +

+ The maximum number of concurrent client connections allowed. This + value is fixed at {defaultMaxClientConn} based on your compute size + of {computeSize} and cannot be changed.{' '} + + Learn more + +

+ + } + > + + + + + +
+ )} + /> + + + + )} + + + +
) } diff --git a/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/ResetDbPassword.tsx b/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/ResetDbPassword.tsx index 0656bb21417a5..7b54ad637ed13 100644 --- a/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/ResetDbPassword.tsx +++ b/apps/studio/components/interfaces/Settings/Database/DatabaseSettings/ResetDbPassword.tsx @@ -10,8 +10,15 @@ import { passwordStrength, PasswordStrengthScore } from 'lib/password-strength' import { generateStrongPassword } from 'lib/project' import { useEffect, useState } from 'react' import { toast } from 'sonner' -import { Button, Card, CardContent, Input, Modal } from 'ui' -import { FormLayout } from 'ui-patterns/form/Layout/FormLayout' +import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, Modal } from 'ui' +import { + PageSection, + PageSectionContent, + PageSectionMeta, + PageSectionSummary, + PageSectionDescription, + PageSectionTitle, +} from 'ui-patterns/PageSection' const ResetDbPassword = ({ disabled = false }) => { const { ref } = useParams() @@ -84,14 +91,25 @@ const ResetDbPassword = ({ disabled = false }) => { return ( <> - - - -
+ + + + Database password + + Used for direct Postgres connections + + + + + +
+

Reset database password

+

+ The database password isn’t viewable after creation. Resetting it will break any + existing connections. +

+
+ { }, }} > - Reset database password + Reset password -
-
-
-
+ + + + Reset database password} + header="Reset database password" confirmText="Reset password" size="medium" visible={showResetDbPass} diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx index 08ce91a7f6704..7f6bc4aa760a1 100644 --- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx +++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx @@ -114,7 +114,7 @@ export const NetworkRestrictions = () => { - Network Restrictions + Network restrictions @@ -206,8 +206,8 @@ export const NetworkRestrictions = () => { {isUninitialized || isAllowedAll ? (
-
-

+

+

Your database can be accessed by all IP addresses

diff --git a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx index 36d1028933d72..7caf8352e6d1a 100644 --- a/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx +++ b/apps/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx @@ -114,7 +114,7 @@ const SSLConfiguration = () => { - SSL Configuration + SSL configuration diff --git a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx index b4b55d01884fe..bf3c82fc730b4 100644 --- a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx +++ b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx @@ -64,9 +64,9 @@ export const CustomDomainConfig = () => { - Custom Domains + Custom domains - Present a branded experience to your users. + Present a branded experience to your users diff --git a/apps/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectPanel.tsx b/apps/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectPanel.tsx index 61bb43b3e43c1..2182e4e6ab29e 100644 --- a/apps/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectPanel.tsx +++ b/apps/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectPanel.tsx @@ -30,9 +30,9 @@ export const DeleteProjectPanel = () => { - Delete Project + Delete project - Permanently remove your project and its database. + Permanently remove your project and its database diff --git a/apps/studio/components/interfaces/Settings/General/General.tsx b/apps/studio/components/interfaces/Settings/General/General.tsx index 42ae983f7265e..4544eecd26afb 100644 --- a/apps/studio/components/interfaces/Settings/General/General.tsx +++ b/apps/studio/components/interfaces/Settings/General/General.tsx @@ -189,7 +189,7 @@ export const General = () => { Project availability - Restart or pause your project when performing maintenance. + Restart or pause your project when performing maintenance @@ -235,9 +235,6 @@ export const General = () => { Project usage - - Usage statistics now live under your organization settings. - diff --git a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectPanel.tsx b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectPanel.tsx index b713be37c48c1..072f7cf5bcc1d 100644 --- a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectPanel.tsx +++ b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectPanel.tsx @@ -21,10 +21,7 @@ export const TransferProjectPanel = () => { - Transfer Project - - Transfer your project to a different organization. - + Transfer project diff --git a/apps/studio/pages/project/[ref]/database/settings.tsx b/apps/studio/pages/project/[ref]/database/settings.tsx index a069ae05469ec..8e0226bdba70a 100644 --- a/apps/studio/pages/project/[ref]/database/settings.tsx +++ b/apps/studio/pages/project/[ref]/database/settings.tsx @@ -11,6 +11,7 @@ import { useIsAwsCloudProvider, useIsAwsK8sCloudProvider } from 'hooks/misc/useS import { PageContainer } from 'ui-patterns/PageContainer' import { PageHeader, + PageHeaderDescription, PageHeaderMeta, PageHeaderSummary, PageHeaderTitle, @@ -45,23 +46,22 @@ const ProjectSettings: NextPageWithLayout = () => { return ( <> - + Database Settings + + Connections, security, and network configuration + {IS_PLATFORM ? ( <> - - - - - - - - + + + + {showNewDiskManagementUI ? ( // This form is hidden if Disk and Compute form is enabled, new form is on ./settings/compute-and-disk @@ -75,7 +75,7 @@ const ProjectSettings: NextPageWithLayout = () => { ) : ( - + diff --git a/apps/studio/pages/project/[ref]/settings/general.tsx b/apps/studio/pages/project/[ref]/settings/general.tsx index d99669a9f29c3..433e9053ee03e 100644 --- a/apps/studio/pages/project/[ref]/settings/general.tsx +++ b/apps/studio/pages/project/[ref]/settings/general.tsx @@ -48,7 +48,7 @@ const ProjectSettings: NextPageWithLayout = () => { Project Settings - Configure general options, domains, transfers, and project lifecycle. + General configuration, domains, ownership, and lifecycle