Skip to content

Commit cdfcebe

Browse files
authored
Bugfix/10.2/402 incident response trigger select cause modal scroll (#420)
* Fixed Incident-response-trigger-select-cause-modal-scroll (#402) * Fixed Auditor crash try to parse (#405) * Fixed Incident-response-trigger-select-cause-modal-scroll (#402)
1 parent 386b684 commit cdfcebe

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,14 @@
181181
<div class="d-flex mt-3 flex-column">
182182
<div class="alert alert-info alert-styled-right mb-2 info-dismissible">
183183
<span class="font-weight-semibold">Info! </span>
184-
<span>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.</span>
184+
<span>Select the agent handling strategy for the automation. If <strong>not active</strong>, commands will run on specified platform agents if the trigger conditions and dataSource field value of the alert match. Alternatively, choose a <strong>default agent</strong> to run the automation if no other agent matches the criteria. If this option is <strong>active</strong>, commands will run only on specified platform agents if the trigger conditions and dataSource field value of the alert match, if not, the <strong>automation won't be executed</strong>.</span>
185185
</div>
186186
<app-utm-toggle (toggleChange)="onChangeToggle($event)"
187187
[active]="formRule.get('agentType').value"
188188
[emitAtStart]="false"
189189
[customClass]="'pl-3'"
190190
[label]="'Run on specific agent'"></app-utm-toggle>
191+
191192
</div>
192193
<div *ngIf="!formRule.get('agentType').value" class="d-flex mt-2 flex-column">
193194
<div class="col-12 p-0">

frontend/src/app/incident-response/shared/component/ir-create-rule/ir-create-rule.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class IrCreateRuleComponent implements OnInit {
8181
this.ruleConditions.push(ruleCondition);
8282
this.getAgents(this.formRule.get('agentPlatform').value);
8383
this.formRule.get('excludedAgents').setValue(this.rule.excludedAgents);
84-
this.formRule.get('agentType').setValue(this.rule.excludedAgents.length === 0);
84+
this.formRule.get('agentType').setValue(this.rule.excludedAgents.length === 0 && this.rule.defaultAgent !== '');
8585
this.formRule.get('defaultAgent').setValue(this.rule.defaultAgent);
8686
}
8787
} else if (this.alert) {
@@ -163,8 +163,12 @@ export class IrCreateRuleComponent implements OnInit {
163163

164164
getAgents(platform: any) {
165165
this.formRule.get('excludedAgents').setValue([]);
166+
this.formRule.get('defaultAgent').setValue('');
166167
this.utmNetScanService.query({page: 0, size: 10000, agent: true, osPlatform: platform}).subscribe(response => {
167168
this.agents = response.body;
169+
if (this.agents.length === 1) {
170+
this.formRule.get('excludedAgents').disable();
171+
}
168172
});
169173
}
170174

@@ -286,7 +290,7 @@ export class IrCreateRuleComponent implements OnInit {
286290
}
287291

288292
onChangeToggle($event) {
289-
if ($event ) {
293+
if ($event) {
290294
this.formRule.get('excludedAgents').setValue([]);
291295
} else {
292296
this.formRule.get('defaultAgent').setValue('');

frontend/src/app/incident-response/shared/component/ir-summary/ir-summary.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</span>
2020

2121

22-
<ng-container *ngIf="!agentType">
22+
<ng-container *ngIf="!agentType && excludedAgents.length > 0">
2323
<span>
2424
Importantly, the automation excludes designated agents, such as
2525
</span>
@@ -30,8 +30,8 @@
3030

3131
<ng-container *ngIf="agentType">
3232
<span>
33-
In case none of the agents satisfy the specified conditions, the automation will smoothly revert and execute on the default agent,
34-
<span class="badge p-1 border-1 badge-flat font-weight-light border-info-800 text-info-800 mr-2 mb-2">
33+
In case that none of the agents satisfy the specified conditions, the automation will smoothly revert and execute on the default agent
34+
<span class="badge p-1 border-1 badge-flat font-weight-light border-info-800 text-info-800 mr-2">
3535
{{ defaultAgent | uppercase}}.
3636
</span>
3737
<span>
@@ -50,7 +50,7 @@
5050

5151
<div class="d-flex p-0 flex-column">
5252
<div class="col-12 p-0">
53-
<div class="alert alert-info alert-styled-right mt-2 info-dismissible">
53+
<div class="alert alert-warning alert-styled-right mb-2 mt-3 alert-dismissible">
5454
<span class="font-weight-semibold">Info! </span>
5555
<span>Please carefully review all presented changes, such as this one, before saving. Any oversight may lead to potential damage to your infrastructure.</span>
5656
</div>

0 commit comments

Comments
 (0)