From d03c12b875f64e270c62372e2cc0bbcdf12d161c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Sun, 8 Jan 2023 12:27:50 +0530 Subject: [PATCH] Fetch only Rules matching Rule Types (#262) (#272) Signed-off-by: Sinisa Andric Signed-off-by: Sinisa Andric (cherry picked from commit ec6526d9613631f1ca01cebf6dcd7ccacbdd0c98) Co-authored-by: Sinisa Andric Signed-off-by: AWSHurneyt --- public/pages/Rules/models/RulesViewModelActor.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/pages/Rules/models/RulesViewModelActor.ts b/public/pages/Rules/models/RulesViewModelActor.ts index 3b475fabe..01141e752 100644 --- a/public/pages/Rules/models/RulesViewModelActor.ts +++ b/public/pages/Rules/models/RulesViewModelActor.ts @@ -7,6 +7,7 @@ import { load, safeDump } from 'js-yaml'; import { RuleInfo } from '../../../../server/models/interfaces'; import { BrowserServices } from '../../../models/interfaces'; import { RuleItemInfoBase } from './types'; +import { ruleTypes } from "../utils/constants"; export interface RulesViewModel { allRules: RuleItemInfoBase[]; @@ -45,7 +46,9 @@ export class RulesViewModelActor { nested: { path: 'rule', query: { - match_all: {}, + terms: { + "rule.category": ruleTypes, + } }, }, },