mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
Datasource/Loki: Fix issue where annotation queries weren't getting their variables interpolated (#20702)
Closes #20667
This commit is contained in:
parent
616e2eb29f
commit
d6ef02b3b3
@ -581,7 +581,8 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
|
||||
return [];
|
||||
}
|
||||
|
||||
const query = { refId: `annotation-${options.annotation.name}`, expr: options.annotation.expr };
|
||||
const interpolatedExpr = this.templateSrv.replace(options.annotation.expr, {}, this.interpolateQueryExpr);
|
||||
const query = { refId: `annotation-${options.annotation.name}`, expr: interpolatedExpr };
|
||||
const { data } = await this.runRangeQueryWithFallback(query, options).toPromise();
|
||||
const annotations: AnnotationEvent[] = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user