From df4a5aeaf1d5fea40b5688416f7a4260ecdf6cf8 Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Thu, 7 Nov 2024 09:54:50 +0100 Subject: [PATCH] PluginExtensions: Logs panel takes full height/width (#95825) Making the log panel taking full space of page. --- .../features/plugins/extensions/logs/LogViewer.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/public/app/features/plugins/extensions/logs/LogViewer.tsx b/public/app/features/plugins/extensions/logs/LogViewer.tsx index 155a97611d5..917c773c7a7 100644 --- a/public/app/features/plugins/extensions/logs/LogViewer.tsx +++ b/public/app/features/plugins/extensions/logs/LogViewer.tsx @@ -1,5 +1,6 @@ import { nanoid } from 'nanoid'; import { ReactElement, useState } from 'react'; +import AutoSizer from 'react-virtualized-auto-sizer'; import { sceneUtils, VizConfigBuilders } from '@grafana/scenes'; import { @@ -21,7 +22,7 @@ const DATASOURCE_REF = { type: 'grafana-extensionslog-datasource', }; -const logsViz = VizConfigBuilders.logs().build(); +const logsViz = VizConfigBuilders.logs().setOption('wrapLogMessage', true).build(); sceneUtils.registerRuntimeDataSource({ dataSource: new ExtensionsLogDataSource(DATASOURCE_REF.type, DATASOURCE_REF.uid, log), @@ -54,9 +55,13 @@ function LogViewScene(): ReactElement | null { navId="extensions" actions={} > - - - + + {({ height, width }) => ( + + + + )} + ); }