offer template variables for tags

This commit is contained in:
Brian Gann
2018-02-15 11:49:26 -06:00
committed by Dan Cech
parent b316dfea98
commit fa193fa888

View File

@@ -348,6 +348,10 @@ export class GraphiteQueryCtrl extends QueryCtrl {
let tagKey = tag.key;
return this.datasource.getTagValuesAutoComplete(tagExpressions, tagKey, valuePrefix).then(values => {
let altValues = _.map(values, 'text');
// Add template variables as additional values
_.eachRight(this.templateSrv.variables, variable => {
altValues.push('${' + variable.name + ':regex}');
});
return mapToDropdownOptions(altValues);
});
}