Skip to content

Commit dffce38

Browse files
committed
fix[frontend](soar): remove legacy automation route and update audit link to use flow editor
1 parent ce283c0 commit dffce38

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

frontend/src/app/incident-response/incident-response-routing.module.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {NgModule} from '@angular/core';
22
import {RouterModule, Routes} from '@angular/router';
33
import {UserRouteAccessService} from '../core/auth/user-route-access-service';
44
import {ADMIN_ROLE} from '../shared/constants/global.constant';
5-
import {IncidentResponseAutomationComponent} from './incident-response-automation/incident-response-automation.component';
65
import {IncidentResponseViewComponent} from './incident-response-view/incident-response-view.component';
76
import {PlaybookBuilderComponent} from './playbook-builder/playbook-builder.component';
87
import {PlaybooksComponent} from './playbooks/playbooks.component';
@@ -16,12 +15,6 @@ const routes: Routes = [
1615
canActivate: [UserRouteAccessService],
1716
data: {authorities: [ADMIN_ROLE]}
1817
},
19-
{
20-
path: 'automation',
21-
component: IncidentResponseAutomationComponent,
22-
canActivate: [UserRouteAccessService],
23-
data: {authorities: [ADMIN_ROLE]}
24-
},
2518
{
2619
path: 'create-flow',
2720
component: PlaybookBuilderComponent,

frontend/src/app/incident-response/incident-response-view/incident-response-view.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ <h5 class="card-title mb-0 text-uppercase label-header">Incident Response Audit<
120120
[ngbTooltip]="'Related '+ command.originType + ' id'"
121121
placement="top"
122122
tooltipClass="utm-tooltip-top"
123-
[routerLink]="'/soar/automation'"
123+
[routerLink]="'/soar/create-flow'"
124124
[queryParams]="{id: command.originId}">
125125
{{command.originId}}
126126
</span>

frontend/src/app/incident-response/playbook-builder/playbook-builder.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ export class PlaybookBuilderComponent implements OnInit, OnDestroy {
6969
agentType: [false],
7070
excludedAgents: [[]],
7171
defaultAgent: [''],
72-
agentPlatform: ['', Validators.required]
72+
agentPlatform: ['', Validators.required],
73+
shell: ['cmd']
7374
});
7475
this.viewportHeight = window.innerHeight;
7576
}
@@ -108,7 +109,7 @@ export class PlaybookBuilderComponent implements OnInit, OnDestroy {
108109
this.rulePrefix = getElementPrefix(this.rule.name);
109110

110111

111-
this.formRule.patchValue(ruleData, { emitEvent: false });
112+
this.formRule.patchValue(ruleData);
112113

113114
const name = this.formRule.get('name').value;
114115
this.formRule.get('name').setValue(this.replacePrefixInName(name));

frontend/src/app/incident-response/shared/component/action-builder/action-builder.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ <h4 class="panel-title m-0">Flow Actions</h4>
9595
</div>
9696
</div>
9797

98+
<div *ngIf="group.get('agentPlatform').value && group.get('agentPlatform').value.toLowerCase() === 'windows'"
99+
class="row mt-3">
100+
<div class="col-3">
101+
<label class="pb-1">Shell</label>
102+
<select formControlName="shell" class="form-control">
103+
<option value="cmd">cmd</option>
104+
<option value="powershell">powershell</option>
105+
</select>
106+
</div>
107+
</div>
108+
98109
<div class="d-flex mt-2 mb-3 flex-column">
99110
<div *ngIf="group.get('agentType').value" class="col-12 p-0">
100111
<div class="alert alert-info alert-styled-right mt-2 info-dismissible">

frontend/src/app/incident-response/shared/component/action-builder/action-builder.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component, Input, OnDestroy, OnInit} from '@angular/core';
22
import {FormGroup} from '@angular/forms';
33
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
44
import {Observable, of, Subject} from 'rxjs';
5-
import {catchError, finalize, map, takeUntil, tap} from 'rxjs/operators';
5+
import {catchError, filter, finalize, map, takeUntil, tap} from 'rxjs/operators';
66
import {UtmNetScanService} from '../../../../assets-discover/shared/services/utm-net-scan.service';
77
import {NetScanType} from '../../../../assets-discover/shared/types/net-scan.type';
88
import {UtmToastService} from '../../../../shared/alert/utm-toast.service';
@@ -50,6 +50,16 @@ export class ActionBuilderComponent implements OnInit, OnDestroy {
5050
this.group.get('command').setValue(command);
5151
})
5252
);
53+
54+
this.group.get('agentPlatform').valueChanges
55+
.pipe(
56+
takeUntil(this.destroy$),
57+
filter(val => !!val)
58+
)
59+
.subscribe(platform => {
60+
this.loadingAgents = true;
61+
this.agents$ = this.fetchAgents(platform);
62+
});
5363
}
5464

5565
getPlatforms() {

0 commit comments

Comments
 (0)