mirror of
https://github.com/grafana/grafana.git
synced 2026-08-14 15:15:03 -05:00
Elasticsearch: Add log highlight processing on backend (#63924)
* Elasticsearch: Add highlight for logs * Fix running of queries trough backend only when shouldRunTroughBackend * Fix incorrect json in test string * Address feedback * Keep order of words same
This commit is contained in:
@@ -421,7 +421,9 @@ export function logSeriesToLogsModel(logSeries: DataFrame[], queries: DataQuery[
|
||||
|
||||
const hasUnescapedContent = !!message.match(/\\n|\\t|\\r/);
|
||||
|
||||
const searchWords = series.meta && series.meta.searchWords ? series.meta.searchWords : [];
|
||||
// Data sources that set up searchWords on backend use meta.custom.searchWords
|
||||
// Data sources that set up searchWords trough frontend can use meta.searchWords
|
||||
const searchWords = series.meta?.custom?.searchWords ?? series.meta?.searchWords ?? [];
|
||||
const entry = hasAnsi ? ansicolor.strip(message) : message;
|
||||
|
||||
const labels = getLabelsForFrameRow(info, j);
|
||||
|
||||
Reference in New Issue
Block a user