From 005e14a060af39d7999f11f43ff59c7e96b7a09c Mon Sep 17 00:00:00 2001 From: carl bergquist Date: Thu, 10 Dec 2015 17:12:52 +0100 Subject: [PATCH] refactor(elasticsearch): mavg naming -> pipeline agg --- public/app/plugins/datasource/elasticsearch/metric_agg.js | 2 +- public/app/plugins/datasource/elasticsearch/query_def.js | 2 +- .../datasource/elasticsearch/specs/query_def_specs.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/app/plugins/datasource/elasticsearch/metric_agg.js b/public/app/plugins/datasource/elasticsearch/metric_agg.js index 8bd1b596245..dedb2436b11 100644 --- a/public/app/plugins/datasource/elasticsearch/metric_agg.js +++ b/public/app/plugins/datasource/elasticsearch/metric_agg.js @@ -22,7 +22,7 @@ function (angular, _, queryDef) { }; $scope.updatePipelineAggOptions = function() { - $scope.pipelineAggOptions = queryDef.getMovingAverageOptions($scope.target); + $scope.pipelineAggOptions = queryDef.getPipelineAggOptions($scope.target); }; $rootScope.onAppEvent('elastic-query-updated', function() { diff --git a/public/app/plugins/datasource/elasticsearch/query_def.js b/public/app/plugins/datasource/elasticsearch/query_def.js index 2cd7e97e145..f5f4cc600e4 100644 --- a/public/app/plugins/datasource/elasticsearch/query_def.js +++ b/public/app/plugins/datasource/elasticsearch/query_def.js @@ -92,7 +92,7 @@ function (_) { return false; }, - getMovingAverageOptions: function(targets) { + getPipelineAggOptions: function(targets) { var self = this; var result = []; _.each(targets.metrics, function(metric) { diff --git a/public/app/plugins/datasource/elasticsearch/specs/query_def_specs.ts b/public/app/plugins/datasource/elasticsearch/specs/query_def_specs.ts index cf375430ae1..7f8be653dfc 100644 --- a/public/app/plugins/datasource/elasticsearch/specs/query_def_specs.ts +++ b/public/app/plugins/datasource/elasticsearch/specs/query_def_specs.ts @@ -8,9 +8,9 @@ declare var QueryDef: any; describe('ElasticQueryDef', function() { - describe('getMovingAverageOptions', function() { + describe('getPipelineAggOptions', function() { describe('with zero targets', function() { - var response = QueryDef.getMovingAverageOptions([]); + var response = QueryDef.getPipelineAggOptions([]); it('should return zero', function() { expect(response.length).to.be(0); @@ -25,7 +25,7 @@ describe('ElasticQueryDef', function() { ] }; - var response = QueryDef.getMovingAverageOptions(targets); + var response = QueryDef.getPipelineAggOptions(targets); it('should return zero', function() { expect(response.length).to.be(2); @@ -40,7 +40,7 @@ describe('ElasticQueryDef', function() { ] }; - var response = QueryDef.getMovingAverageOptions(targets); + var response = QueryDef.getPipelineAggOptions(targets); it('should return zero', function() { expect(response.length).to.be(1);