mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
* feat: rename reports to observability on nav sidebar * fix: observability route * feat: observability navigation and redirects * fix: first time load redirects * feat: change auth overview reports link * feat: clean up of other links to observability sections * fix: query perf redirects * chore: find exhaustive deps and disable for time being * fix: charis suggested fixes * fix: forgotten suggested fix * chore: delete old reports views files * fix: paths in reports tests * fix: url sync useEffect should trigger only once * feat: reorganise observability sidebar * fix: data api not being selected * fix: wrong layout for realitime * fix: custom reports reloading --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> Co-authored-by: Ali Waseem <waseema393@gmail.com>
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
|
|
import type { Project } from 'data/projects/project-detail-query'
|
|
import { IS_PLATFORM } from 'lib/constants'
|
|
import { ArrowUpRight } from 'lucide-react'
|
|
|
|
export const generateAdvisorsMenu = (
|
|
project?: Project,
|
|
features?: { advisorRules: boolean }
|
|
): ProductMenuGroup[] => {
|
|
const ref = project?.ref ?? 'default'
|
|
|
|
return [
|
|
{
|
|
title: 'Advisors',
|
|
items: [
|
|
{
|
|
name: 'Security Advisor',
|
|
key: 'security',
|
|
url: `/project/${ref}/advisors/security`,
|
|
items: [],
|
|
},
|
|
{
|
|
name: 'Performance Advisor',
|
|
key: 'performance',
|
|
url: `/project/${ref}/advisors/performance`,
|
|
items: [],
|
|
},
|
|
{
|
|
name: 'Query Performance',
|
|
key: 'query-performance',
|
|
url: `/project/${ref}/observability/query-performance`,
|
|
items: [],
|
|
rightIcon: <ArrowUpRight size={14} strokeWidth={1.5} className="h-4 w-4" />,
|
|
},
|
|
],
|
|
},
|
|
...(IS_PLATFORM && features?.advisorRules
|
|
? [
|
|
{
|
|
title: 'Configuration',
|
|
items: [
|
|
{
|
|
name: 'Settings',
|
|
key: 'rules',
|
|
url: `/project/${ref}/advisors/rules/security`,
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
: []),
|
|
]
|
|
}
|