Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,15 @@ <h5 class="card-title mb-0 text-uppercase label-header">
container="body"
placement="top"
tooltipClass="utm-tooltip-top"></i>

<app-alert-apply-incident (markAsIncident)="onSuccessMarkAsIncident($event)"
*ngIf="dataType !== eventDataTypeEnum.INCIDENT"
[alert]="alert"
[eventType]="dataType"
[multiple]="false">
</app-alert-apply-incident>
<i (click)="openIncidentResponseAutomationModal(alert)"
[ngbTooltip]="'Create incident response automation'"
[ngbTooltip]="'Create Flow'"
class="cursor-pointer icon-terminal text-blue-800"
container="body"
placement="top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ export class AlertViewComponent implements OnInit, OnDestroy {
}

openIncidentResponseAutomationModal(alert: UtmAlertType) {
const modal = this.modalService.open(IrCreateRuleComponent, {size: 'lg', centered: true});
modal.componentInstance.alert = alert;
this.router.navigate(['soar/create-flow'], {
queryParams:{alertName:alert.name}
})
}

getFilterTime() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {UtmAlertType} from '../../../../../../shared/types/alert/utm-alert.type'
import {AlertUpdateHistoryBehavior} from '../../../behavior/alert-update-history.behavior';
import {EventDataTypeEnum} from '../../../enums/event-data-type.enum';
import {AlertManagementService} from '../../../services/alert-management.service';

@Component({
selector: 'app-alert-apply-incident',
templateUrl: './alert-apply-incident.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,25 @@ export class PlaybookBuilderComponent implements OnInit, OnDestroy {
this.utmToastService.showError('Error', 'An error has occurred while fetching a rule');
});

this.route.queryParams
.pipe(
filter(params => !!params && !!params.alertName),
map(params => params.alertName)).subscribe((alertName)=>{
this.addRuleCondition();
const rc = this.ruleConditions.at(this.ruleConditions.length-1);
rc.patchValue({
field: 'name',
value: alertName,
});
});

this.formRule.get('name').valueChanges.pipe(debounceTime(1000)).subscribe(value => {
this.searchRule(this.rulePrefix + value);
});
}



get ruleConditions() {
return this.formRule.get('conditions') as FormArray;
}
Expand Down