Просмотр исходного кода

Set time when testing ES datasource, fixes #7044 (#7390)

lpic 9 лет назад
Родитель
Сommit
5b699dbf0d
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      public/app/plugins/datasource/elasticsearch/datasource.js

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

@@ -168,6 +168,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
     };
     };
 
 
     this.testDatasource = function() {
     this.testDatasource = function() {
+      timeSrv.setTime({ from: 'now-1m', to: 'now' });
       return this._get('/_stats').then(function() {
       return this._get('/_stats').then(function() {
         return { status: "success", message: "Data source is working", title: "Success" };
         return { status: "success", message: "Data source is working", title: "Success" };
       }, function(err) {
       }, function(err) {