Logs Panel: Fix inconsistent higlighting (#28971)

* Highlight filter expression in panel

* Remove coonsole.log
pull/29065/head
Ivana Huckova 5 years ago committed by GitHub
parent 9f48bdb016
commit 812f588a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-ui/src/components/Logs/LogRowMessage.tsx

@ -86,7 +86,7 @@ class UnThemedLogRowMessage extends PureComponent<Props> {
const style = getLogRowStyles(theme, row.logLevel);
const { entry, hasAnsi, raw } = row;
const previewHighlights = highlighterExpressions && !_.isEqual(highlighterExpressions, row.searchWords);
const previewHighlights = highlighterExpressions?.length && !_.isEqual(highlighterExpressions, row.searchWords);
const highlights = previewHighlights ? highlighterExpressions : row.searchWords;
const needsHighlighter =
highlights && highlights.length > 0 && highlights[0] && highlights[0].length > 0 && entry.length < MAX_CHARACTERS;

Loading…
Cancel
Save