Skip to content

Commit 00688f2

Browse files
committed
feat: enhance playbook component with improved layout and functionality
Signed-off-by: Manuel Abascal <[email protected]>
1 parent 587f63d commit 00688f2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

frontend/src/app/incident-response/shared/component/new-playbook/new-playbook.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ <h2 id="radix-:rf8:" class="font-semibold tracking-tight line-clamp-1 flex items
1313
</div>
1414

1515
<div class="playbook-list-container m-h-0 d-flex flex-column gap-3 overflow-auto mt-3 px-1">
16-
<div *ngFor="let item of playbookService.playbooks$ | async; trackBy: trackByFn"
17-
class="playbook-item-card d-flex align-items-center rounded border p-3 cursor-pointer"
18-
[routerLink]="['/soar/create-flow']"
19-
[queryParams]="{ id: item.id, template: true }">
16+
<div (click)="createNewPlaybook({ id: item.id, template: true })" *ngFor="let item of playbookService.playbooks$ | async; trackBy: trackByFn"
17+
class="playbook-item-card d-flex align-items-center rounded border p-3 cursor-pointer">
2018

2119
<div class="playbook-icon-small d-flex justify-content-center align-items-center flex-shrink-0">
2220
<i class="fa fa-sitemap"></i>

frontend/src/app/incident-response/shared/component/new-playbook/new-playbook.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ export class NewPlaybookComponent implements OnInit, AfterViewInit {
4646
this.playbookService.loadData({...this.request});
4747
}
4848

49-
createNewPlaybook() {
50-
this.router.navigate(['/soar/create-flow']);
49+
createNewPlaybook(params?: any) {
50+
this.router.navigate(['/soar/create-flow'], { queryParams: params });
5151
this.activeModal.close();
5252
}
5353

5454
searchByRule($event: string | number) {
55-
56-
}
57-
58-
selectPlatform(platform: string) {
59-
55+
this.request['name.contains'] = $event;
56+
this.playbookService.loadData({
57+
...this.request,
58+
page: 0,
59+
});
6060
}
6161

6262
trackByFn(index: number, item: any) {

0 commit comments

Comments
 (0)