From c4b869790acfbf4bb2fbb2ce4d11275fed7e8a69 Mon Sep 17 00:00:00 2001 From: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com> Date: Mon, 12 Feb 2024 09:35:03 -0600 Subject: [PATCH] Logs Panel: Table UI - better default column spacing (#82205) * add default width to time fields in logs table --- public/app/features/explore/Logs/LogsTable.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/app/features/explore/Logs/LogsTable.tsx b/public/app/features/explore/Logs/LogsTable.tsx index 0d7a0c85d71..37ad7591032 100644 --- a/public/app/features/explore/Logs/LogsTable.tsx +++ b/public/app/features/explore/Logs/LogsTable.tsx @@ -80,6 +80,7 @@ export function LogsTable(props: Props) { custom: { inspect: true, filterable: true, // This sets the columns to be filterable + width: getInitialFieldWidth(field), ...field.config.custom, }, // This sets the individual field value as filterable @@ -252,3 +253,10 @@ function getLabelFiltersTransform(labelFilters: Record) { } return null; } + +function getInitialFieldWidth(field: Field): number | undefined { + if (field.type === FieldType.time) { + return 200; + } + return undefined; +}