Migrate data planes settings table to GraphQL - #2034
Conversation
Replace the PostgREST-backed DataPlanes admin table with the existing useDataPlanes() GraphQL hook, following the storage mappings migration (#2031). - Fetch via useDataPlanes() and filter by scope/tenant client-side, dropping the per-scope PostgREST prefetch, TableHydrator, EntityTable, and the DATA_PLANE selectable-table store plumbing (invariableStores entry, SelectTableStoreNames.DATA_PLANE, TablePrefixes.dataPlanes). - Render a plain MUI Table; the public/private toggle is now a pure client-side filter, so ToggleDataPlaneScope no longer forces the shared store into a loading state. - Consume DataPlaneNode directly in Rows and the details dialog (name via toPresentableName, region via cloudProvider/region fields), removing the deprecated name-parsing path for this table. - Remove getDataPlanesForTable from src/api/dataPlanes.ts and inline the touched component strings, pruning the now-dead react-intl keys. The workflow/details-form path (getDataPlaneOptions and the deprecated parse utils) still uses PostgREST and is left for a follow-up.
⚪ Code HealthNo change to the dead-code surface. 48 Unused files
64 Unused exports
26 Unused exported types
14 Unused exported enum members
5 Unused dependencies
3 Unused devDependencies
|
Summary
Migrates the Data Planes admin settings table from PostgREST to the existing
useDataPlanes()GraphQL hook, following the storage mappings migration (#2031). This removes the second of the two remaining PostgREST data-plane fetches (the workflow/details-form path is left for a follow-up).useDataPlanes()and filter by scope/tenant client-side, dropping the per-scope PostgREST prefetch (getDataPlanesForTable),TableHydrator,EntityTable, and theDATA_PLANEselectable-table store plumbing (invariableStoresentry,SelectTableStoreNames.DATA_PLANE,TablePrefixes.dataPlanes).Table. The public/private toggle is now a pure client-side filter, soToggleDataPlaneScopeno longer has to force the shared store into a loading state.DataPlaneNodedirectly inRowsand the details dialog — name viatoPresentableName, region via thecloudProvider/regionfields — instead of re-parsing the data-plane name string.Not in scope (follow-up)
The workflow/details-form path (
getDataPlaneOptions+useEvaluateDataPlaneOptions+ the@deprecatedparse utilsgenerateDataPlaneOption/parseDataPlaneName/formatDataPlaneName/getDataPlaneScope) still uses PostgREST. It's blocked on the GraphQLDataPlanenode lackingid/reactorAddress, whichDataPlaneOptionneeds. Once that path is migrated,src/api/dataPlanes.tsand the deprecated utils can be deleted outright.Test plan
npm run typechecknpm run lintnpx vitest run(271 passed)