Explorar o código

offer template variables for tags

Brian Gann %!s(int64=7) %!d(string=hai) anos
pai
achega
fa193fa888
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      public/app/plugins/datasource/graphite/query_ctrl.ts

+ 4 - 0
public/app/plugins/datasource/graphite/query_ctrl.ts

@@ -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);
     });
   }