Skip to content

Commit

Permalink
do not show the analyzed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
scampi committed Nov 19, 2016
1 parent f4200e1 commit 2dda53d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/core_plugins/kibana/public/visualize/editor/agg_params.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ uiModules
// if field param exists, compute allowed fields
if (param.name === 'field') {
fields = $aggParamEditorsScope.indexedFields;
$aggParamEditorsScope.showAnalyzedWarning = true;
if (!_.isUndefined(param.showAnalyzedWarning) && !param.showAnalyzedWarning) {
// if not explicitly set, always show the warning about analyzed field
$aggParamEditorsScope.showAnalyzedWarning = false;
}
} else if (param.type === 'field') {
fields = $aggParamEditorsScope[`${param.name}Options`] = param.getFieldOptions($scope.agg);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/agg_types/controls/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Field
</label>

<span class="pull-right text-warning hintbox-label" ng-show="agg.params.field.analyzed"
<span class="pull-right text-warning hintbox-label" ng-show="showAnalyzedWarning && agg.params.field.analyzed"
ng-click="showAnalyzedFieldWarning = !showAnalyzedFieldWarning">
<i class="fa fa-warning"></i> Analyzed Field
</span>
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/agg_types/metrics/top_hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default function AggTypeMetricTopProvider(Private) {
{
name: 'field',
onlyAggregatable: false,
showAnalyzedWarning: false,
filterFieldTypes: function (vis, value) {
if (vis.type.name === 'table' || vis.type.name === 'metric') {
return true;
Expand Down

0 comments on commit 2dda53d

Please sign in to comment.