From e8cdf23e13614fa7fd12b34dffedcaed9c4753c4 Mon Sep 17 00:00:00 2001 From: Matias Chomicki Date: Wed, 17 Sep 2025 17:06:23 +0200 Subject: [PATCH] LogListControls: add logLevels prop --- .../app/features/logs/components/panel/LogListControls.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/app/features/logs/components/panel/LogListControls.tsx b/public/app/features/logs/components/panel/LogListControls.tsx index 18c905a02c9..b65903ef1e8 100644 --- a/public/app/features/logs/components/panel/LogListControls.tsx +++ b/public/app/features/logs/components/panel/LogListControls.tsx @@ -27,6 +27,7 @@ import { ScrollToLogsEvent } from './virtualization'; type Props = { eventBus: EventBus; visualisationType?: LogsVisualisationType; + logLevels?: LogLevel[]; }; const DEDUP_OPTIONS = [ @@ -46,7 +47,7 @@ const FILTER_LEVELS: LogLevel[] = [ LogLevel.unknown, ]; -export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props) => { +export const LogListControls = ({ eventBus, logLevels = FILTER_LEVELS, visualisationType = 'logs' }: Props) => { const { app, controlsExpanded, @@ -56,6 +57,7 @@ export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props) fontSize, forceEscape, hasUnescapedContent, + logOptionsStorageKey, prettifyJSON, setControlsExpanded, setDedupStrategy, @@ -73,7 +75,6 @@ export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props) sortOrder, syntaxHighlighting, wrapLogMessage, - logOptionsStorageKey, } = useLogListContext(); const { hideSearch, searchVisible, showSearch } = useLogListSearchContext(); @@ -209,7 +210,7 @@ export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props) label={t('logs.logs-controls.display-level-all', 'All levels')} onClick={() => onFilterLevelClick()} /> - {FILTER_LEVELS.map((level) => ( + {logLevels.map((level) => (