mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(loki-monaco-editor): add support for in_aggregation situation (#56680)
This commit is contained in:
parent
33eb4a2807
commit
6a74cd207a
@ -75,11 +75,9 @@ describe('situation', () => {
|
||||
labels: [{ name: 'level', value: 'info', op: '=' }],
|
||||
});
|
||||
|
||||
/*
|
||||
Currently failing, reason unknown
|
||||
assertSituation('sum(^)', {
|
||||
type: 'IN_AGGREGATION',
|
||||
});*/
|
||||
});
|
||||
});
|
||||
|
||||
it('handles label names', () => {
|
||||
|
@ -17,6 +17,8 @@ import {
|
||||
Identifier,
|
||||
Grouping,
|
||||
Expr,
|
||||
LiteralExpr,
|
||||
MetricExpr,
|
||||
} from '@grafana/lezer-logql';
|
||||
|
||||
type Direction = 'parent' | 'firstChild' | 'lastChild' | 'nextSibling';
|
||||
@ -162,7 +164,7 @@ const RESOLVERS: Resolver[] = [
|
||||
fun: resolveLogRangeFromError,
|
||||
},
|
||||
{
|
||||
path: [ERROR_NODE_ID, VectorAggregationExpr],
|
||||
path: [ERROR_NODE_ID, LiteralExpr, MetricExpr, VectorAggregationExpr, MetricExpr, Expr, LogQL],
|
||||
fun: () => ({ type: 'IN_AGGREGATION' }),
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user