From 6a166b3baee07792351fb932b4871b4d20ffa89f Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Sun, 11 May 2025 14:54:46 +0800 Subject: [PATCH] prep for log type --- .../interfaces/logs-new/constants.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/logs-new/constants.tsx b/apps/studio/components/interfaces/logs-new/constants.tsx index 1b6d84ae461..1f577c51f0e 100644 --- a/apps/studio/components/interfaces/logs-new/constants.tsx +++ b/apps/studio/components/interfaces/logs-new/constants.tsx @@ -21,7 +21,7 @@ import { SheetTimingPhases } from 'components/interfaces/DataTableDemo/infinite/ // custom imports import type { LogsMeta } from './query-options' -import { type ColumnSchema } from './schema' +import { type ColumnSchema, LOG_TYPES } from './schema' // instead of filterFields, maybe just 'fields' with a filterDisabled prop? // that way, we could have 'message' or 'headers' field with label and value as well as type! @@ -55,6 +55,23 @@ export const filterFields = [ ) }, }, + { + label: 'Log Type', + value: 'log_type', + type: 'checkbox', + defaultOpen: true, + options: LOG_TYPES.map((type) => ({ label: type, value: type })), + component: (props: Option) => { + return ( +
+ + {props.label} + + {props.value} +
+ ) + }, + }, { label: 'Host', value: 'host',