mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Logs Explorer] Fix message field highlights due to the formatting issues (#171631)
## Summary Fixes the issue when the message is added as a filter, discover component surrounds the value with the <mark> tag in order to highlight the field. Since our message field is inside a `EuiCodeBlock` it cannot be highlighted and hence should not support adding of this tag. ### Before  ### After 
This commit is contained in:
parent
6788c1a684
commit
5d3c1bc2bb
1 changed files with 1 additions and 3 deletions
|
@ -5,7 +5,6 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { formatFieldValue } from '@kbn/discover-utils';
|
||||
import he from 'he';
|
||||
import * as constants from '../../../common/constants';
|
||||
import { useKibanaContextForPlugin } from '../../utils/use_kibana';
|
||||
import { FlyoutDoc, FlyoutProps, LogDocument } from './types';
|
||||
|
@ -34,8 +33,7 @@ export function useDocDetail(
|
|||
// Flyout Headers
|
||||
const level = formatField(constants.LOG_LEVEL_FIELD)?.toLowerCase();
|
||||
const timestamp = formatField(constants.TIMESTAMP_FIELD);
|
||||
const formattedMessage = formatField(constants.MESSAGE_FIELD);
|
||||
const message = formattedMessage ? he.decode(formattedMessage) : undefined;
|
||||
const message = doc.flattened[constants.MESSAGE_FIELD];
|
||||
|
||||
// Service Highlights
|
||||
const serviceName = formatField(constants.SERVICE_NAME_FIELD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue