diff --git a/public/app/features/org/datasourceEditCtrl.js b/public/app/features/org/datasourceEditCtrl.js index dd526f69308..b7f141f480e 100644 --- a/public/app/features/org/datasourceEditCtrl.js +++ b/public/app/features/org/datasourceEditCtrl.js @@ -13,7 +13,7 @@ function (angular, _, config) { $scope.httpConfigPartialSrc = 'app/features/org/partials/datasourceHttpConfig.html'; - var defaults = {name: '', type: 'graphite', url: '', access: 'proxy', jsonData: {'elasticsearchVersion': 2} }; + var defaults = {name: '', type: 'graphite', url: '', access: 'proxy', jsonData: {}}; $scope.indexPatternTypes = [ {name: 'No pattern', value: undefined}, @@ -24,8 +24,7 @@ function (angular, _, config) { {name: 'Yearly', value: 'Yearly', example: '[logstash-]YYYY'}, ]; - $scope.elasticsearchVersions = [ - {name: '0.x', value: 0}, + $scope.esVersions = [ {name: '1.x', value: 1}, {name: '2.x', value: 2}, ]; diff --git a/public/app/plugins/datasource/elasticsearch/datasource.js b/public/app/plugins/datasource/elasticsearch/datasource.js index 642195130cd..1d846a7be17 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.js +++ b/public/app/plugins/datasource/elasticsearch/datasource.js @@ -23,11 +23,11 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes this.name = datasource.name; this.index = datasource.index; this.timeField = datasource.jsonData.timeField; - this.elasticsearchVersion = datasource.jsonData.elasticsearchVersion; + this.esVersion = datasource.jsonData.esVersion; this.indexPattern = new IndexPattern(datasource.index, datasource.jsonData.interval); this.queryBuilder = new ElasticQueryBuilder({ timeField: this.timeField, - elasticsearchVersion: this.elasticsearchVersion + esVersion: this.esVersion, }); } diff --git a/public/app/plugins/datasource/elasticsearch/partials/config.html b/public/app/plugins/datasource/elasticsearch/partials/config.html index ef596a4deef..81acd03809c 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/config.html +++ b/public/app/plugins/datasource/elasticsearch/partials/config.html @@ -34,10 +34,10 @@