Commit f28af4f3 by Torkel Ödegaard

OpenTSDB: another improvement to OpenTSDB query -> query result matching

parent 1bd23819
......@@ -180,11 +180,13 @@ function (angular, _, kbn) {
}
function mapMetricsToTargets(metrics, targets) {
var interpolatedTagValue;
return _.map(metrics, function(metricData) {
return _.findIndex(targets, function(target) {
return target.metric === metricData.metric &&
_.all(target.tags, function(tagV, tagK) {
return metricData.tags[tagK] === tagV || tagV === "*";
interpolatedTagValue = templateSrv.replace(tagV);
return metricData.tags[tagK] === interpolatedTagValue || interpolatedTagValue === "*";
});
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment