Commit e86dfcf5 by Carl Bergquist

rename mavgoptions to more generic pipelineaggs

parent 8e18f2c5
......@@ -13,21 +13,21 @@ function (angular, _, queryDef) {
$scope.metricAggTypes = queryDef.metricAggTypes;
$scope.extendedStats = queryDef.extendedStats;
$scope.mavgOptions = [];
$scope.pipelineAggOptions = [];
$scope.init = function() {
$scope.agg = metricAggs[$scope.index];
$scope.validateModel();
$scope.updateMavgOptions();
$scope.updatePipelineAggOptions();
};
$scope.updateMavgOptions = function() {
$scope.mavgOptions = queryDef.getMovingAverageOptions($scope.target);
$scope.updatePipelineAggOptions = function() {
$scope.pipelineAggOptions = queryDef.getMovingAverageOptions($scope.target);
};
$rootScope.onAppEvent('elastic-query-updated', function() {
$scope.index = _.indexOf(metricAggs, $scope.agg);
$scope.updateMavgOptions();
$scope.updatePipelineAggOptions();
$scope.validateModel();
}, $scope);
......@@ -78,7 +78,7 @@ function (angular, _, queryDef) {
$scope.toggleOptions = function() {
$scope.showOptions = !$scope.showOptions;
$scope.updateMavgOptions();
$scope.updatePipelineAggOptions();
};
$scope.onChangeInternal = function() {
......
......@@ -33,7 +33,7 @@
Based on
</li>
<li>
<metric-segment-model property="agg.pipelineAgg" options="mavgOptions" on-change="onChangeInternal()" css-class="last"></metric-segment-model>
<metric-segment-model property="agg.pipelineAgg" options="pipelineAggOptions" on-change="onChangeInternal()" css-class="last"></metric-segment-model>
</li>
</ul>
<div class="clearfix"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment