Chore: updates LogRows styles to prevent it from rendering context provider inappropriately

This commit is contained in:
Lukas Siatka
2020-05-07 01:26:12 +02:00
parent 1b2f76aa60
commit 59b06424c4
2 changed files with 2 additions and 7 deletions
@@ -91,14 +91,13 @@ class UnThemedLogRows extends PureComponent<Props, State> {
getFieldLinks,
} = this.props;
const { renderAll } = this.state;
const { logsRowsTable, logsRowsHorizontalScroll } = getLogRowStyles(theme);
const { logsRowsTable } = getLogRowStyles(theme);
const dedupedRows = deduplicatedRows ? deduplicatedRows : logRows;
const hasData = logRows && logRows.length > 0;
const dedupCount = dedupedRows
? dedupedRows.reduce((sum, row) => (row.duplicates ? sum + row.duplicates : sum), 0)
: 0;
const showDuplicates = dedupStrategy !== LogsDedupStrategy.none && dedupCount > 0;
const horizontalScrollWindow = wrapLogMessage ? '' : logsRowsHorizontalScroll;
// Staged rendering
const processedRows = dedupedRows ? dedupedRows : [];
@@ -111,7 +110,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
const getRowContext = this.props.getRowContext ? this.props.getRowContext : () => Promise.resolve([]);
return (
<div className={horizontalScrollWindow}>
<div>
<table className={logsRowsTable}>
<tbody>
{hasData &&
@@ -59,10 +59,6 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
font-size: ${theme.typography.size.sm};
width: 100%;
`,
logsRowsHorizontalScroll: css`
label: logs-rows__horizontal-scroll;
overflow: scroll;
`,
context: context,
logsRow: css`
label: logs-row;