Do not substitute #[A-Z] in graphite target when invalid ref (#5581)

* Do not substitute #[A-Z] in graphite target when invalid ref

In the case where #[A-Z] does not reference another query, such as #J when there
are only 2 queries, do not perform the substitution. This prevents the situation
target name without a query labelled J (10th query).

* Do not substitute #[A-Z] in graphite target when invalid ref

In the case where #[A-Z] does not reference another query, such as #J when there
are only 2 queries, do not perform the substitution. This prevents the situation
target name without a query labelled J (10th query).
This commit is contained in:
Jack Meagher
2016-07-14 04:29:22 -04:00
committed by Torkel Ödegaard
parent 82eebf64b6
commit 2c77f2231e

View File

@@ -228,7 +228,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
}
function nestedSeriesRegexReplacer(match, g1) {
return targets[g1];
return targets[g1] || match;
}
for (i = 0; i < options.targets.length; i++) {