mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
## Context Just cleaning up feature flags that have been toggled on for all users and unchanged for the past 2 months - advisorRules - newJwtSecrets - isWorkOSTPAEnabled - EnableOAuth21 - gitlessBranching - showRefreshToast - awsPrivateLinkIntegration - useBedrockAssistant (Already not used) - enableStripeSyncEngineIntegration - ShowExplainWithAiInQueryPerformance Doing it in 2 parts so its easier for review
51 lines
1.3 KiB
TypeScript
51 lines
1.3 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): 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
|
|
? [
|
|
{
|
|
title: 'Configuration',
|
|
items: [
|
|
{
|
|
name: 'Settings',
|
|
key: 'rules',
|
|
url: `/project/${ref}/advisors/rules/security`,
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
: []),
|
|
]
|
|
}
|