Commit 73a1a262 by Torkel Ödegaard

Merge branch 'v4.4.x'

parents 91a533d9 e9989cb6
......@@ -192,7 +192,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
// hide search
if (body.find('.search-container').length > 0) {
if (target.parents('.search-container').length === 0) {
if (target.parents('.search-results-container').length === 0) {
scope.$apply(function() {
scope.appEvent('hide-dash-search');
});
......
......@@ -219,12 +219,12 @@ function (angular, _, moment, dateMath, kbn, templatingVariable, CloudWatchAnnot
var metricNameQuery = query.match(/^metrics\(([^\)]+?)(,\s?([^,]+?))?\)/);
if (metricNameQuery) {
return this.getMetrics(metricNameQuery[1], metricNameQuery[3]);
return this.getMetrics(templateSrv.replace(metricNameQuery[1]), templateSrv.replace(metricNameQuery[3]));
}
var dimensionKeysQuery = query.match(/^dimension_keys\(([^\)]+?)(,\s?([^,]+?))?\)/);
if (dimensionKeysQuery) {
return this.getDimensionKeys(dimensionKeysQuery[1], dimensionKeysQuery[3]);
return this.getDimensionKeys(templateSrv.replace(dimensionKeysQuery[1]), templateSrv.replace(dimensionKeysQuery[3]));
}
var dimensionValuesQuery = query.match(/^dimension_values\(([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?([^,]+?)\)/);
......
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