mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
(feat/explore): Support for new LogQL filtering syntax (#16674)
* (feat/explore): Support for new LogQL filtering syntax
Loki is adding syntax to support chained filtering.
This PR adapts Grafana to support this.
- Send only `query` parameter in loki request
- Automatically wrap search text in simple syntax, e.g., `{} foo` is
sent as `{} |~ "foo"`.
* Adapted to regexp parameter staying on in Loki
* Dont wrap single regexp in new filter syntax
* Fix datasource test
* Fallback regexp parameter for legacy queries
* Fix search highlighting
* Make highlighting work for filter chains
* Fix datasource test
This commit is contained in:
@@ -21,7 +21,7 @@ export interface QueryResultMeta {
|
||||
requestId?: string;
|
||||
|
||||
// Used in Explore for highlighting
|
||||
search?: string;
|
||||
searchWords?: string[];
|
||||
|
||||
// Used in Explore to show limit applied to search result
|
||||
limit?: number;
|
||||
|
||||
@@ -194,7 +194,7 @@ export abstract class ExploreDataSourceApi<
|
||||
TOptions extends DataSourceJsonData = DataSourceJsonData
|
||||
> extends DataSourceApi<TQuery, TOptions> {
|
||||
modifyQuery?(query: TQuery, action: QueryFixAction): TQuery;
|
||||
getHighlighterExpression?(query: TQuery): string;
|
||||
getHighlighterExpression?(query: TQuery): string[];
|
||||
languageProvider?: any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user