diff --git a/public/app/features/panel/panel_helper.js b/public/app/features/panel/panel_helper.js index 4cc7a9c3415..7287acd7b44 100644 --- a/public/app/features/panel/panel_helper.js +++ b/public/app/features/panel/panel_helper.js @@ -59,7 +59,9 @@ function (angular, _, $, kbn, dateMath, rangeUtil) { scope.resolution = Math.ceil($(window).width() * (scope.panel.span / 12)); } - scope.interval = kbn.calculateInterval(scope.range, scope.resolution, scope.panel.interval); + var panelInterval = scope.panel.interval; + var datasourceInterval = (scope.datasource || {}).interval; + scope.interval = kbn.calculateInterval(scope.range, scope.resolution, panelInterval || datasourceInterval); }; this.applyPanelTimeOverrides = function(scope) { diff --git a/public/app/plugins/datasource/elasticsearch/datasource.js b/public/app/plugins/datasource/elasticsearch/datasource.js index 8a5dc0a0551..72eaa4fcfd6 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.js +++ b/public/app/plugins/datasource/elasticsearch/datasource.js @@ -26,6 +26,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes this.timeField = datasource.jsonData.timeField; this.esVersion = datasource.jsonData.esVersion; this.indexPattern = new IndexPattern(datasource.index, datasource.jsonData.interval); + this.interval = datasource.jsonData.timeInterval; this.queryBuilder = new ElasticQueryBuilder({ timeField: this.timeField, esVersion: this.esVersion, diff --git a/public/app/plugins/datasource/elasticsearch/partials/config.html b/public/app/plugins/datasource/elasticsearch/partials/config.html index 6e6c00f3bd8..d08a83238ad 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/config.html +++ b/public/app/plugins/datasource/elasticsearch/partials/config.html @@ -31,7 +31,7 @@
-
+
+ +
+ +
+