diff --git a/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.html b/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.html index cde64423f..f520c1ede 100644 --- a/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.html +++ b/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.html @@ -181,13 +181,14 @@
Info! - Select the agent handling strategy for the automation. By default (not active), commands will run on specified platform agents if the trigger conditions and dataSource field value of the alert match. Alternatively, choose a default agent to run the automation if no other agent matches the criteria. If this option is active, commands will run only on specified platform agents if the trigger conditions and dataSource field value of the alert match, if not, the automation won't be executed. + Select the agent handling strategy for the automation. If not active, commands will run on specified platform agents if the trigger conditions and dataSource field value of the alert match. Alternatively, choose a default agent to run the automation if no other agent matches the criteria. If this option is active, commands will run only on specified platform agents if the trigger conditions and dataSource field value of the alert match, if not, the automation won't be executed.
+
diff --git a/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.ts b/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.ts index 6b44515da..5fb312c7a 100644 --- a/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.ts +++ b/frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.ts @@ -81,7 +81,7 @@ export class IrCreateRuleComponent implements OnInit { this.ruleConditions.push(ruleCondition); this.getAgents(this.formRule.get('agentPlatform').value); this.formRule.get('excludedAgents').setValue(this.rule.excludedAgents); - this.formRule.get('agentType').setValue(this.rule.excludedAgents.length === 0); + this.formRule.get('agentType').setValue(this.rule.excludedAgents.length === 0 && this.rule.defaultAgent !== ''); this.formRule.get('defaultAgent').setValue(this.rule.defaultAgent); } } else if (this.alert) { @@ -163,8 +163,12 @@ export class IrCreateRuleComponent implements OnInit { getAgents(platform: any) { this.formRule.get('excludedAgents').setValue([]); + this.formRule.get('defaultAgent').setValue(''); this.utmNetScanService.query({page: 0, size: 10000, agent: true, osPlatform: platform}).subscribe(response => { this.agents = response.body; + if (this.agents.length === 1) { + this.formRule.get('excludedAgents').disable(); + } }); } @@ -286,7 +290,7 @@ export class IrCreateRuleComponent implements OnInit { } onChangeToggle($event) { - if ($event ) { + if ($event) { this.formRule.get('excludedAgents').setValue([]); } else { this.formRule.get('defaultAgent').setValue(''); diff --git a/frontend/src/app/incident-response/shared/component/ir-summary/ir-summary.component.html b/frontend/src/app/incident-response/shared/component/ir-summary/ir-summary.component.html index fd495e823..777e97e04 100644 --- a/frontend/src/app/incident-response/shared/component/ir-summary/ir-summary.component.html +++ b/frontend/src/app/incident-response/shared/component/ir-summary/ir-summary.component.html @@ -19,7 +19,7 @@ - + Importantly, the automation excludes designated agents, such as @@ -30,8 +30,8 @@ - In case none of the agents satisfy the specified conditions, the automation will smoothly revert and execute on the default agent, - + In case that none of the agents satisfy the specified conditions, the automation will smoothly revert and execute on the default agent + {{ defaultAgent | uppercase}}. @@ -50,7 +50,7 @@
-
+
Info! Please carefully review all presented changes, such as this one, before saving. Any oversight may lead to potential damage to your infrastructure.