mirror of
https://github.com/grafana/grafana.git
synced 2025-01-24 23:37:01 -06:00
Implmented targetContainsTemplate for OpenTSDB
This commit is contained in:
parent
4c2f2eeb58
commit
62895114e1
@ -103,8 +103,24 @@ function (angular, _, dateMath) {
|
||||
};
|
||||
|
||||
this.targetContainsTemplate = function(target) {
|
||||
console.log(target);
|
||||
return false;
|
||||
// Checking for template variables in filters
|
||||
if (target.filters.length > 0) {
|
||||
for (var i = 0; i < target.filters.length; i++) {
|
||||
if (templateSrv.variableExists(target.filters[i].filter)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Checking for template variables in tags
|
||||
else if (Object.keys(target.tags).length > 0) {
|
||||
for (var tagKey in target.tags) {
|
||||
if (templateSrv.variableExists(target.tags[tagKey])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
this.performTimeSeriesQuery = function(queries, start, end) {
|
||||
|
Loading…
Reference in New Issue
Block a user