Skip to content

Commit

Permalink
fix post-rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Nov 12, 2024
1 parent 9e6c8d1 commit 7408045
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ import {
THREAT_MATCH_EMPTIES,
EQL_SEQUENCE_SUPPRESSION_GROUPBY_VALIDATION_TEXT,
} from './translations';
import { getQueryRequiredMessage } from './utils';
import {
ALERT_SUPPRESSION_DURATION_FIELD_NAME,
ALERT_SUPPRESSION_FIELDS_FIELD_NAME,
ALERT_SUPPRESSION_MISSING_FIELDS_FIELD_NAME,
} from '../../../rule_creation/components/alert_suppression_edit';
import * as alertSuppressionEditI81n from '../../../rule_creation/components/alert_suppression_edit/components/translations';
import { dataViewIdValidatorFactory } from '../../validators/data_view_id_validator_factory';
import { indexPatternValidatorFactory } from '../../validators/index_pattern_validator_factory';
import { queryRequiredValidatorFactory } from '../../validators/query_required_validator_factory';
import { kueryValidatorFactory } from '../../validators/kuery_validator_factory';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ import type { FieldSpec } from '@kbn/data-plugin/common';
* Keyword, Numeric, ip, boolean, or binary.
* https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html
*/
export const getTermsAggregationFields = (fields: FieldSpec[]): FieldSpec[] => {
export const getTermsAggregationFields = (fields: FieldSpec[]): FieldSpec[] =>
fields.filter(
(field) => field.aggregatable === true && ALLOWED_AGGREGATABLE_FIELD_TYPES_SET.has(field.type)
);

return fields.filter((field) => field.aggregatable === true && allowedTypesSet.has(field.type));
};

// binary types is excluded, as binary field has property aggregatable === false
const ALLOWED_AGGREGATABLE_FIELD_TYPES_SET = new Set(['string', 'number', 'ip', 'boolean']);

0 comments on commit 7408045

Please sign in to comment.