mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Allow usage of template vars with service map query (#79382)
* Apply template vars to serviceMapQuery * Add test
This commit is contained in:
parent
d1db163bb5
commit
f053cc7aae
@ -79,6 +79,7 @@ describe('Tempo data source', () => {
|
||||
search: '$interpolationVar',
|
||||
minDuration: '$interpolationVar',
|
||||
maxDuration: '$interpolationVar',
|
||||
serviceMapQuery: '$interpolationVar',
|
||||
filters: [],
|
||||
};
|
||||
}
|
||||
@ -111,6 +112,7 @@ describe('Tempo data source', () => {
|
||||
expect(queries[0].search).toBe(text);
|
||||
expect(queries[0].minDuration).toBe(text);
|
||||
expect(queries[0].maxDuration).toBe(text);
|
||||
expect(queries[0].serviceMapQuery).toBe(text);
|
||||
});
|
||||
|
||||
it('when traceId query for template variable', async () => {
|
||||
|
@ -533,6 +533,7 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
||||
search: this.templateSrv.replace(query.search ?? '', scopedVars),
|
||||
minDuration: this.templateSrv.replace(query.minDuration ?? '', scopedVars),
|
||||
maxDuration: this.templateSrv.replace(query.maxDuration ?? '', scopedVars),
|
||||
serviceMapQuery: this.templateSrv.replace(query.serviceMapQuery ?? '', scopedVars),
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user