From 0fcc87010ab732079ed4f78912abc1fc8a73637c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 31 Jul 2017 22:30:49 +0200 Subject: [PATCH 1/2] fix: cloudwatch fix for templating namespace argument to metrics tempalting function, fixes #8965 --- public/app/plugins/datasource/cloudwatch/datasource.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/cloudwatch/datasource.js b/public/app/plugins/datasource/cloudwatch/datasource.js index 60c7e167a06..c3ecc2e5594 100644 --- a/public/app/plugins/datasource/cloudwatch/datasource.js +++ b/public/app/plugins/datasource/cloudwatch/datasource.js @@ -210,12 +210,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?([^,]+?)\)/); From e9989cb690da3491621c72fbf08dac459e06fd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 31 Jul 2017 22:33:22 +0200 Subject: [PATCH 2/2] fix: make it easier to close search by clicking outside result container, fixes #8848 --- public/app/core/components/grafana_app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/components/grafana_app.ts b/public/app/core/components/grafana_app.ts index 5a677094754..f910e124a49 100644 --- a/public/app/core/components/grafana_app.ts +++ b/public/app/core/components/grafana_app.ts @@ -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'); });