From 28017557f851b9d2c7579e8138fe0f227d50d572 Mon Sep 17 00:00:00 2001 From: Sinisa Andric Date: Thu, 22 Dec 2022 23:04:02 +0100 Subject: [PATCH] Fetch only Rules matching Rule Types Signed-off-by: Sinisa Andric --- 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, + } }, }, },