Commit 141f22be by carl bergquist

feat(elasticsearch): display more info in options

parent 4fa92198
......@@ -40,12 +40,17 @@ function (angular, _, queryDef) {
if (queryDef.isPipelineAgg($scope.agg.type)) {
$scope.agg.pipelineAgg = $scope.agg.pipelineAgg || 'select metric';
$scope.agg.field = $scope.agg.pipelineAgg;
$scope.settingsLinkText = 'Options';
_.each(queryDef.getPipelineOptions($scope.agg), function(opt) {
$scope.agg.settings[opt.text] = $scope.agg.settings[opt.text] || opt.default;
});
var appliedAgg = _.findWhere(metricAggs, { id: $scope.agg.pipelineAgg });
if (appliedAgg) {
$scope.settingsLinkText = 'Options: Based on => ' + queryDef.describeMetric(appliedAgg);
} else {
$scope.settingsLinkText = 'Options';
}
} else if (!$scope.agg.field) {
$scope.agg.field = 'select field';
}
......
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