Browse Source

UI: Improvement rule notification alarm

pull/7911/head
Vladyslav_Prykhodko 4 years ago
parent
commit
ec11d4174b
  1. 2
      ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalations.component.html
  2. 35
      ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.html
  3. 15
      ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.scss

2
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalations.component.html

@ -38,7 +38,7 @@
<span translate fxLayoutAlign="center center" <span translate fxLayoutAlign="center center"
class="tb-prompt">notification.no-rule</span> class="tb-prompt">notification.no-rule</span>
</div> </div>
<div *ngIf="!disabled" style="padding-top: 16px;"> <div *ngIf="!disabled" style="padding: 16px 0;">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="button" type="button"
(click)="addEscalation()"> (click)="addEscalation()">

35
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.html

@ -77,10 +77,30 @@
<ng-template #alarmTargesConfig> <ng-template #alarmTargesConfig>
<fieldset class="fields-group tb-hierarchy" formGroupName="recipientsConfig"> <fieldset class="fields-group tb-hierarchy" formGroupName="recipientsConfig">
<legend translate>notification.notification-chain</legend> <legend translate>notification.notification-chain</legend>
<div class="mat-body-2" translate>notification.targets</div>
<tb-escalations-component formControlName="escalationTable"></tb-escalations-component> <tb-escalations-component formControlName="escalationTable"></tb-escalations-component>
<ng-container *ngTemplateOutlet="clearRules"></ng-container>
</fieldset> </fieldset>
</ng-template> </ng-template>
</form> </form>
<ng-template #clearRules>
<form [formGroup]="alarmTemplateForm">
<section formGroupName="triggerConfig">
<section formGroupName="clearRule">
<div class="mat-body-2" translate>notification.clear-rule</div>
<mat-form-field fxFlex class="mat-block" floatLabel="always" style="margin-right: 48px">
<mat-label translate>alarm.alarm-status-list</mat-label>
<mat-select formControlName="alarmStatuses" multiple
placeholder="{{ !alarmTemplateForm.get('triggerConfig.clearRule.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}">
<mat-option *ngFor="let searchStatus of alarmSearchStatuses" [value]="searchStatus">
{{ alarmSearchStatusTranslationMap.get(searchStatus) | translate }}
</mat-option>
</mat-select>
</mat-form-field>
</section>
</section>
</form>
</ng-template>
</mat-step> </mat-step>
<mat-step [stepControl]="alarmTemplateForm" <mat-step [stepControl]="alarmTemplateForm"
*ngIf="ruleNotificationForm.get('triggerType').value === triggerType.ALARM"> *ngIf="ruleNotificationForm.get('triggerType').value === triggerType.ALARM">
@ -97,7 +117,7 @@
formControlName="alarmTypes"> formControlName="alarmTypes">
</tb-string-items-list> </tb-string-items-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field fxFlex class="mat-block clear-button-space" floatLabel="always">
<mat-label translate>alarm.alarm-severity-list</mat-label> <mat-label translate>alarm.alarm-severity-list</mat-label>
<mat-select formControlName="alarmSeverities" multiple <mat-select formControlName="alarmSeverities" multiple
placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}"> placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}">
@ -107,19 +127,6 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</fieldset> </fieldset>
<fieldset class="fields-group tb-margin-2" formGroupName="clearRule" *ngIf="countRecipientsChainConfig() > 1">
<legend translate>notification.clear-rule</legend>
<mat-form-field fxFlex class="mat-block" floatLabel="always">
<mat-label translate>alarm.alarm-status-list</mat-label>
<mat-select formControlName="alarmStatuses" multiple
placeholder="{{ !alarmTemplateForm.get('triggerConfig.clearRule.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}">
<mat-option *ngFor="let searchStatus of alarmSearchStatuses" [value]="searchStatus">
{{ alarmSearchStatusTranslationMap.get(searchStatus) | translate }}
</mat-option>
</mat-select>
</mat-form-field>
</fieldset>
</section> </section>
</form> </form>
<form [formGroup]="ruleNotificationForm"> <form [formGroup]="ruleNotificationForm">

15
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.scss

@ -38,10 +38,6 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
&.tb-margin-2 {
margin-bottom: 24px;
}
&.tb-hierarchy { &.tb-hierarchy {
padding: 0 0 8px 16px; padding: 0 0 8px 16px;
} }
@ -51,6 +47,15 @@
color: rgba(0, 0, 0, .7); color: rgba(0, 0, 0, .7);
width: fit-content; width: fit-content;
} }
.mat-body-2 {
margin-bottom: 8px;
color: rgba(0,0,0,.76);
}
.clear-button-space {
margin-right: 48px;
}
} }
::ng-deep { ::ng-deep {
@ -71,7 +76,7 @@
} }
.mat-horizontal-content-container { .mat-horizontal-content-container {
height: 550px; height: 700px;
max-height: 100%; max-height: 100%;
width: 100%;; width: 100%;;
overflow-y: auto; overflow-y: auto;

Loading…
Cancel
Save