|
|
|
@ -407,44 +407,58 @@ |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
<mat-step [stepControl]="edgeTemplateForm" |
|
|
|
*ngIf="ruleNotificationForm.get('triggerType').value === triggerType.EDGE_FAILURE"> |
|
|
|
|
|
|
|
<mat-step [stepControl]="edgeConnectivityTemplateForm" |
|
|
|
*ngIf="ruleNotificationForm.get('triggerType').value === triggerType.EDGE_CONNECTIVITY"> |
|
|
|
<ng-template matStepLabel>{{ 'notification.edge-trigger-settings' | translate }}</ng-template> |
|
|
|
<form [formGroup]="edgeTemplateForm"> |
|
|
|
<form [formGroup]="edgeConnectivityTemplateForm"> |
|
|
|
<section formGroupName="triggerConfig"> |
|
|
|
<fieldset class="fields-group tb-margin-before-field"> |
|
|
|
<legend translate>notification.filter</legend> |
|
|
|
<tb-string-items-list |
|
|
|
editable |
|
|
|
label="{{ 'alarm.alarm-type-list' | translate }}" |
|
|
|
placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmTypes').value?.length ? ('alarm.any-type' | translate) : '' }}" |
|
|
|
floatLabel="always" |
|
|
|
formControlName="alarmTypes"> |
|
|
|
</tb-string-items-list> |
|
|
|
|
|
|
|
<tb-entity-list |
|
|
|
formControlName="edges" |
|
|
|
subscriptSizing="dynamic" |
|
|
|
labelText="{{'edge.edge-instances' | translate}}" |
|
|
|
placeholderText="{{ 'edge.edge-instances' | translate }}" |
|
|
|
hint="{{ 'notification.edge-list-rule-hint' | translate }}" |
|
|
|
[entityType]="entityType.EDGE"> |
|
|
|
</tb-entity-list> |
|
|
|
<mat-form-field fxFlex class="mat-block" floatLabel="always"> |
|
|
|
<mat-label translate>alarm.alarm-severity-list</mat-label> |
|
|
|
<mat-select formControlName="alarmSeverities" multiple |
|
|
|
placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}"> |
|
|
|
<mat-option *ngFor="let alarmSeverity of alarmSeverities" [value]="alarmSeverity"> |
|
|
|
{{ alarmSeverityTranslationMap.get(alarmSeverity) | translate }} |
|
|
|
<mat-label translate>notification.notify-on</mat-label> |
|
|
|
<mat-select formControlName="notifyOn" multiple |
|
|
|
placeholder="{{ !edgeConnectivityTemplateForm.get('triggerConfig.notifyOn').value?.length ? ('event.all-events' | translate) : '' }}"> |
|
|
|
<mat-option *ngFor="let edgeEvent of edgeConnectivityEvents" [value]="edgeEvent"> |
|
|
|
{{ edgeConnectivityEventTranslationMap.get(edgeEvent) | translate }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
</fieldset> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>notification.notify-on</mat-label> |
|
|
|
<mat-select formControlName="notifyOn" multiple> |
|
|
|
<mat-option *ngFor="let alarmAction of alarmActions" [value]="alarmAction"> |
|
|
|
{{ alarmActionTranslationMap.get(alarmAction) | translate }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
<mat-error *ngIf="alarmTemplateForm.get('triggerConfig.notifyOn').hasError('required')"> |
|
|
|
{{ 'notification.notify-on-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
<form [formGroup]="ruleNotificationForm"> |
|
|
|
<section formGroupName="additionalConfig"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>notification.description</mat-label> |
|
|
|
<input matInput formControlName="description"> |
|
|
|
</mat-form-field> |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
</mat-step> |
|
|
|
|
|
|
|
<mat-step [stepControl]="edgeFailureTemplateForm" |
|
|
|
*ngIf="ruleNotificationForm.get('triggerType').value === triggerType.EDGE_FAILURE"> |
|
|
|
<ng-template matStepLabel>{{ 'notification.edge-trigger-settings' | translate }}</ng-template> |
|
|
|
<form [formGroup]="edgeFailureTemplateForm"> |
|
|
|
<section formGroupName="triggerConfig"> |
|
|
|
<fieldset class="fields-group tb-margin-before-field"> |
|
|
|
<legend translate>notification.filter</legend> |
|
|
|
<tb-entity-list labelText="{{'edge.edge-instances' | translate}}" |
|
|
|
[entityType]="entityType.EDGE" |
|
|
|
formControlName="edges"> |
|
|
|
</tb-entity-list> |
|
|
|
</fieldset> |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
<form [formGroup]="ruleNotificationForm"> |
|
|
|
<section formGroupName="additionalConfig"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
|