Explorar o código

support template variables with multiple values

bergquist %!s(int64=7) %!d(string=hai) anos
pai
achega
19c7dd9834
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      public/app/plugins/datasource/grafana/datasource.ts

+ 5 - 2
public/app/plugins/datasource/grafana/datasource.ts

@@ -57,8 +57,11 @@ class GrafanaDatasource {
         return this.$q.when([]);
       }
       const tags = [];
-      for (let t of params.tags) {
-        tags.push(this.templateSrv.replace(t));
+      for (const t of params.tags) {
+        const renderedValues = this.templateSrv.replace(t, {}, 'pipe');
+        for (const tt of renderedValues.split('|')) {
+          tags.push(tt);
+        }
       }
       params.tags = tags;
     }