Skip to content

Commit

Permalink
object not need if rule not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmathia committed Jan 19, 2024
1 parent 3745472 commit 6b1305c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Kexa/services/analyse.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export function extractAddOnNeed(settingFileList: SettingFile[]){
settingFileList.forEach((ruleFile) => {
objectNameList[ruleFile.alert.global.name] = {};
ruleFile.rules.forEach((rule) => {
if(rule.applied === false) return;
if(!providerList.includes(rule.cloudProvider)) providerList.push(rule.cloudProvider);
if(!objectNameList[ruleFile.alert.global.name][rule.cloudProvider]) objectNameList[ruleFile.alert.global.name][rule.cloudProvider] = new Array<string>();
if(!objectNameList[ruleFile.alert.global.name][rule.cloudProvider].includes(rule.objectName)) objectNameList[ruleFile.alert.global.name][rule.cloudProvider].push(rule.objectName);
Expand Down

0 comments on commit 6b1305c

Please sign in to comment.