Skip to content

Commit 47f2c8c

Browse files
committed
feat(playbook-builder): update success and error messages for flow actions and adjust routing
1 parent 0f1d448 commit 47f2c8c

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ export class PlaybookBuilderComponent implements OnInit, OnDestroy {
178178
const actionError = 'creating';
179179
this.incidentResponseRuleService.create(this.formRule.value)
180180
.subscribe(() => {
181-
this.utmToastService.showSuccessBottom('Incident response automation ' + action + ' successfully');
182-
this.router.navigate(['incident-response/playbooks']);
181+
this.utmToastService.showSuccessBottom('Flow ' + action + ' successfully');
182+
this.router.navigate(['soar/flows']);
183183
}, () => this.errorSaving(actionError));
184184
}
185185

@@ -188,16 +188,16 @@ export class PlaybookBuilderComponent implements OnInit, OnDestroy {
188188
const actionError = 'editing';
189189
this.formRule.get('command').setValue(this.command);
190190
this.incidentResponseRuleService.update(this.formRule.value).subscribe(() => {
191-
this.utmToastService.showSuccessBottom('Incident response automation ' + action + ' successfully');
192-
this.router.navigate(['incident-response/playbooks']);
191+
this.utmToastService.showSuccessBottom('Flow ' + action + ' successfully');
192+
this.router.navigate(['soar/flows']);
193193
}, () => this.errorSaving(actionError));
194194
}
195195

196196
errorSaving(action: string) {
197197
const ruleName: string = this.formRule.get('name').value;
198198
this.formRule.get('name').setValue(this.replacePrefixInName(ruleName));
199-
this.utmToastService.showError('Error ' + action + ' incident automation',
200-
'An error has occur while trying to ' + action + ' an incident automation, please contact support team');
199+
this.utmToastService.showError('Error ' + action + ' flow',
200+
'An error has occur while trying to ' + action + ' an flow, please contact support team');
201201
}
202202

203203
ngOnDestroy(): void {

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ <h5 class="card-title mb-0 label-header">FLOWS</h5>
5858
<div class="d-flex flex-1 flex-column h-100 m-h-0">
5959
<div class="d-flex px-1 pt-3 h-100 m-h-0 justify-content-center playbooks-container">
6060
<div class="playbook-card" *ngFor="let item of playbookService.playbooks$ | async; trackBy: trackByFn">
61-
<div [routerLink]="['/soar/create-flow']"
62-
[queryParams]="{ id: item.id }" class="h-100 text-card-foreground shadow-sm transition-all d-flex flex-column rounded-lg border border-border bg-background p-3 cursor-pointer">
61+
<div class="h-100 text-card-foreground shadow-sm transition-all d-flex flex-column rounded-lg border border-border bg-background p-3 cursor-pointer">
6362
<div class="card-header p-0 pb-1 d-flex align-items-center gap-3">
6463
<div [ngClass]="{'bg-primary': item.active, 'bg-secondary': !item.active}" class="icon-code d-flex justify-content-center align-items-center">
6564
</div>
66-
<div class="d-flex flex-grow-1 justify-content-between">
65+
<div [routerLink]="['/soar/create-flow']"
66+
[queryParams]="{ id: item.id }" class="d-flex flex-grow-1 justify-content-between">
6767
<div class="d-flex flex-column">
6868
<div class="text-sm font-semibold">{{ item.name }}</div>
6969
<div class="truncate text-xs text-muted-foreground">{{ item.createdDate | relativeTime }}</div>
7070
</div>
7171
</div>
7272
<div autoClose="outside" class="action-playbook list-icons-item dropdown cursor-pointer"
7373
placement="bottom-right" ngbDropdown>
74-
<button class="btn btn-link p-0" ngbDropdownToggle>
74+
<button class="btn btn-link p-0 cursor-pointer" ngbDropdownToggle>
7575
<i class="icon-menu"></i>
7676
</button>
7777
<div ngbDropdownMenu>
@@ -92,7 +92,8 @@ <h5 class="card-title mb-0 label-header">FLOWS</h5>
9292
</div>
9393
</div>
9494
</div>
95-
<div class="flex-grow-1 overflow-hidden">
95+
<div [routerLink]="['/soar/create-flow']"
96+
[queryParams]="{ id: item.id }" class="flex-grow-1 overflow-hidden">
9697
<div
9798
class="text-sm"
9899
style="display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;">

frontend/src/app/incident-response/playbooks/playbooks.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,8 @@
133133
max-width: 16px;
134134
height: 100%;
135135
}
136+
137+
button[ngbDropdownToggle]:focus {
138+
outline: none;
139+
box-shadow: none;
140+
}

0 commit comments

Comments
 (0)