mirror of
https://github.com/supabase/supabase.git
synced 2026-06-01 02:14:43 +08:00
* Implement read, create, delete replicas * Long poll replica statuses if any one of them is coming up * Support querying replicas in SQL editor * Add optimistic rendering for setting up and removing replicas * Small style fix for database selector in SQL editor * Small fix * Add Alerts around PITR and PG upgrades RE read replicas * Small fixes after testing flag off * Add UI guards to check that project has PITR before deploying replica * Fix * Address feedback * Fix * Update replicas RQ to enable based on flag
8 lines
411 B
TypeScript
8 lines
411 B
TypeScript
import { AVAILABLE_REPLICA_REGIONS } from 'components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants'
|
|
import { last } from 'lodash'
|
|
|
|
export const formatDatabaseID = (id: string) => last(id.split('-') ?? [])
|
|
|
|
export const formatDatabaseRegion = (region: string) =>
|
|
last(AVAILABLE_REPLICA_REGIONS.find((r) => r.region === region)?.name.split('('))?.split(')')[0]
|