support template variables with multiple values

This commit is contained in:
bergquist
2018-09-11 14:25:25 +02:00
parent 6ba5550f5f
commit 19c7dd9834
@@ -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;
}