Templating: Replace all '$tag' in tag values query (#28343)

This commit is contained in:
Krzysztof Dąbrowski
2020-10-17 21:12:05 +02:00
committed by GitHub
parent fb516ecf64
commit 0941649566
@@ -119,7 +119,7 @@ const fetchTagValues = (tagText: string): ThunkResult<Promise<string[]>> => {
const variable = getVariable<QueryVariableModel>(picker.id, getState());
const datasource = await getDataSourceSrv().get(variable.datasource ?? '');
const query = variable.tagValuesQuery.replace('$tag', tagText);
const query = variable.tagValuesQuery.replace(/\$tag/g, tagText);
const options = { range: getTimeRange(variable), variable };
if (!datasource.metricFindQuery) {