diff --git a/apps/docs/spec/analytics_v0_config.yaml b/apps/docs/spec/analytics_v0_config.yaml index 1207dc95aed..be5a9c8ffd4 100644 --- a/apps/docs/spec/analytics_v0_config.yaml +++ b/apps/docs/spec/analytics_v0_config.yaml @@ -34,16 +34,7 @@ parameters: default: '' type: 'string' description: | - Allows you to pass in an API key that will used for authentication for ingestion only. This is intended for programmatic usage where an external program sets the API key. A default ingestion API key will be automatically generated. - - id: 'LOGFLARE_PRIVATE_ACCESS_TOKEN' # {string} A unique identifier for this param. - title: 'LOGFLARE_PRIVATE_ACCESS_TOKEN' # {string} Any name. - tags: ['general'] # {string[]} These tags are useful for grouping parameters - links: [] # {string[]} These tags are useful for grouping parameters - required: true - default: '' - type: 'string' - description: | - Allows you to pass in an Management API key that will used for authentication. This is intended for programmatic usage where an external program sets the API key. This key is considered secret. + Allows you to pass in an API key that will used for authentication. This is intended for programmatic usage where an external program sets the API key. If this value is not provided, the default API key will be automatically generated. - id: 'LOGFLARE_SUPABASE_MODE' # {string} A unique identifier for this param. title: 'LOGFLARE_SUPABASE_MODE' # {string} Any name. tags: ['general'] # {string[]} These tags are useful for grouping parameters diff --git a/apps/docs/spec/functions_v0_config.yaml b/apps/docs/spec/functions_v0_config.yaml index bae7d2557b0..664981e24bb 100644 --- a/apps/docs/spec/functions_v0_config.yaml +++ b/apps/docs/spec/functions_v0_config.yaml @@ -14,3 +14,24 @@ info: - id: general title: General Settings description: General server settings. + +# This section is an array of public functions which a user might need to execute. +parameters: + - id: 'LOGFLARE_SINGLE_TENANT' # {string} A unique identifier for this param. + title: 'LOGFLARE_SINGLE_TENANT' # {string} Any name. + tags: ['general'] # {string[]} These tags are useful for grouping parameters + links: [] # {string[]} These tags are useful for grouping parameters + required: true + default: 'true' + type: 'boolean' + description: | + This is will seed a singular user into the database, and will disable browser authentication. All browser usage will default to this user. Inviting team users and other team-related functionality is currently not supported for self-hosted. Logflare self-hosted is currently intended for single-user experience only. + - id: 'LOGFLARE_PUBLIC_ACCESS_TOKEN' # {string} A unique identifier for this param. + title: 'LOGFLARE_PUBLIC_ACCESS_TOKEN' # {string} Any name. + tags: ['general'] # {string[]} These tags are useful for grouping parameters + links: [] # {string[]} These tags are useful for grouping parameters + required: true + default: '' + type: 'string' + description: | + Allows you to pass in an API key that will used for authentication. This is intended for programmatic usage where an external program sets the API key. It is advised to use the UI to configure the access tokens instead. If this value is not provided, the default API key will be automatically generated. diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx index 7a87fc4ef69..77fa65d0b88 100644 --- a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx +++ b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx @@ -5,7 +5,7 @@ import { useForm } from 'react-hook-form' import { toast } from 'sonner' import { z } from 'zod' -import { useFlag, useParams } from 'common' +import { IS_PLATFORM, useFlag, useParams } from 'common' import { DocsButton } from 'components/ui/DocsButton' import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query' import { DOCS_URL } from 'lib/constants' @@ -265,7 +265,8 @@ export function LogDrainDestinationSheetForm({ // Temp check to make sure the name is unique const logDrainName = form.getValues('name') - const logDrainExists = logDrains?.find((drain) => drain.name === logDrainName) + const logDrainExists = + !!logDrains?.length && logDrains?.find((drain) => drain.name === logDrainName) if (logDrainExists && mode === 'create') { toast.error('Log drain name already exists') return @@ -569,7 +570,9 @@ export function LogDrainDestinationSheetForm({