mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Context This is largely just a mechanical change here: Opting to use lucide icons with the `Icon` suffix across all icon imports within `studio` - so that it’s clearer which components are icons + reduces the possibility of name collision with our own components - e.g <User /> vs <UserIcon /> Also added a eslint rule for this: <img width="1069" height="167" alt="image" src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc" /> And updated `AGENTS.md` as such: ``` Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced). ```
142 lines
3.2 KiB
TypeScript
142 lines
3.2 KiB
TypeScript
import { components } from 'api-types'
|
|
import { Axiom, Datadog, Grafana, Last9, Otlp, Sentry } from 'icons'
|
|
import { BracesIcon, CloudIcon, ServerIcon } from 'lucide-react'
|
|
|
|
const iconProps = {
|
|
height: 24,
|
|
width: 24,
|
|
className: 'text-foreground-light',
|
|
}
|
|
|
|
export type LogDrainType = components['schemas']['CreateBackendParamsOpenapi']['type']
|
|
|
|
export const LOG_DRAIN_TYPES = [
|
|
{
|
|
value: 'webhook',
|
|
name: 'Custom Endpoint',
|
|
description: 'Forward logs as a POST request to a custom HTTP endpoint',
|
|
icon: <BracesIcon {...iconProps} />,
|
|
},
|
|
{
|
|
value: 'otlp',
|
|
name: 'OpenTelemetry Protocol (OTLP)',
|
|
description: 'Send logs to any OpenTelemetry Protocol (OTLP) compatible endpoint',
|
|
icon: <Otlp {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'datadog',
|
|
name: 'Datadog',
|
|
description: 'Datadog is a monitoring service for cloud-scale applications',
|
|
icon: <Datadog {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'loki',
|
|
name: 'Loki',
|
|
description:
|
|
'Loki is an open-source log aggregation system designed to store and query logs from multiple sources',
|
|
icon: <Grafana {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 's3',
|
|
name: 'Amazon S3',
|
|
description: 'Forward logs to an S3 bucket',
|
|
icon: <CloudIcon {...iconProps} />,
|
|
},
|
|
{
|
|
value: 'sentry',
|
|
name: 'Sentry',
|
|
description:
|
|
'Sentry is an application monitoring service that helps developers identify and debug performance issues and errors',
|
|
icon: <Sentry {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'axiom',
|
|
name: 'Axiom',
|
|
description:
|
|
'Axiom is a data platform designed to efficiently collect, store, and analyze event and telemetry data at massive scale.',
|
|
icon: <Axiom {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'last9',
|
|
name: 'Last9',
|
|
description: 'Last9 is an observability platform for monitoring and telemetry data',
|
|
icon: <Last9 {...iconProps} fill="currentColor" />,
|
|
},
|
|
{
|
|
value: 'syslog',
|
|
name: 'Syslog',
|
|
description: 'Forward logs to a remote Syslog receiver using TCP or TLS, adhering to RFC 5424',
|
|
icon: <ServerIcon {...iconProps} />,
|
|
},
|
|
] as const
|
|
|
|
export const LOG_DRAIN_SOURCE_VALUES = LOG_DRAIN_TYPES.map((source) => source.value)
|
|
|
|
export const DATADOG_REGIONS = [
|
|
{
|
|
label: 'AP1',
|
|
value: 'AP1',
|
|
},
|
|
{
|
|
label: 'AP2',
|
|
value: 'AP2',
|
|
},
|
|
{
|
|
label: 'EU',
|
|
value: 'EU',
|
|
},
|
|
{
|
|
label: 'UK1',
|
|
value: 'UK1',
|
|
},
|
|
{
|
|
label: 'US1',
|
|
value: 'US1',
|
|
},
|
|
{
|
|
label: 'US1-FED',
|
|
value: 'US1-FED',
|
|
},
|
|
{
|
|
label: 'US2-FED',
|
|
value: 'US2-FED',
|
|
},
|
|
{
|
|
label: 'US3',
|
|
value: 'US3',
|
|
},
|
|
{
|
|
label: 'US5',
|
|
value: 'US5',
|
|
},
|
|
] as const
|
|
|
|
export const LAST9_REGIONS = [
|
|
{
|
|
label: 'US West 1',
|
|
value: 'US-WEST-1',
|
|
},
|
|
{
|
|
label: 'AP South 1',
|
|
value: 'AP-SOUTH-1',
|
|
},
|
|
] as const
|
|
|
|
export type LogDrainDatadogConfig = {
|
|
api_key: string
|
|
region: string
|
|
}
|
|
|
|
export type LogDrainWebhookConfig = {
|
|
url: string
|
|
}
|
|
|
|
export const OTLP_PROTOCOLS = [{ label: 'HTTP/Protobuf', value: 'http/protobuf' }] as const
|
|
|
|
export type LogDrainOtlpConfig = {
|
|
endpoint: string
|
|
protocol?: string
|
|
gzip?: boolean
|
|
headers?: Record<string, string>
|
|
}
|