diff --git a/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx b/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx index e48be7a95c5..7d6b4798fdf 100644 --- a/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx +++ b/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx @@ -73,4 +73,4 @@ export const renderResponseSpeed = ( displayDateInUtc /> ) -} \ No newline at end of file +} diff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.ts index 24453835092..e0e5c686ec2 100644 --- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts +++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts @@ -1,7 +1,8 @@ import dayjs from 'dayjs' import { DatetimeHelper, FilterTableSet, LogTemplate } from '.' -export const LOGS_EXPLORER_DOCS_URL = "https://supabase.com/docs/guides/platform/logs#querying-with-the-logs-explorer" +export const LOGS_EXPLORER_DOCS_URL = + 'https://supabase.com/docs/guides/platform/logs#querying-with-the-logs-explorer' export const LOGS_LARGE_DATE_RANGE_DAYS_THRESHOLD = 4 @@ -276,19 +277,19 @@ export const SQL_FILTER_TEMPLATES: any = { }, auth_logs: { ..._SQL_FILTER_COMMON, - "severity.error": `REGEXP_CONTAINS(event_message, "level.{3}error|level.{3}fatal")`, - "severity.warning": `REGEXP_CONTAINS(event_message, "level.{3}warning")`, - "severity.info": `REGEXP_CONTAINS(event_message, "level.{3}info")`, - "status_code.server_error": `REGEXP_CONTAINS(event_message, "status.{3}5[0-9]{2}")`, - "status_code.client_error": `REGEXP_CONTAINS(event_message, "status.{3}4[0-9]{2}")`, - "status_code.redirection": `REGEXP_CONTAINS(event_message, "status.{3}3[0-9]{2}")`, - "status_code.success": `REGEXP_CONTAINS(event_message, "status.{3}2[0-9]{2}")`, - "endpoints.admin": `REGEXP_CONTAINS(event_message, "path.{3}/admin")`, - "endpoints.signup": `REGEXP_CONTAINS(event_message, "path.{3}/signup|path.{3}/invite|path.{3}/verify")`, - "endpoints.authentication": `REGEXP_CONTAINS(event_message, "path.{3}/token|path.{3}/authorize|path.{3}/callback|path.{3}/otp|path.{3}/magiclink")`, - "endpoints.recover": `REGEXP_CONTAINS(event_message, "path.{3}/recover")`, - "endpoints.user": `REGEXP_CONTAINS(event_message, "path.{3}/user")`, - "endpoints.logout": `REGEXP_CONTAINS(event_message, "path.{3}/logout")`, + 'severity.error': `REGEXP_CONTAINS(event_message, "level.{3}error|level.{3}fatal")`, + 'severity.warning': `REGEXP_CONTAINS(event_message, "level.{3}warning")`, + 'severity.info': `REGEXP_CONTAINS(event_message, "level.{3}info")`, + 'status_code.server_error': `REGEXP_CONTAINS(event_message, "status.{3}5[0-9]{2}")`, + 'status_code.client_error': `REGEXP_CONTAINS(event_message, "status.{3}4[0-9]{2}")`, + 'status_code.redirection': `REGEXP_CONTAINS(event_message, "status.{3}3[0-9]{2}")`, + 'status_code.success': `REGEXP_CONTAINS(event_message, "status.{3}2[0-9]{2}")`, + 'endpoints.admin': `REGEXP_CONTAINS(event_message, "path.{3}/admin")`, + 'endpoints.signup': `REGEXP_CONTAINS(event_message, "path.{3}/signup|path.{3}/invite|path.{3}/verify")`, + 'endpoints.authentication': `REGEXP_CONTAINS(event_message, "path.{3}/token|path.{3}/authorize|path.{3}/callback|path.{3}/otp|path.{3}/magiclink")`, + 'endpoints.recover': `REGEXP_CONTAINS(event_message, "path.{3}/recover")`, + 'endpoints.user': `REGEXP_CONTAINS(event_message, "path.{3}/user")`, + 'endpoints.logout': `REGEXP_CONTAINS(event_message, "path.{3}/logout")`, }, realtime_logs: { ..._SQL_FILTER_COMMON, @@ -301,7 +302,7 @@ export const SQL_FILTER_TEMPLATES: any = { }, pgbouncer_logs: { ..._SQL_FILTER_COMMON, - } + }, } export enum LogsTableName { @@ -312,8 +313,8 @@ export enum LogsTableName { AUTH = 'auth_logs', REALTIME = 'realtime_logs', STORAGE = 'storage_logs', - PGBOUNCER = "pgbouncer_logs", - POSTGREST = "postgrest_logs" + PGBOUNCER = 'pgbouncer_logs', + POSTGREST = 'postgrest_logs', } export const LOGS_TABLES = { @@ -325,7 +326,7 @@ export const LOGS_TABLES = { realtime: LogsTableName.REALTIME, storage: LogsTableName.STORAGE, postgrest: LogsTableName.POSTGREST, - pgbouncer: LogsTableName.PGBOUNCER + pgbouncer: LogsTableName.PGBOUNCER, } export const LOGS_SOURCE_DESCRIPTION = { @@ -587,7 +588,7 @@ export const FILTER_OPTIONS: FilterTableSet = { }, { key: 'recover', - label: "Password Recovery", + label: 'Password Recovery', description: 'Show all password recovery requests', }, { @@ -607,7 +608,7 @@ export const FILTER_OPTIONS: FilterTableSet = { }, ], }, - } + }, } export const LOGS_TAILWIND_CLASSES = { diff --git a/studio/components/interfaces/Settings/Logs/Logs.types.ts b/studio/components/interfaces/Settings/Logs/Logs.types.ts index 763ee651300..b31bb16bf08 100644 --- a/studio/components/interfaces/Settings/Logs/Logs.types.ts +++ b/studio/components/interfaces/Settings/Logs/Logs.types.ts @@ -84,8 +84,8 @@ export type QueryType = | 'auth' | 'realtime' | 'storage' - | "pgbouncer" - | "postgrest" + | 'pgbouncer' + | 'postgrest' export type Mode = 'simple' | 'custom' diff --git a/studio/components/layouts/ReportsLayout/ReportsMenu.utils.ts b/studio/components/layouts/ReportsLayout/ReportsMenu.utils.ts index 56615522c96..5b3adcab223 100644 --- a/studio/components/layouts/ReportsLayout/ReportsMenu.utils.ts +++ b/studio/components/layouts/ReportsLayout/ReportsMenu.utils.ts @@ -20,15 +20,15 @@ export const generateReportsMenu = (project?: Project): ProductMenuGroup[] => { }, { items: [ - ...(productReports - ? [ - { - name: 'API', - key: 'api-overview', - url: `/project/${ref}/reports/api-overview`, - items: [], - }, - ] + ...(productReports + ? [ + { + name: 'API', + key: 'api-overview', + url: `/project/${ref}/reports/api-overview`, + items: [], + }, + ] : []), { name: 'Database', diff --git a/studio/components/ui/Charts/AreaChart.stories.tsx b/studio/components/ui/Charts/AreaChart.stories.tsx index 599063c21ce..d83df2c34bb 100644 --- a/studio/components/ui/Charts/AreaChart.stories.tsx +++ b/studio/components/ui/Charts/AreaChart.stories.tsx @@ -26,8 +26,14 @@ export const AreaChart = () => ( { title: 'No title', props: { title: undefined } }, { title: 'Minimal Header', props: { minimalHeader: true } }, { title: 'Minimal Highlighted Value', props: { minimalHeader: true, highlightedValue: 123 } }, - { title: 'Highlighted Value', props: { highlightedValue: 123, highlightedLabel: "some custom label" } }, - { title: 'Formatter - Auto 2 Precision for floats', props: { data: DATA.map(d=> ({...d, ram_usage: d.ram_usage + 0.1231233})) } }, + { + title: 'Highlighted Value', + props: { highlightedValue: 123, highlightedLabel: 'some custom label' }, + }, + { + title: 'Formatter - Auto 2 Precision for floats', + props: { data: DATA.map((d) => ({ ...d, ram_usage: d.ram_usage + 0.1231233 })) }, + }, { title: 'UTC Dates', props: { displayDateInUtc: true } }, { title: 'Custom date format', props: { customDateFormat: 'HH:mm' } }, { title: 'Value format', props: { format: 'c' } }, diff --git a/studio/components/ui/Charts/BarChart.stories.tsx b/studio/components/ui/Charts/BarChart.stories.tsx index bb807af95c3..f6945cb54da 100644 --- a/studio/components/ui/Charts/BarChart.stories.tsx +++ b/studio/components/ui/Charts/BarChart.stories.tsx @@ -26,8 +26,14 @@ export const BarChart = () => ( { title: 'No title', props: { title: undefined } }, { title: 'Minimal Header', props: { minimalHeader: true } }, { title: 'Minimal Highlighted Value', props: { minimalHeader: true, highlightedValue: 123 } }, - { title: 'Highlighted Value', props: { highlightedValue: 123, highlightedLabel: "some custom label" } }, - { title: 'Formatter - Auto 2 Precision for floats', props: { data: DATA.map(d=> ({...d, ram_usage: d.ram_usage + 0.1231233})) } }, + { + title: 'Highlighted Value', + props: { highlightedValue: 123, highlightedLabel: 'some custom label' }, + }, + { + title: 'Formatter - Auto 2 Precision for floats', + props: { data: DATA.map((d) => ({ ...d, ram_usage: d.ram_usage + 0.1231233 })) }, + }, { title: 'UTC Dates', props: { displayDateInUtc: true } }, { title: 'Custom date format', props: { customDateFormat: 'HH:mm' } }, { title: 'Value format', props: { format: 'c' } }, diff --git a/studio/hooks/analytics/useDbQuery.tsx b/studio/hooks/analytics/useDbQuery.tsx index 7e70c6cab6b..1fab5b86eea 100644 --- a/studio/hooks/analytics/useDbQuery.tsx +++ b/studio/hooks/analytics/useDbQuery.tsx @@ -10,7 +10,10 @@ import { import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' import { executeSql } from 'data/sql/execute-sql-query' -type UseDbQuery = (sql: ReportQuery["sql"], params?: BaseReportParams) => [DbQueryData, DbQueryHandler] +type UseDbQuery = ( + sql: ReportQuery['sql'], + params?: BaseReportParams +) => [DbQueryData, DbQueryHandler] const useDbQuery: UseDbQuery = (sql, params = DEFAULT_QUERY_PARAMS) => { const { project } = useProjectContext()