mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
* Make the title prop on ProjectIntegrationLayout mandatory. Fix the title on some of the integration pages. Fix wrong layout on wrappers/new. * Add code for the initial page. * Make the FilterPopover more type-safe. * Add a page to list message in a single queue. * Add feature flag for queues. * Handle the case where pgmq is not available on the database. * Minor fixes. * Some minor fixes. * Fix the query when fetching only archived messages. * Fix the filters when there's no choices selected. * Add a comment for local dev. * Add a max size to the queue name input.
85 lines
2.1 KiB
TypeScript
85 lines
2.1 KiB
TypeScript
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
|
|
import type { Project } from 'data/projects/project-detail-query'
|
|
|
|
export const generateProjectIntegrationsMenu = (
|
|
project?: Project,
|
|
flags?: {
|
|
pgNetExtensionExists: boolean
|
|
cronUiEnabled: boolean
|
|
queuesUiEnabled: boolean
|
|
graphqlExtensionExists: boolean
|
|
pgmqExtensionExists: boolean
|
|
}
|
|
): ProductMenuGroup[] => {
|
|
const ref = project?.ref ?? 'default'
|
|
const {
|
|
pgNetExtensionExists,
|
|
cronUiEnabled,
|
|
queuesUiEnabled,
|
|
graphqlExtensionExists,
|
|
pgmqExtensionExists,
|
|
} = flags || {}
|
|
|
|
return [
|
|
{
|
|
title: 'Manage',
|
|
items: [
|
|
{
|
|
name: 'Wrappers',
|
|
key: 'wrappers',
|
|
url: `/project/${ref}/integrations/wrappers`,
|
|
items: [],
|
|
},
|
|
...(!!pgNetExtensionExists
|
|
? [
|
|
{
|
|
name: 'Webhooks',
|
|
key: 'hooks',
|
|
url: `/project/${ref}/integrations/hooks`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
|
|
...(!!cronUiEnabled
|
|
? [
|
|
{
|
|
name: 'Cron Jobs',
|
|
key: 'cron-jobs',
|
|
url: `/project/${ref}/integrations/cron-jobs`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
...(!!graphqlExtensionExists
|
|
? [
|
|
{
|
|
name: 'GraphiQL',
|
|
key: 'graphiql',
|
|
url: `/project/${ref}/integrations/graphiql`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
name: 'Vault',
|
|
key: 'vault',
|
|
url: `/project/${ref}/integrations/vault/secrets`,
|
|
items: [],
|
|
label: 'BETA',
|
|
},
|
|
...(!!(queuesUiEnabled && pgmqExtensionExists)
|
|
? [
|
|
{
|
|
name: 'Queues',
|
|
key: 'queues',
|
|
url: `/project/${ref}/integrations/queues`,
|
|
items: [],
|
|
},
|
|
]
|
|
: []),
|
|
],
|
|
},
|
|
]
|
|
}
|