set the default value of the showAnalyzedWarning in fieldparam

This commit is contained in:
Stéphane Campinas 2016-12-08 16:29:46 +00:00
parent 30901820de
commit 0d924fc73d
No known key found for this signature in database
GPG key ID: 8272664236A42C2F
2 changed files with 2 additions and 5 deletions

View file

@ -86,11 +86,7 @@ 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;
}
$aggParamEditorsScope.showAnalyzedWarning = param.showAnalyzedWarning;
} else if (param.type === 'field') {
fields = $aggParamEditorsScope[`${param.name}Options`] = param.getFieldOptions($scope.agg);
}

View file

@ -20,6 +20,7 @@ export default function FieldAggParamFactory(Private, $filter) {
FieldAggParam.prototype.filterFieldTypes = '*';
// retain only the fields with the aggregatable property if the onlyAggregatable option is true
FieldAggParam.prototype.onlyAggregatable = true;
FieldAggParam.prototype.showAnalyzedWarning = true;
/**
* Called to serialize values for saving an aggConfig object