Files
Joshen Lim 564f4f66ee Joshen/fe 2660 clean up stale feature flags enabled for 2 months part 1 (#43329)
## 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
2026-03-04 13:08:39 +08:00

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: [],
},
],
},
]
: []),
]
}