mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
## What kind of change does this PR introduce? Feature. Stack 5 of 5 (tip) for [PIPE-1007](https://linear.app/supabase/issue/PIPE-1007/move-read-replicas-out-of-replication-into-infrastructure). ## What is the current behavior? Selectors still open Replication with `destinationType=Read+Replica`. Compute eligibility actions leave the add-replica flow without carrying a recommended size into the Infrastructure form. ## What is the new behavior? DatabaseSelector and the SQL submenu open Infrastructure `?addReplica=true`. Change to Small/XL compute waits for the sheet to close, pre-selects that size, then focuses and scrolls the Infrastructure form to Compute without shifting the page footer. ## Additional context Last stack PR. [#49043](https://github.com/supabase/supabase/pull/49043) has merged. Please review, but do not merge until 2→4 are also approved. Then merge [#49044](https://github.com/supabase/supabase/pull/49044) → [#49045](https://github.com/supabase/supabase/pull/49045) → [#49046](https://github.com/supabase/supabase/pull/49046) → this PR in succession, and drop the `do-not-merge` labels. Update the read replicas getting-started doc in the same sitting so it points only at Infrastructure (it currently also links Database → Replication). Remaining stack: [#49044](https://github.com/supabase/supabase/pull/49044) → [#49045](https://github.com/supabase/supabase/pull/49045) → [#49046](https://github.com/supabase/supabase/pull/49046) → this PR ## To test `infrastructure:read_replicas` is an enabled-feature, on by default. There is no Feature Preview or ConfigCat switch. You should already see the Infrastructure Read replicas section. If you do not, your profile lists `infrastructure:read_replicas` in `disabled_features`. 1. [Infrastructure](https://studio-staging-git-dnywh-choreread-replicas-in-829a4b-supabase.vercel.app/dashboard/project/_/settings/infrastructure): topology, Read replicas, Scaling. 2. Add read replica. If blocked on compute, Change to Small compute: sheet closes, Small is selected and focused, the price footer is dirty, and no blank page gap appears. 3. From the SQL editor database selector, Add replica should open Infrastructure, not Replication.
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { useParams } from 'common'
|
|
import Link from 'next/link'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns/Admonition'
|
|
import {
|
|
PageSection,
|
|
PageSectionContent,
|
|
PageSectionMeta,
|
|
PageSectionSummary,
|
|
PageSectionTitle,
|
|
} from 'ui-patterns/PageSection'
|
|
|
|
import { DocsButton } from '../../ui/DocsButton'
|
|
import { getInfrastructurePath } from '@/components/interfaces/Settings/Infrastructure/Infrastructure.utils'
|
|
import { DOCS_URL } from '@/lib/constants'
|
|
|
|
// [Joshen] Only used for non AWS projects
|
|
export function DiskManagementPanelForm() {
|
|
const { ref: projectRef } = useParams()
|
|
|
|
return (
|
|
<PageSection id="disk-management">
|
|
<PageSectionMeta>
|
|
<PageSectionSummary>
|
|
<PageSectionTitle>Disk management</PageSectionTitle>
|
|
</PageSectionSummary>
|
|
<DocsButton href={`${DOCS_URL}/guides/platform/database-size#disk-management`} />
|
|
</PageSectionMeta>
|
|
<PageSectionContent>
|
|
<Admonition
|
|
type="default"
|
|
layout="responsive"
|
|
title="Disk management has moved"
|
|
description="Disk configuration is now managed alongside project compute on the Infrastructure page."
|
|
actions={
|
|
<Button variant="default" asChild>
|
|
<Link href={getInfrastructurePath(projectRef)}>Go to Infrastructure</Link>
|
|
</Button>
|
|
}
|
|
/>
|
|
</PageSectionContent>
|
|
</PageSection>
|
|
)
|
|
}
|