mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Add docs with bare min information abotut he addition of the 4 new health advisors ## Problem no docs on health advisors ## Solution added docs covering health advisors <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added health advisors for persistently high error rates in the Data API, Auth, Storage, and Edge Functions. * Findings include links to relevant troubleshooting guidance and instructions for reviewing recent errors or failed invocations in Studio Logs, MCP, or the Management API. * **Documentation** * Updated the advisors guide to describe health, security, and performance checks, with examples and links to access advisors in Studio and the Management API. * Clarified that findings may be intentional and can take time to clear after a fix. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com> Co-authored-by: Nik Richers <nrichers@gmail.com>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { readFile } from 'node:fs/promises'
|
|
import { join } from 'node:path'
|
|
import { healthAdvisors } from '~/data/health-advisors.data'
|
|
import { MDXRemoteBase } from '~/features/docs/MdxBase'
|
|
import { TabPanel, Tabs } from '~/features/ui/Tabs'
|
|
import { GENERATED_DIRECTORY } from '~/lib/docs'
|
|
import { capitalize } from 'lodash-es'
|
|
|
|
interface Lint {
|
|
path: string
|
|
content: string
|
|
}
|
|
|
|
export async function DatabaseAdvisorsIndex() {
|
|
let lints: Lint[] = []
|
|
|
|
try {
|
|
const raw = await readFile(join(GENERATED_DIRECTORY, 'database-advisors.json'), 'utf-8')
|
|
lints = JSON.parse(raw)
|
|
} catch (error) {
|
|
console.warn(
|
|
'[database-advisors] Failed to read generated advisor docs; rendering without them',
|
|
error
|
|
)
|
|
}
|
|
|
|
return (
|
|
<Tabs listClassNames="flex flex-wrap gap-2 [&>button]:m-0!" queryGroup="lint">
|
|
{[...healthAdvisors, ...lints].map((lint) => (
|
|
<TabPanel key={lint.path} id={lint.path} label={capitalize(lint.path.replace(/_/g, ' '))}>
|
|
<section id={lint.path}>
|
|
<MDXRemoteBase source={lint.content} />
|
|
</section>
|
|
</TabPanel>
|
|
))}
|
|
</Tabs>
|
|
)
|
|
}
|