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

This commit is contained in:
Torkel Ödegaard 2014-08-08 07:19:03 +02:00
parent 5a125c7fe5
commit 3fffd08ae4
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@
- [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 #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)

View File

@ -73,8 +73,9 @@ function (angular, _, $, config, kbn, moment) {
to: rangeUnparsed.to,
};
var queryInterpolated = filterSrv.applyTemplateToTarget(queryString);
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 };
return this._request('POST', '/_search', annotation.index, data).then(function(results) {