Commit 918ea5d1 by Torkel Ödegaard

Annotation: filter field is not interpreting in elasticsearch query, Fixes #661

parent 3b7551e1
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
- [Issue #450](https://github.com/grafana/grafana/issues/450). Graph: Tooltip does not disappear sometimes and would get stuck - [Issue #450](https://github.com/grafana/grafana/issues/450). Graph: Tooltip does not disappear sometimes and would get stuck
- [Issue #655](https://github.com/grafana/grafana/issues/655). General: Auto refresh not initiated / started after dashboard loading - [Issue #655](https://github.com/grafana/grafana/issues/655). General: Auto refresh not initiated / started after dashboard loading
- [Issue #657](https://github.com/grafana/grafana/issues/657). General: Fix for refresh icon in IE browsers - [Issue #657](https://github.com/grafana/grafana/issues/657). General: Fix for refresh icon in IE browsers
- [Issue #661](https://github.com/grafana/grafana/issues/661). Annotations: Elasticsearch querystring with filter template replacements was not interpolated
# 1.7.0-rc1 (2014-08-05) # 1.7.0-rc1 (2014-08-05)
......
...@@ -73,8 +73,9 @@ function (angular, _, $, config, kbn, moment) { ...@@ -73,8 +73,9 @@ function (angular, _, $, config, kbn, moment) {
to: rangeUnparsed.to, to: rangeUnparsed.to,
}; };
var queryInterpolated = filterSrv.applyTemplateToTarget(queryString);
var filter = { "bool": { "must": [{ "range": range }] } }; var filter = { "bool": { "must": [{ "range": range }] } };
var query = { "bool": { "should": [{ "query_string": { "query": queryString } }] } }; var query = { "bool": { "should": [{ "query_string": { "query": queryInterpolated } }] } };
var data = { "query" : { "filtered": { "query" : query, "filter": filter } }, "size": 100 }; var data = { "query" : { "filtered": { "query" : query, "filter": filter } }, "size": 100 };
return this._request('POST', '/_search', annotation.index, data).then(function(results) { return this._request('POST', '/_search', annotation.index, data).then(function(results) {
......
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