grafana/public/app/core/logs_model.ts
David Kaltschmidt 76a3b1a793 Explore: highlight typed text in suggestions
- use react-highlight-words
- add highlighting (color and border) to the matching substring of the
  suggested items in the typeahead
- extracted match finding from logging datasource
- created new utils/text.ts class for text-related functions
- added more types
2018-10-09 12:33:25 +02:00

30 lines
462 B
TypeScript

export enum LogLevel {
crit = 'crit',
warn = 'warn',
err = 'error',
error = 'error',
info = 'info',
debug = 'debug',
trace = 'trace',
}
export interface LogSearchMatch {
start: number;
length: number;
text: string;
}
export interface LogRow {
key: string;
entry: string;
logLevel: LogLevel;
timestamp: string;
timeFromNow: string;
timeLocal: string;
searchWords?: string[];
}
export interface LogsModel {
rows: LogRow[];
}