Browse Source

Merge branch 'master' of github.com:grafana/grafana

Torkel Ödegaard 9 năm trước cách đây
mục cha
commit
91c5515d5b

+ 4 - 0
public/app/plugins/datasource/elasticsearch/datasource.js

@@ -74,6 +74,10 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
         to: options.range.to.valueOf(),
         to: options.range.to.valueOf(),
       };
       };
 
 
+      if (this.esVersion >= 2) {
+        range[timeField]["format"] = "epoch_millis";
+      }
+
       var queryInterpolated = templateSrv.replace(queryString);
       var queryInterpolated = templateSrv.replace(queryString);
       var filter = { "bool": { "must": [{ "range": range }] } };
       var filter = { "bool": { "must": [{ "range": range }] } };
       var query = { "bool": { "should": [{ "query_string": { "query": queryInterpolated } }] } };
       var query = { "bool": { "should": [{ "query_string": { "query": queryInterpolated } }] } };