Remove value list exception operators from new terms exception builder (#137202)

This commit is contained in:
Marshall Main 2022-07-26 12:40:49 -07:00 committed by GitHub
parent 42d396627e
commit 20be0da426
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -40,6 +40,7 @@ import { useRuleIndices } from '../../../../detections/containers/detection_engi
import {
hasEqlSequenceQuery,
isEqlRule,
isNewTermsRule,
isThresholdRule,
} from '../../../../../common/detection_engine/utils';
import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas';
@ -519,7 +520,9 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({
)}
{getExceptionBuilderComponentLazy({
allowLargeValueLists:
!isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type),
!isEqlRule(maybeRule?.type) &&
!isThresholdRule(maybeRule?.type) &&
!isNewTermsRule(maybeRule?.type),
httpService: http,
autocompleteService: unifiedSearch.autocomplete,
exceptionListItems: initialExceptionItems,

View file

@ -38,6 +38,7 @@ import { useRuleIndices } from '../../../../detections/containers/detection_engi
import {
hasEqlSequenceQuery,
isEqlRule,
isNewTermsRule,
isThresholdRule,
} from '../../../../../common/detection_engine/utils';
import { useFetchIndex } from '../../../containers/source';
@ -370,7 +371,9 @@ export const EditExceptionFlyout = memo(function EditExceptionFlyout({
)}
{getExceptionBuilderComponentLazy({
allowLargeValueLists:
!isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type),
!isEqlRule(maybeRule?.type) &&
!isThresholdRule(maybeRule?.type) &&
!isNewTermsRule(maybeRule?.type),
httpService: http,
autocompleteService: unifiedSearch.autocomplete,
exceptionListItems: [exceptionItem],