Logs sample: Fix scrolling for unwrapped log lines (#64163)

Fix scrolling for logs sample
This commit is contained in:
Ivana Huckova 2023-03-07 11:08:50 +01:00 committed by GitHub
parent fa0f640d6a
commit 7b01668729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,16 +95,18 @@ export function LogsSamplePanel(props: Props) {
LogsSamplePanelContent = (
<>
<OpenInSplitViewButton />
<LogRows
logRows={logs.rows}
dedupStrategy={LogsDedupStrategy.none}
showLabels={store.getBool(SETTINGS_KEYS.showLabels, false)}
showTime={store.getBool(SETTINGS_KEYS.showTime, true)}
wrapLogMessage={store.getBool(SETTINGS_KEYS.wrapLogMessage, true)}
prettifyLogMessage={store.getBool(SETTINGS_KEYS.prettifyLogMessage, false)}
timeZone={timeZone}
enableLogDetails={true}
/>
<div className={styles.logContainer}>
<LogRows
logRows={logs.rows}
dedupStrategy={LogsDedupStrategy.none}
showLabels={store.getBool(SETTINGS_KEYS.showLabels, false)}
showTime={store.getBool(SETTINGS_KEYS.showTime, true)}
wrapLogMessage={store.getBool(SETTINGS_KEYS.wrapLogMessage, true)}
prettifyLogMessage={store.getBool(SETTINGS_KEYS.prettifyLogMessage, false)}
timeZone={timeZone}
enableLogDetails={true}
/>
</div>
</>
);
}
@ -122,4 +124,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
top: ${theme.spacing(1)};
right: ${theme.spacing(1)}; ;
`,
logContainer: css`
overflow-x: scroll;
`,
});