From 8cf1cc311261fa543e08f3dbeef0fdaaad9f8eb1 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 22 Mar 2023 13:11:16 +0200 Subject: [PATCH 1/4] UI: Minor change in notification --- .../recipient/recipient-notification-dialog.componet.scss | 6 +----- .../sent/sent-notification-dialog.component.html | 2 +- .../notification/sent/sent-notification-dialog.componet.ts | 6 ++++++ .../pages/notification/sent/sent-table-config.resolver.ts | 5 ++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss index 25d51c040b..8406cae3fe 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss +++ b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss @@ -42,12 +42,8 @@ .mat-mdc-radio-button { flex: 1 1 100%; padding: 4px; - border: 1px solid rgba(0, 0, 0, 0.1); + border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; - - &.mat-mdc-radio-checked { - border-color: map_get($tb-accent, 500); - } } } diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html index 3d7f0b8ef3..dfe68d6c26 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html @@ -112,7 +112,7 @@ notification.time - + diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts index b910a4cb99..66ed42a3b7 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts @@ -129,7 +129,13 @@ export class SentNotificationDialogComponent extends this.dialogTitle = 'notification.new-notification'; } if (data.request) { + this.notificationRequestForm.reset({}, {emitEvent: false}); this.notificationRequestForm.patchValue(this.data.request, {emitEvent: false}); + // eslint-disable-next-line guard-for-in + for (const method in this.data.request.template.configuration.deliveryMethodsTemplates) { + this.deliveryMethodFormsMap.get(NotificationDeliveryMethod[method]) + .patchValue(this.data.request.template.configuration.deliveryMethodsTemplates[method]); + } } } diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts index a71951a28b..285d6c1434 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts @@ -173,7 +173,7 @@ export class SentTableConfigResolver implements Resolve ${countError} ${this.translate.instant('notification.fails')} > `; @@ -182,8 +182,7 @@ export class SentTableConfigResolver implements Resolve Date: Wed, 22 Mar 2023 17:08:10 +0200 Subject: [PATCH 2/4] UI: Add allow delete notification and request notification --- .../src/app/core/http/notification.service.ts | 4 ++ .../inbox/inbox-table-config.resolver.ts | 16 ++--- .../recipient-table-config.resolver.ts | 8 +-- .../rule/rule-table-config.resolver.ts | 8 +-- .../sent-notification-dialog.component.html | 57 +++++++++--------- .../sent-notification-dialog.component.scss | 2 +- .../sent/sent-notification-dialog.componet.ts | 13 +++-- .../sent/sent-table-config.resolver.ts | 15 +++-- .../template/template-configuration.ts | 14 ++--- ...emplate-notification-dialog.component.html | 58 +++++++++---------- .../template-notification-dialog.component.ts | 12 ++-- .../template-table-config.resolver.ts | 16 ++--- .../notification/notification.component.html | 3 +- .../app/shared/models/entity-type.models.ts | 21 +++++-- .../app/shared/models/notification.models.ts | 2 - .../assets/locale/locale.constant-en_US.json | 9 +++ 16 files changed, 133 insertions(+), 125 deletions(-) diff --git a/ui-ngx/src/app/core/http/notification.service.ts b/ui-ngx/src/app/core/http/notification.service.ts index 722dcdd045..86631140f5 100644 --- a/ui-ngx/src/app/core/http/notification.service.ts +++ b/ui-ngx/src/app/core/http/notification.service.ts @@ -51,6 +51,10 @@ export class NotificationService { defaultHttpOptionsFromConfig(config)); } + public deleteNotification(id: string, config?: RequestConfig): Observable { + return this.http.delete(`/api/notification/${id}`, defaultHttpOptionsFromConfig(config)); + } + public markNotificationAsRead(id: string, config?: RequestConfig): Observable { return this.http.put(`/api/notification/${id}/read`, defaultHttpOptionsFromConfig(config)); } diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts index 4a6f4e15bf..219bfae14c 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts @@ -20,7 +20,7 @@ import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models'; -import { EntityTypeResource } from '@shared/models/entity-type.models'; +import { EntityType, EntityTypeResource, entityTypeTranslations } from '@shared/models/entity-type.models'; import { DatePipe } from '@angular/common'; import { Direction } from '@shared/models/page/sort-order'; import { @@ -50,17 +50,19 @@ export class InboxTableConfigResolver implements Resolve; + this.config.deleteEntityTitle = () => this.translate.instant('notification.delete-notification-title'); + this.config.deleteEntityContent = () => this.translate.instant('notification.delete-notification-text'); + this.config.deleteEntitiesTitle = count => this.translate.instant('notification.delete-notifications-title', {count}); + this.config.deleteEntitiesContent = () => this.translate.instant('notification.delete-notifications-text'); + + this.config.deleteEntity = id => this.notificationService.deleteNotification(id.id); this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotifications(pageLink, this.config.componentsData.unreadOnly); diff --git a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts index bc9d7fae22..ef7a198dba 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts @@ -20,7 +20,7 @@ import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models'; -import { EntityTypeResource } from '@shared/models/entity-type.models'; +import { EntityType, EntityTypeResource, entityTypeTranslations } from '@shared/models/entity-type.models'; import { Direction } from '@shared/models/page/sort-order'; import { NotificationTarget, NotificationTargetTypeTranslationMap } from '@shared/models/notification.models'; import { NotificationService } from '@core/http/notification.service'; @@ -46,15 +46,13 @@ export class RecipientTableConfigResolver implements Resolve; this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTargets(pageLink); diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts index 91e90bb221..2a1b1e65fd 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts @@ -20,7 +20,7 @@ import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models'; -import { EntityTypeResource } from '@shared/models/entity-type.models'; +import { EntityType, EntityTypeResource, entityTypeTranslations } from '@shared/models/entity-type.models'; import { Direction } from '@shared/models/page/sort-order'; import { NotificationRule, TriggerTypeTranslationMap } from '@shared/models/notification.models'; import { NotificationService } from '@core/http/notification.service'; @@ -46,15 +46,13 @@ export class RuleTableConfigResolver implements Resolve; this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRules(pageLink); diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html index dfe68d6c26..1f3e5aba96 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html @@ -28,7 +28,8 @@
- @@ -55,22 +56,6 @@
- - notification.subject - - - {{ 'notification.subject-required' | translate }} - - {{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} - - - notification.message - - - {{ 'notification.message-required' | translate }} - - {{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} -
- + notification.subject - + + + {{ 'notification.subject-required' | translate }} + - + notification.message + + {{ 'notification.message-required' | translate }} +
@@ -215,9 +205,12 @@ {{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} - + notification.subject - + + + {{ 'notification.subject-required' | translate }} + notification.message @@ -232,15 +225,17 @@ {{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} - + notification.message + + {{ 'notification.message-required' | translate }} + @@ -252,15 +247,17 @@ {{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}
- + notification.message + + {{ 'notification.message-required' | translate }} + diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss index 2fe0583a1b..e262510ec9 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss @@ -17,7 +17,7 @@ @import "../../../../../../theme"; :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { - width: 800px; + width: 1000px; height: 100%; max-width: 100%; max-height: 100vh; diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts index 66ed42a3b7..8a95b4d8cb 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts @@ -60,6 +60,8 @@ export class SentNotificationDialogComponent extends @ViewChild('createNotification', {static: true}) createNotification: MatStepper; stepperOrientation: Observable; + stepperLabelPosition: Observable<'bottom' | 'end'>; + isAdd = true; entityType = EntityType; notificationType = NotificationType; @@ -87,6 +89,9 @@ export class SentNotificationDialogComponent extends this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm']) .pipe(map(({matches}) => matches ? 'horizontal' : 'vertical')); + this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md']) + .pipe(map(({matches}) => matches ? 'end' : 'bottom')); + this.notificationRequestForm = this.fb.group({ useTemplate: [false], templateId: [{value: null, disabled: true}, Validators.required], @@ -148,12 +153,8 @@ export class SentNotificationDialogComponent extends } nextStepLabel(): string { - if (this.selectedIndex !== 0) { - if (this.selectedIndex >= this.maxStepperIndex) { - return 'action.send'; - } else if (this.createNotification.selected.stepControl.pristine) { - return 'action.skip'; - } + if (this.selectedIndex >= this.maxStepperIndex) { + return 'action.send'; } return 'action.next'; } diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts index 285d6c1434..b1a806a2e6 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts @@ -32,7 +32,7 @@ import { import { NotificationService } from '@core/http/notification.service'; import { TranslateService } from '@ngx-translate/core'; import { MatDialog } from '@angular/material/dialog'; -import { EntityTypeResource } from '@shared/models/entity-type.models'; +import { EntityType, EntityTypeResource, entityTypeTranslations } from '@shared/models/entity-type.models'; import { Direction } from '@shared/models/page/sort-order'; import { DatePipe } from '@angular/common'; import { EntityAction } from '@home/models/entity/entity-component.models'; @@ -60,21 +60,20 @@ export class SentTableConfigResolver implements Resolve; - this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRequests(pageLink); - - this.config.deleteEnabled = (request) => request.status === NotificationRequestStatus.SCHEDULED; this.config.deleteEntityTitle = () => this.translate.instant('notification.delete-request-title'); this.config.deleteEntityContent = () => this.translate.instant('notification.delete-request-text'); + this.config.deleteEntitiesTitle = count => this.translate.instant('notification.delete-requests-title', {count}); + this.config.deleteEntitiesContent = () => this.translate.instant('notification.delete-requests-text'); + this.config.deleteEntity = id => this.notificationService.deleteNotificationRequest(id.id); + this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRequests(pageLink); this.config.cellActionDescriptors = this.configureCellActions(); diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts index 260690e30a..2eaf1807a0 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts @@ -79,8 +79,6 @@ export abstract class TemplateConfiguration extends DialogComponent< name: ['', Validators.required], notificationType: [NotificationType.GENERAL], configuration: this.fb.group({ - notificationSubject: ['', Validators.required], - defaultTextTemplate: ['', Validators.required], deliveryMethodsTemplates: this.fb.group({}, {validators: this.atLeastOne()}) }) }); @@ -91,8 +89,8 @@ export abstract class TemplateConfiguration extends DialogComponent< }); this.webTemplateForm = this.fb.group({ - subject: [''], - body: [''], + subject: ['', Validators.required], + body: ['', Validators.required], additionalConfig: this.fb.group({ icon: this.fb.group({ enabled: [false], @@ -153,16 +151,16 @@ export abstract class TemplateConfiguration extends DialogComponent< }); this.emailTemplateForm = this.fb.group({ - subject: [''], - body: [''] + subject: ['', Validators.required], + body: ['', Validators.required] }); this.smsTemplateForm = this.fb.group({ - body: [''] + body: ['', Validators.required] }); this.slackTemplateForm = this.fb.group({ - body: [''] + body: ['', Validators.required] }); this.deliveryMethodFormsMap = new Map([ diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html index 67ae8d0e49..17dcbd848a 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html @@ -28,7 +28,9 @@
- check @@ -52,22 +54,6 @@
- - notification.subject - - - {{ 'notification.subject-required' | translate }} - - {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }} - - - notification.message - - - {{ 'notification.message-required' | translate }} - - {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }} -
- + notification.subject - + + + {{ 'notification.subject-required' | translate }} + - + notification.message + + {{ 'notification.message-required' | translate }} +
@@ -178,9 +169,12 @@ {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }} - + notification.subject - + + + {{ 'notification.subject-required' | translate }} + notification.message @@ -194,15 +188,17 @@ {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }} - + notification.message + + {{ 'notification.message-required' | translate }} + @@ -213,15 +209,17 @@ {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }}
- + notification.message + + {{ 'notification.message-required' | translate }} + diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts index 2c3ca06ba6..f7f7a41add 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts @@ -54,6 +54,7 @@ export class TemplateNotificationDialogComponent @ViewChild('notificationTemplateStepper', {static: true}) notificationTemplateStepper: MatStepper; stepperOrientation: Observable; + stepperLabelPosition: Observable<'bottom' | 'end'>; dialogTitle = 'notification.edit-notification-template'; @@ -81,6 +82,9 @@ export class TemplateNotificationDialogComponent this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm']) .pipe(map(({matches}) => matches ? 'horizontal' : 'vertical')); + this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md']) + .pipe(map(({matches}) => matches ? 'end' : 'bottom')); + if (isDefinedAndNotNull(this.data?.predefinedType)) { this.hideSelectType = true; this.templateNotificationForm.get('notificationType').setValue(this.data.predefinedType, {emitEvents: false}); @@ -132,12 +136,8 @@ export class TemplateNotificationDialogComponent } nextStepLabel(): string { - if (this.selectedIndex !== 0) { - if (this.selectedIndex >= this.maxStepperIndex) { - return (this.data.isAdd || this.data.isCopy) ? 'action.add' : 'action.save'; - } else if (this.notificationTemplateStepper.selected.stepControl.pristine) { - return 'action.skip'; - } + if (this.selectedIndex >= this.maxStepperIndex) { + return (this.data.isAdd || this.data.isCopy) ? 'action.add' : 'action.save'; } return 'action.next'; } diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts index fe14fe23ec..7a1523f924 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts @@ -20,7 +20,7 @@ import { EntityTableColumn, EntityTableConfig } from '@home/models/entity/entities-table-config.models'; -import { EntityTypeResource } from '@shared/models/entity-type.models'; +import { EntityType, EntityTypeResource, entityTypeTranslations } from '@shared/models/entity-type.models'; import { Direction } from '@shared/models/page/sort-order'; import { NotificationTemplate, NotificationTemplateTypeTranslateMap } from '@shared/models/notification.models'; import { NotificationService } from '@core/http/notification.service'; @@ -46,15 +46,13 @@ export class TemplateTableConfigResolver implements Resolve; this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTemplates(pageLink); @@ -77,13 +75,9 @@ export class TemplateTableConfigResolver implements Resolve('createdTime', 'notification.created-time', this.datePipe, '170px'), - new EntityTableColumn('notificationType', 'notification.type', '15%', + new EntityTableColumn('notificationType', 'notification.type', '20%', (template) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(template.notificationType).name)), - new EntityTableColumn('name', 'notification.template', '25%'), - new EntityTableColumn('configuration.notificationSubject', 'notification.subject', '25%', - (template) => template.configuration.notificationSubject, () => ({}), false), - new EntityTableColumn('configuration.defaultTextTemplate', 'notification.message', '35%', - (template) => template.configuration.defaultTextTemplate, () => ({}), false) + new EntityTableColumn('name', 'notification.template', '80%') ); } diff --git a/ui-ngx/src/app/shared/components/notification/notification.component.html b/ui-ngx/src/app/shared/components/notification/notification.component.html index 5e9871e475..fe489a213a 100644 --- a/ui-ngx/src/app/shared/components/notification/notification.component.html +++ b/ui-ngx/src/app/shared/components/notification/notification.component.html @@ -38,7 +38,8 @@
{{ notification.createdTime ?? currentDate | dateAgo }} -
diff --git a/ui-ngx/src/app/shared/models/entity-type.models.ts b/ui-ngx/src/app/shared/models/entity-type.models.ts index fb40b78944..a3b4321335 100644 --- a/ui-ngx/src/app/shared/models/entity-type.models.ts +++ b/ui-ngx/src/app/shared/models/entity-type.models.ts @@ -350,31 +350,42 @@ export const entityTypeTranslations = new Map Date: Wed, 22 Mar 2023 18:22:13 +0200 Subject: [PATCH 3/4] Merge remote-tracking branch 'klimov/feature/notification-system' into feature/notification-system --- ui-ngx/src/app/core/http/entity.service.ts | 3 +- .../src/app/core/http/notification.service.ts | 12 +++++--- ui-ngx/src/app/core/services/menu.service.ts | 28 +++++++++---------- ...enant-profile-configuration.component.html | 5 ++++ ...-tenant-profile-configuration.component.ts | 1 + .../tenant/rate-limits/rate-limits.models.ts | 5 +++- .../rule/escalation-form.component.html | 3 +- .../rule/escalation-form.component.ts | 7 ++++- .../rule-notification-dialog.component.html | 3 +- .../sent-notification-dialog.component.html | 3 +- .../app/shared/models/notification.models.ts | 4 +-- ui-ngx/src/app/shared/models/tenant.model.ts | 1 + .../assets/locale/locale.constant-en_US.json | 2 ++ 13 files changed, 51 insertions(+), 26 deletions(-) diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index 1f58b2f94b..f4a7217b34 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -90,6 +90,7 @@ import { QueueService } from '@core/http/queue.service'; import { AssetProfileService } from '@core/http/asset-profile.service'; import { NotificationService } from '@core/http/notification.service'; import { TenantProfileService } from '@core/http/tenant-profile.service'; +import { NotificationType } from '@shared/models/notification.models'; @Injectable({ providedIn: 'root' @@ -418,7 +419,7 @@ export class EntityService { break; case EntityType.NOTIFICATION_TARGET: pageLink.sortOrder.property = 'name'; - entitiesObservable = this.notificationService.getNotificationTargets(pageLink, config); + entitiesObservable = this.notificationService.getNotificationTargets(pageLink, subType as NotificationType, config); break; } return entitiesObservable; diff --git a/ui-ngx/src/app/core/http/notification.service.ts b/ui-ngx/src/app/core/http/notification.service.ts index 86631140f5..b4ca3b78f9 100644 --- a/ui-ngx/src/app/core/http/notification.service.ts +++ b/ui-ngx/src/app/core/http/notification.service.ts @@ -34,7 +34,7 @@ import { SlackConversation } from '@shared/models/notification.models'; import { User } from '@shared/models/user.model'; -import { isDefinedAndNotNull } from '@core/utils'; +import { isDefinedAndNotNull, isNotEmptyStr } from '@core/utils'; @Injectable({ providedIn: 'root' @@ -131,9 +131,13 @@ export class NotificationService { defaultHttpOptionsFromConfig(config)); } - public getNotificationTargets(pageLink: PageLink, config?: RequestConfig): Observable> { - return this.http.get>(`/api/notification/targets${pageLink.toQuery()}`, - defaultHttpOptionsFromConfig(config)); + public getNotificationTargets(pageLink: PageLink, type?: NotificationType, + config?: RequestConfig): Observable> { + let url = `/api/notification/targets${pageLink.toQuery()}`; + if (isNotEmptyStr(type)) { + url += `¬ificationType=${type}`; + } + return this.http.get>(url, defaultHttpOptionsFromConfig(config)); } public getRecipientsForNotificationTargetConfig(notificationTarget: NotificationTarget, pageLink: PageLink, diff --git a/ui-ngx/src/app/core/services/menu.service.ts b/ui-ngx/src/app/core/services/menu.service.ts index bcf44ae792..ac21a879a1 100644 --- a/ui-ngx/src/app/core/services/menu.service.ts +++ b/ui-ngx/src/app/core/services/menu.service.ts @@ -160,18 +160,18 @@ export class MenuService { }, { id: guid(), - name: 'notification.templates', + name: 'notification.recipients', type: 'link', - path: '/notification/templates', - icon: 'mdi:message-draw', - isMdiIcon: true + path: '/notification/recipients', + icon: 'contacts' }, { id: guid(), - name: 'notification.recipients', + name: 'notification.templates', type: 'link', - path: '/notification/recipients', - icon: 'contacts' + path: '/notification/templates', + icon: 'mdi:message-draw', + isMdiIcon: true }, { id: guid(), @@ -529,18 +529,18 @@ export class MenuService { }, { id: guid(), - name: 'notification.templates', + name: 'notification.recipients', type: 'link', - path: '/notification/templates', - icon: 'mdi:message-draw', - isMdiIcon: true + path: '/notification/recipients', + icon: 'contacts' }, { id: guid(), - name: 'notification.recipients', + name: 'notification.templates', type: 'link', - path: '/notification/recipients', - icon: 'contacts' + path: '/notification/templates', + icon: 'mdi:message-draw', + isMdiIcon: true }, { id: guid(), diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html index 35ea628784..81a1206800 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.html @@ -476,6 +476,11 @@ [type]="rateLimitsType.CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION">
+
+ + +
diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.ts index 1276a200da..e070d760ad 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/default-tenant-profile-configuration.component.ts @@ -72,6 +72,7 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA transportDeviceTelemetryDataPointsRateLimit: [null, []], tenantEntityExportRateLimit: [null, []], tenantEntityImportRateLimit: [null, []], + tenantNotificationRequestsRateLimit: [null, []], maxTransportMessages: [null, [Validators.required, Validators.min(0)]], maxTransportDataPoints: [null, [Validators.required, Validators.min(0)]], maxREExecutions: [null, [Validators.required, Validators.min(0)]], diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts index e0f383068a..70fb7af11f 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts +++ b/ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits.models.ts @@ -33,7 +33,8 @@ export enum RateLimitsType { WS_UPDATE_PER_SESSION_RATE_LIMIT = 'WS_UPDATE_PER_SESSION_RATE_LIMIT', CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION = 'CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION', TENANT_ENTITY_EXPORT_RATE_LIMIT = 'TENANT_ENTITY_EXPORT_RATE_LIMIT', - TENANT_ENTITY_IMPORT_RATE_LIMIT = 'TENANT_ENTITY_IMPORT_RATE_LIMIT' + TENANT_ENTITY_IMPORT_RATE_LIMIT = 'TENANT_ENTITY_IMPORT_RATE_LIMIT', + TENANT_NOTIFICATION_REQUEST_RATE_LIMIT = 'TENANT_NOTIFICATION_REQUEST_RATE_LIMIT' } export const rateLimitsLabelTranslationMap = new Map( @@ -50,6 +51,7 @@ export const rateLimitsLabelTranslationMap = new Map( [RateLimitsType.CASSANDRA_QUERY_TENANT_RATE_LIMITS_CONFIGURATION, 'tenant-profile.cassandra-tenant-limits-configuration'], [RateLimitsType.TENANT_ENTITY_EXPORT_RATE_LIMIT, 'tenant-profile.tenant-entity-export-rate-limit'], [RateLimitsType.TENANT_ENTITY_IMPORT_RATE_LIMIT, 'tenant-profile.tenant-entity-import-rate-limit'], + [RateLimitsType.TENANT_NOTIFICATION_REQUEST_RATE_LIMIT, 'tenant-profile.tenant-notification-request-rate-limit'], ] ); @@ -67,6 +69,7 @@ export const rateLimitsDialogTitleTranslationMap = new Map diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts b/ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts index 8ecfba1c24..fb102b4243 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts @@ -133,7 +133,7 @@ export class EscalationsComponent implements ControlValueAccessor, Validator, On (this.escalationsFormGroup.get('escalations') as FormArray).removeAt(index); } - public addEscalation(delay = 60000) { + public addEscalation(delay = 3600000) { const escalation = { delayInSec: delay, targets: null diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html index 9c435c545a..3b4ccba2b3 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html @@ -77,7 +77,7 @@
- notification.notification-chain + notification.escalation-chain
notification.targets
@@ -88,7 +88,7 @@
-
notification.clear-rule
+
notification.stop-escalation-alarm-status-become
alarm.alarm-status-list ('createdTime', 'notification.created-time', this.datePipe, '170px'), + new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '170px'), new EntityTableColumn('name', 'notification.rule-name', '30%'), new EntityTableColumn('templateName', 'notification.template', '20%'), new EntityTableColumn('triggerType', 'notification.trigger.trigger', '20%', diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts index 5a5ad40a82..4a8d125a94 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts @@ -36,10 +36,10 @@ export class SentErrorDialogComponent extends DialogComponent([ - [NotificationDeliveryMethod.WEB, 'notification.delivery-method-type.web-failed-sent'], - [NotificationDeliveryMethod.SMS, 'notification.delivery-method-type.sms-failed-sent'], - [NotificationDeliveryMethod.EMAIL, 'notification.delivery-method-type.email-failed-sent'], - [NotificationDeliveryMethod.SLACK, 'notification.delivery-method-type.slack-failed-sent'], + [NotificationDeliveryMethod.WEB, 'notification.delivery-method.web-failed-sent'], + [NotificationDeliveryMethod.SMS, 'notification.delivery-method.sms-failed-sent'], + [NotificationDeliveryMethod.EMAIL, 'notification.delivery-method.email-failed-sent'], + [NotificationDeliveryMethod.SLACK, 'notification.delivery-method.slack-failed-sent'], ]); constructor(protected store: Store, diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html index e0225d6886..7aa2c726e4 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html @@ -46,14 +46,17 @@ {{ 'notification.use-template' | translate }} - - +
+ + + +
+
- - - + + + + +
{{ 'notification.scheduler-later' | translate }} @@ -108,7 +113,7 @@ - {{ 'notification.web-settings' | translate }} + {{ 'notification.delivery-method.web' | translate }}
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}
@@ -200,7 +205,7 @@ - {{ 'notification.email-settings' | translate }} + {{ 'notification.delivery-method.email' | translate }}
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }} @@ -221,7 +226,7 @@ - {{ 'notification.sms-settings' | translate }} + {{ 'notification.delivery-method.sms' | translate }}
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}
@@ -243,7 +248,7 @@ - {{ 'notification.slack-settings' | translate }} + {{ 'notification.delivery-method.slack' | translate }}
{{ notificationTemplateTypeTranslateMap.get(notificationType.GENERAL).hint | translate }}
@@ -271,7 +276,7 @@
-
notification.delivery-method-type.web-preview
+
notification.delivery-method.web-preview
@@ -280,7 +285,7 @@
-
notification.delivery-method-type.email-preview
+
notification.delivery-method.email-preview
{{ preview.processedTemplates.EMAIL.subject }}
@@ -291,7 +296,7 @@
-
notification.delivery-method-type.sms-preview
+
notification.delivery-method.sms-preview
{{ preview.processedTemplates.SMS.body }} @@ -300,7 +305,7 @@
-
notification.delivery-method-type.slack-preview
+
notification.delivery-method.slack-preview
{{ preview.processedTemplates.SLACK.body }} diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss index e262510ec9..b18c434360 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss @@ -17,7 +17,7 @@ @import "../../../../../../theme"; :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { - width: 1000px; + width: 820px; height: 100%; max-width: 100%; max-height: 100vh; diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts index 8a95b4d8cb..7cdb791037 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts @@ -29,7 +29,7 @@ import { Router } from '@angular/router'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { NotificationService } from '@core/http/notification.service'; -import { deepTrim, guid } from '@core/utils'; +import { deepTrim, guid, isDefinedAndNotNull } from '@core/utils'; import { Observable } from 'rxjs'; import { EntityType } from '@shared/models/entity-type.models'; import { BreakpointObserver } from '@angular/cdk/layout'; @@ -136,11 +136,16 @@ export class SentNotificationDialogComponent extends if (data.request) { this.notificationRequestForm.reset({}, {emitEvent: false}); this.notificationRequestForm.patchValue(this.data.request, {emitEvent: false}); - // eslint-disable-next-line guard-for-in - for (const method in this.data.request.template.configuration.deliveryMethodsTemplates) { - this.deliveryMethodFormsMap.get(NotificationDeliveryMethod[method]) - .patchValue(this.data.request.template.configuration.deliveryMethodsTemplates[method]); + let useTemplate = true; + if (isDefinedAndNotNull(this.data.request.template)) { + useTemplate = false; + // eslint-disable-next-line guard-for-in + for (const method in this.data.request.template.configuration.deliveryMethodsTemplates) { + this.deliveryMethodFormsMap.get(NotificationDeliveryMethod[method]) + .patchValue(this.data.request.template.configuration.deliveryMethodsTemplates[method]); + } } + this.notificationRequestForm.get('useTemplate').setValue(useTemplate, {onlySelf : true}); } } diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts index b1a806a2e6..f25a037aeb 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts @@ -90,11 +90,11 @@ export class SentTableConfigResolver implements Resolve('createdTime', 'notification.created-time', this.datePipe, '170px'), + new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '170px'), new EntityTableColumn('status', 'notification.status', '15%', request => `${this.requestStatus(request.status)}${this.requestStats(request.stats)}`, request => this.requestStatusStyle(request.status)), - new EntityTableColumn('deliveryMethods', 'notification.delivery-method', '15%', + new EntityTableColumn('deliveryMethods', 'notification.delivery-method.delivery-method', '15%', (request) => request.deliveryMethods .map((deliveryMethod) => this.translate.instant(NotificationDeliveryMethodTranslateMap.get(deliveryMethod))).join(', '), () => ({}), false), diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html index 17dcbd848a..dde6e57168 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html @@ -72,7 +72,7 @@ - {{ 'notification.web-settings' | translate }} + {{ 'notification.delivery-method.web' | translate }}
{{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }}
@@ -163,7 +163,7 @@
- {{ 'notification.email-settings' | translate }} + {{ 'notification.delivery-method.email' | translate }}
{{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }} @@ -183,7 +183,7 @@ - {{ 'notification.sms-settings' | translate }} + {{ 'notification.delivery-method.sms' | translate }}
{{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }}
@@ -204,7 +204,7 @@
- {{ 'notification.slack-settings' | translate }} + {{ 'notification.delivery-method.slack' | translate }}
{{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }}
diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss index bd58f9a0b4..9e5c8133b7 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss @@ -17,7 +17,7 @@ @import "../../../../../../theme"; :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { - width: 930px; + width: 800px; height: 100%; max-width: 100%; max-height: 100vh; diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts index 7a1523f924..7df82dd6d6 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts @@ -74,7 +74,7 @@ export class TemplateTableConfigResolver implements Resolve('createdTime', 'notification.created-time', this.datePipe, '170px'), + new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '170px'), new EntityTableColumn('notificationType', 'notification.type', '20%', (template) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(template.notificationType).name)), new EntityTableColumn('name', 'notification.template', '80%') diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index 82d4c3c71d..92401189e8 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -253,7 +253,7 @@ export enum NotificationTargetType { export const NotificationTargetTypeTranslationMap = new Map([ [NotificationTargetType.PLATFORM_USERS, 'notification.platform-users'], - [NotificationTargetType.SLACK, 'notification.slack'] + [NotificationTargetType.SLACK, 'notification.delivery-method.slack'] ]); export interface NotificationTemplate extends Omit, 'label'>{ @@ -319,10 +319,10 @@ export enum NotificationDeliveryMethod { } export const NotificationDeliveryMethodTranslateMap = new Map([ - [NotificationDeliveryMethod.WEB, 'notification.delivery-method-type.web'], - [NotificationDeliveryMethod.SMS, 'notification.delivery-method-type.sms'], - [NotificationDeliveryMethod.EMAIL, 'notification.delivery-method-type.email'], - [NotificationDeliveryMethod.SLACK, 'notification.delivery-method-type.slack'] + [NotificationDeliveryMethod.WEB, 'notification.delivery-method.web'], + [NotificationDeliveryMethod.SMS, 'notification.delivery-method.sms'], + [NotificationDeliveryMethod.EMAIL, 'notification.delivery-method.email'], + [NotificationDeliveryMethod.SLACK, 'notification.delivery-method.slack'] ]); export enum NotificationRequestStatus { diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 41f25260ec..d9b64bc703 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2732,6 +2732,7 @@ "add-notification-target": "Add notification recipients group", "add-notification-template": "Add notification template", "add-rule": "Add rule", + "add-stage": "Add stage", "add-target": "Add recipients", "add-template": "Add template", "after": "After", @@ -2743,7 +2744,6 @@ "basic-settings": "Basic settings", "button-text": "Button text", "button-text-required": "Button text is required", - "clear-rule": "Clear rule", "compose": "Compose", "conversation": "Conversation", "conversation-required": "Conversation is required", @@ -2753,36 +2753,35 @@ "create-new": "Create new", "create-target": "Create recipient", "created": "Created", - "created-time": "Created time", + "delete-notification-text": "Be careful, after the confirmation the notification will become unrecoverable.", + "delete-notification-title": "Are you sure you want to delete the notification?", + "delete-notifications-text": "Be careful, after the confirmation the notifications will become unrecoverable.", + "delete-notifications-title": "Are you sure you want to delete { count, plural, =1 {1 notification} other {# notifications} }?", "delete-request-text": "Be careful, after the confirmation the notification request will become unrecoverable.", - "delete-requests-text": "Be careful, after the confirmation the notification requests will become unrecoverable.", "delete-request-title": "Are you sure you want to delete the notification request?", + "delete-requests-text": "Be careful, after the confirmation the notification requests will become unrecoverable.", "delete-requests-title": "Are you sure you want to delete { count, plural, =1 {1 request} other {# requests} }?", "delete-rule-text": "Be careful, after the confirmation the notification rule will become unrecoverable.", "delete-rule-title": "Are you sure you want to delete the notification rule '{{ruleName}}'?", - "delete-notification-title": "Are you sure you want to delete the notification?", - "delete-notifications-title": "Are you sure you want to delete { count, plural, =1 {1 notification} other {# notifications} }?", - "delete-notification-text": "Be careful, after the confirmation the notification will become unrecoverable.", - "delete-notifications-text": "Be careful, after the confirmation the notifications will become unrecoverable.", "delete-target-text": "Be careful, after the confirmation the notification recipient will become unrecoverable.", "delete-target-title": "Are you sure you want to delete the notification recipient '{{targetName}}'?", "delete-template-text": "Be careful, after the confirmation the notification template will become unrecoverable.", "delete-template-title": "Are you sure you want to delete the notification template '{{templateName}}'?", "deleted": "Deleted", - "delivery-method": "Delivery method", - "delivery-method-type": { + "delivery-method": { + "delivery-method": "Delivery method", "email": "Email", "email-failed-sent": "Email messages failed sent", "email-preview": "Email notification preview", - "web": "Web", - "web-failed-sent": "Web messages failed sent", - "web-preview": "Web notification preview", "slack": "Slack", "slack-failed-sent": "Slack messages failed sent", "slack-preview": "Slack notification preview", "sms": "SMS", "sms-failed-sent": "SMS messages failed sent", - "sms-preview": "SMS notification preview" + "sms-preview": "SMS notification preview", + "web": "Web", + "web-failed-sent": "Web messages failed sent", + "web-preview": "Web notification preview" }, "delivery-methods": "Delivery methods", "description": "Description", @@ -2793,10 +2792,10 @@ "edit-notification-template": "Edit notification template", "edit-rule": "Edit rule", "edit-template": "Edit template", - "email-settings": "Email settings", "entities-limit-trigger-settings": "Entities limit trigger settings", "entity-action-trigger-settings": "Entity action trigger settings", "entity-type": "Entity type", + "escalation-chain": "Escalation chain", "failed-send": "Failed send", "fails": "Fails", "filter": "Filter", @@ -2805,8 +2804,8 @@ "link": "Link", "link-required": "Link is required", "link-type": { - "link": "Open URL link", - "dashboard": "Open dashboard" + "dashboard": "Open dashboard", + "link": "Open URL link" }, "management": "Notification management", "mark-all-as-read": "Mark all as read", @@ -2827,27 +2826,28 @@ "not-found-slack-recipient": "Slack recipient not found", "notification": "Notification", "notification-center": "Notification center", - "notification-chain": "Notification chain", "notification-target": "Recipient group", "notify": "notify", + "notify-again": "Notify again", "notify-alarm-action": { + "acknowledged": "Alarm acknowledged", "assigned": "Alarm assigned", + "cleared": "Alarm cleared", "created": "Alarm created", "severity-changed": "Alarm severity changed", - "acknowledged": "Alarm acknowledged", - "cleared": "Alarm cleared", "unassigned": "Alarm unassigned" }, - "notify-again": "Notify again", "notify-on": "Notify on", "notify-on-comment-update": "Notify on comment update", "notify-on-required": "Notify on is required", - "notify-only-user-comments": "Notify only user comments", "notify-on-unassign": "Notify on unassign", + "notify-only-user-comments": "Notify only user comments", + "only-rule-chain-lifecycle-failures": "Only rule chain lifecycle failures", + "only-rule-node-lifecycle-failures": "Only rule node lifecycle failures", "platform-users": "Platform users", "recipient": "Recipient", - "recipients": "Recipients", "recipient-type": "Recipient type", + "recipients": "Recipients", "recipients-count": "{ count, plural, =1 {1 recipient} other {# recipients} }", "request-search": "Request search", "request-status": { @@ -2869,23 +2869,20 @@ "search-rules": "Search rules", "search-targets": "Search recipients", "search-templates": "Search templates", - "send-notification": "Send notification", - "selected-requests": "{ count, plural, =1 {1 request} other {# requests} } selected", "selected-notifications": "{ count, plural, =1 {1 notification} other {# notifications} } selected", + "selected-requests": "{ count, plural, =1 {1 request} other {# requests} } selected", + "send-notification": "Send notification", "sent": "Sent", - "settings": "Notification settings", "set-entity-from-notification": "Set entity from notification to dashboard state", - "slack": "Slack", "slack-chanel-type": "Slack channel type", "slack-chanel-types": { "direct": "Direct message", "private-channel": "Private channel", "public-channel": "Public channel" }, - "slack-settings": "Slack settings", - "sms-settings": "SMS settings", "start-from-scratch": "Start from scratch", "status": "Status", + "stop-escalation-alarm-status-become": "Stop the escalation on the alarm status become:", "subject": "Subject", "subject-required": "Subject is required", "target": "Recipient", @@ -2896,11 +2893,11 @@ "affected-user-hint": "Affected user hint", "all-users": "All users", "customer-users": "Customer users", - "users-entity-owner": "Users of the entity owner", - "users-entity-owner-hint": "Users of the entity owner hint", "tenant-administrators": "Tenant administrators", "user-filters": "User filter", - "user-list": "User list" + "user-list": "User list", + "users-entity-owner": "Users of the entity owner", + "users-entity-owner-hint": "Users of the entity owner hint" }, "targets": "Recipients", "targets-required": "Recipients is required", @@ -2928,11 +2925,11 @@ "rule-engine-lifecycle-event": "Rule engine lifecycle event" }, "templates": "Templates", - "tenants-list-rule-hint": "If the field is empty, the trigger will be applied to all tenants", "tenant-profiles-list-rule-hint": "If the field is empty, the trigger will be applied to all tenant profiles", + "tenants-list-rule-hint": "If the field is empty, the trigger will be applied to all tenants", + "threshold": "Threshold", "time": "Time", "track-rule-node-events": "Track rule node events", - "threshold": "Threshold", "trigger": { "alarm": "Alarm", "alarm-assignment": "Alarm assignment", @@ -2940,18 +2937,15 @@ "device-inactivity": "Device inactivity", "entities-limit": "Entities limit", "entity-action": "Entity action", + "rule-engine-lifecycle-event": "Rule engine lifecycle event", "trigger": "Trigger", - "trigger-required": "Trigger is required", - "rule-engine-lifecycle-event": "Rule engine lifecycle event" + "trigger-required": "Trigger is required" }, "type": "Type", "unread": "Unread", "updated": "Updated", "use-template": "Use template", - "view-all": "View all", - "web-settings": "Web settings", - "only-rule-chain-lifecycle-failures": "Only rule chain lifecycle failures", - "only-rule-node-lifecycle-failures": "Only rule node lifecycle failures" + "view-all": "View all" }, "ota-update": { "add": "Add package",