UI: fix minnor bug in notification and change notification models

This commit is contained in:
Vladyslav_Prykhodko 2023-03-28 13:47:24 +03:00
parent de24af159c
commit 53dd3c89f4
17 changed files with 67 additions and 36 deletions

View File

@ -26,7 +26,7 @@ import java.io.Serializable;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "triggerType") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "triggerType")
@JsonSubTypes({ @JsonSubTypes({
@Type(value = AlarmNotificationRuleTriggerConfig.class, name = "ALARM"), @Type(value = AlarmNotificationRuleTriggerConfig.class, name = "ALARM"),
@Type(value = DeviceActivityNotificationRuleTriggerConfig.class, name = "DEVICE_INACTIVITY"), @Type(value = DeviceActivityNotificationRuleTriggerConfig.class, name = "DEVICE_ACTIVITY"),
@Type(value = EntityActionNotificationRuleTriggerConfig.class, name = "ENTITY_ACTION"), @Type(value = EntityActionNotificationRuleTriggerConfig.class, name = "ENTITY_ACTION"),
@Type(value = AlarmCommentNotificationRuleTriggerConfig.class, name = "ALARM_COMMENT"), @Type(value = AlarmCommentNotificationRuleTriggerConfig.class, name = "ALARM_COMMENT"),
@Type(value = RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), @Type(value = RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"),

View File

@ -175,7 +175,6 @@ import { AssetProfileDialogComponent } from '@home/components/profile/asset-prof
import { AssetProfileAutocompleteComponent } from '@home/components/profile/asset-profile-autocomplete.component'; import { AssetProfileAutocompleteComponent } from '@home/components/profile/asset-profile-autocomplete.component';
import { MODULES_MAP } from '@shared/models/constants'; import { MODULES_MAP } from '@shared/models/constants';
import { modulesMap } from '@modules/common/modules-map'; import { modulesMap } from '@modules/common/modules-map';
import { SlackConversationAutocompleteComponent } from '@home/components/notification/slack-conversation-autocomplete.component';
import { AlarmAssigneePanelComponent } from '@home/components/alarm/alarm-assignee-panel.component'; import { AlarmAssigneePanelComponent } from '@home/components/alarm/alarm-assignee-panel.component';
import { RouterTabsComponent } from '@home/components/router-tabs.component'; import { RouterTabsComponent } from '@home/components/router-tabs.component';
import { SendNotificationButtonComponent } from '@home/components/notification/send-notification-button.component'; import { SendNotificationButtonComponent } from '@home/components/notification/send-notification-button.component';
@ -325,7 +324,6 @@ import { SendNotificationButtonComponent } from '@home/components/notification/s
RateLimitsComponent, RateLimitsComponent,
RateLimitsTextComponent, RateLimitsTextComponent,
RateLimitsDetailsDialogComponent, RateLimitsDetailsDialogComponent,
SlackConversationAutocompleteComponent,
SendNotificationButtonComponent SendNotificationButtonComponent
], ],
imports: [ imports: [
@ -466,7 +464,6 @@ import { SendNotificationButtonComponent } from '@home/components/notification/s
RateLimitsComponent, RateLimitsComponent,
RateLimitsTextComponent, RateLimitsTextComponent,
RateLimitsDetailsDialogComponent, RateLimitsDetailsDialogComponent,
SlackConversationAutocompleteComponent,
SendNotificationButtonComponent SendNotificationButtonComponent
], ],
providers: [ providers: [

View File

@ -25,7 +25,7 @@ import { SentErrorDialogComponent } from '@home/pages/notification/sent/sent-err
import { SentNotificationDialogComponent } from '@home/pages/notification/sent/sent-notification-dialog.componet'; import { SentNotificationDialogComponent } from '@home/pages/notification/sent/sent-notification-dialog.componet';
import { import {
RecipientNotificationDialogComponent RecipientNotificationDialogComponent
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet'; } from '@home/pages/notification/recipient/recipient-notification-dialog.component';
import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component'; import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component';
import { TemplateAutocompleteComponent } from '@home/pages/notification/template/template-autocomplete.component'; import { TemplateAutocompleteComponent } from '@home/pages/notification/template/template-autocomplete.component';
import { import {

View File

@ -39,6 +39,7 @@ import { Authority } from '@shared/models/authority.enum';
import { AuthState } from '@core/auth/auth.models'; import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors'; import { getCurrentAuthState } from '@core/auth/auth.selectors';
import { AuthUser } from '@shared/models/user.model'; import { AuthUser } from '@shared/models/user.model';
import { control } from 'leaflet';
export interface RecipientNotificationDialogData { export interface RecipientNotificationDialogData {
target?: NotificationTarget; target?: NotificationTarget;
@ -48,7 +49,7 @@ export interface RecipientNotificationDialogData {
@Component({ @Component({
selector: 'tb-target-notification-dialog', selector: 'tb-target-notification-dialog',
templateUrl: './recipient-notification-dialog.component.html', templateUrl: './recipient-notification-dialog.component.html',
styleUrls: ['recipient-notification-dialog.componet.scss'] styleUrls: ['recipient-notification-dialog.component.scss']
}) })
export class RecipientNotificationDialogComponent extends export class RecipientNotificationDialogComponent extends
DialogComponent<RecipientNotificationDialogComponent, NotificationTarget> implements OnDestroy { DialogComponent<RecipientNotificationDialogComponent, NotificationTarget> implements OnDestroy {
@ -70,6 +71,7 @@ export class RecipientNotificationDialogComponent extends
isAdd = true; isAdd = true;
private readonly destroy$ = new Subject<void>(); private readonly destroy$ = new Subject<void>();
private userFilterFormControls: string[];
constructor(protected store: Store<AppState>, constructor(protected store: Store<AppState>,
protected router: Router, protected router: Router,
@ -119,10 +121,15 @@ export class RecipientNotificationDialogComponent extends
this.targetNotificationForm.get('configuration.description').enable({emitEvent: false}); this.targetNotificationForm.get('configuration.description').enable({emitEvent: false});
}); });
this.userFilterFormControls = Object.keys((this.targetNotificationForm.get('configuration.usersFilter') as FormGroup).controls)
.filter((controlName) => controlName !== 'type');
this.targetNotificationForm.get('configuration.usersFilter.type').valueChanges.pipe( this.targetNotificationForm.get('configuration.usersFilter.type').valueChanges.pipe(
takeUntil(this.destroy$) takeUntil(this.destroy$)
).subscribe((type: NotificationTargetConfigType) => { ).subscribe((type: NotificationTargetConfigType) => {
this.targetNotificationForm.get('configuration.usersFilter').disable({emitEvent: false}); this.userFilterFormControls.forEach(
controlName => this.targetNotificationForm.get(`configuration.usersFilter.${controlName}`).disable({emitEvent: false})
);
switch (type) { switch (type) {
case NotificationTargetConfigType.TENANT_ADMINISTRATORS: case NotificationTargetConfigType.TENANT_ADMINISTRATORS:
if (this.isSysAdmin()) { if (this.isSysAdmin()) {
@ -136,7 +143,6 @@ export class RecipientNotificationDialogComponent extends
this.targetNotificationForm.get('configuration.usersFilter.customerId').enable({emitEvent: false}); this.targetNotificationForm.get('configuration.usersFilter.customerId').enable({emitEvent: false});
break; break;
} }
this.targetNotificationForm.get('configuration.usersFilter.type').enable({emitEvent: false});
}); });
this.targetNotificationForm.get('configuration.usersFilter.filterByTenants').valueChanges.pipe( this.targetNotificationForm.get('configuration.usersFilter.filterByTenants').valueChanges.pipe(

View File

@ -28,7 +28,7 @@ import { TranslateService } from '@ngx-translate/core';
import { import {
RecipientNotificationDialogComponent, RecipientNotificationDialogComponent,
RecipientNotificationDialogData RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet'; } from '@home/pages/notification/recipient/recipient-notification-dialog.component';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { EntityAction } from '@home/models/entity/entity-component.models'; import { EntityAction } from '@home/models/entity/entity-component.models';
import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component'; import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component';

View File

@ -37,7 +37,7 @@ import { takeUntil } from 'rxjs/operators';
import { import {
RecipientNotificationDialogComponent, RecipientNotificationDialogComponent,
RecipientNotificationDialogData RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet'; } from '@home/pages/notification/recipient/recipient-notification-dialog.component';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatButton } from '@angular/material/button'; import { MatButton } from '@angular/material/button';

View File

@ -151,9 +151,9 @@
</form> </form>
</mat-step> </mat-step>
<mat-step *ngIf="ruleNotificationForm.get('triggerType').value === triggerType.DEVICE_INACTIVITY" <mat-step *ngIf="ruleNotificationForm.get('triggerType').value === triggerType.DEVICE_ACTIVITY"
[stepControl]="deviceInactivityTemplateForm"> [stepControl]="deviceInactivityTemplateForm">
<ng-template matStepLabel>{{ 'notification.device-inactivity-trigger-settings' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.device-activity-trigger-settings' | translate }}</ng-template>
<form [formGroup]="deviceInactivityTemplateForm"> <form [formGroup]="deviceInactivityTemplateForm">
<section formGroupName="triggerConfig"> <section formGroupName="triggerConfig">
<div fxFlex fxLayoutAlign="center center"> <div fxFlex fxLayoutAlign="center center">
@ -184,6 +184,17 @@
[entityType]="entityType.DEVICE_PROFILE"> [entityType]="entityType.DEVICE_PROFILE">
</tb-entity-list> </tb-entity-list>
</ng-template> </ng-template>
<mat-form-field fxFlex class="mat-block">
<mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple>
<mat-option *ngFor="let deviceEvent of deviceEvents" [value]="deviceEvent">
{{ deviceEventTranslationMap.get(deviceEvent) | translate }}
</mat-option>
</mat-select>
<mat-error *ngIf="deviceInactivityTemplateForm.get('triggerConfig.notifyOn').hasError('required')">
{{ 'notification.notify-on-required' | translate }}
</mat-error>
</mat-form-field>
</section> </section>
</form> </form>
<form [formGroup]="ruleNotificationForm"> <form [formGroup]="ruleNotificationForm">
@ -202,11 +213,10 @@
<form [formGroup]="entityActionTemplateForm"> <form [formGroup]="entityActionTemplateForm">
<fieldset class="fields-group tb-margin" formGroupName="triggerConfig"> <fieldset class="fields-group tb-margin" formGroupName="triggerConfig">
<legend translate>notification.filter</legend> <legend translate>notification.filter</legend>
<tb-entity-type-select required <tb-entity-type-list required
showLabel [allowedEntityTypes]="entityTypes"
[allowedEntityTypes]="entityTypes" formControlName="entityTypes">
formControlName="entityType"> </tb-entity-type-list>
</tb-entity-type-select>
<section fxLayout="column" fxLayoutGap="8px"> <section fxLayout="column" fxLayoutGap="8px">
<span fxFlex translate>notification.status</span> <span fxFlex translate>notification.status</span>
<mat-slide-toggle formControlName="created">{{ 'notification.created' | translate }}</mat-slide-toggle> <mat-slide-toggle formControlName="created">{{ 'notification.created' | translate }}</mat-slide-toggle>

View File

@ -20,7 +20,7 @@ import {
AlarmAssignmentAction, AlarmAssignmentAction,
AlarmAssignmentActionTranslationMap, AlarmAssignmentActionTranslationMap,
ComponentLifecycleEvent, ComponentLifecycleEvent,
ComponentLifecycleEventTranslationMap, ComponentLifecycleEventTranslationMap, DeviceEvent, DeviceEventTranslationMap,
NotificationRule, NotificationRule,
NotificationTarget, NotificationTarget,
TriggerType, TriggerType,
@ -52,7 +52,7 @@ import { TranslateService } from '@ngx-translate/core';
import { import {
RecipientNotificationDialogComponent, RecipientNotificationDialogComponent,
RecipientNotificationDialogData RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet'; } from '@home/pages/notification/recipient/recipient-notification-dialog.component';
import { MatButton } from '@angular/material/button'; import { MatButton } from '@angular/material/button';
import { AuthState } from '@core/auth/auth.models'; import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors'; import { getCurrentAuthState } from '@core/auth/auth.selectors';
@ -110,6 +110,9 @@ export class RuleNotificationDialogComponent extends
componentLifecycleEvents: ComponentLifecycleEvent[] = Object.values(ComponentLifecycleEvent); componentLifecycleEvents: ComponentLifecycleEvent[] = Object.values(ComponentLifecycleEvent);
componentLifecycleEventTranslationMap = ComponentLifecycleEventTranslationMap; componentLifecycleEventTranslationMap = ComponentLifecycleEventTranslationMap;
deviceEvents: DeviceEvent[] = Object.values(DeviceEvent);
deviceEventTranslationMap = DeviceEventTranslationMap;
entityType = EntityType; entityType = EntityType;
entityTypes = Array.from(entityTypeTranslations.keys()).filter(type => !!this.entityType[type]); entityTypes = Array.from(entityTypeTranslations.keys()).filter(type => !!this.entityType[type]);
isAdd = true; isAdd = true;
@ -197,7 +200,8 @@ export class RuleNotificationDialogComponent extends
triggerConfig: this.fb.group({ triggerConfig: this.fb.group({
filterByDevice: [true], filterByDevice: [true],
devices: [null], devices: [null],
deviceProfiles: [{value: null, disabled: true}] deviceProfiles: [{value: null, disabled: true}],
notifyOn: [[DeviceEvent.INACTIVE], Validators.required]
}) })
}); });
@ -215,7 +219,7 @@ export class RuleNotificationDialogComponent extends
this.entityActionTemplateForm = this.fb.group({ this.entityActionTemplateForm = this.fb.group({
triggerConfig: this.fb.group({ triggerConfig: this.fb.group({
entityType: [EntityType.DEVICE], entityTypes: [[EntityType.DEVICE], Validators.required],
created: [false], created: [false],
updated: [false], updated: [false],
deleted: [false] deleted: [false]
@ -262,7 +266,7 @@ export class RuleNotificationDialogComponent extends
this.triggerTypeFormsMap = new Map<TriggerType, FormGroup>([ this.triggerTypeFormsMap = new Map<TriggerType, FormGroup>([
[TriggerType.ALARM, this.alarmTemplateForm], [TriggerType.ALARM, this.alarmTemplateForm],
[TriggerType.ALARM_COMMENT, this.alarmCommentTemplateForm], [TriggerType.ALARM_COMMENT, this.alarmCommentTemplateForm],
[TriggerType.DEVICE_INACTIVITY, this.deviceInactivityTemplateForm], [TriggerType.DEVICE_ACTIVITY, this.deviceInactivityTemplateForm],
[TriggerType.ENTITY_ACTION, this.entityActionTemplateForm], [TriggerType.ENTITY_ACTION, this.entityActionTemplateForm],
[TriggerType.ALARM_ASSIGNMENT, this.alarmAssignmentTemplateForm], [TriggerType.ALARM_ASSIGNMENT, this.alarmAssignmentTemplateForm],
[TriggerType.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT, this.ruleEngineEventsTemplateForm], [TriggerType.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT, this.ruleEngineEventsTemplateForm],
@ -283,7 +287,7 @@ export class RuleNotificationDialogComponent extends
this.ruleNotificationForm.get('triggerType').updateValueAndValidity({onlySelf: true}); this.ruleNotificationForm.get('triggerType').updateValueAndValidity({onlySelf: true});
const currentForm = this.triggerTypeFormsMap.get(this.ruleNotification.triggerType); const currentForm = this.triggerTypeFormsMap.get(this.ruleNotification.triggerType);
currentForm.patchValue(this.ruleNotification, {emitEvent: false}); currentForm.patchValue(this.ruleNotification, {emitEvent: false});
if (this.ruleNotification.triggerType === TriggerType.DEVICE_INACTIVITY) { if (this.ruleNotification.triggerType === TriggerType.DEVICE_ACTIVITY) {
this.deviceInactivityTemplateForm.get('triggerConfig.filterByDevice') this.deviceInactivityTemplateForm.get('triggerConfig.filterByDevice')
.patchValue(!!this.ruleNotification.triggerConfig.devices, {onlySelf: true}); .patchValue(!!this.ruleNotification.triggerConfig.devices, {onlySelf: true});
} }
@ -329,7 +333,7 @@ export class RuleNotificationDialogComponent extends
const triggerType: TriggerType = this.ruleNotificationForm.get('triggerType').value; const triggerType: TriggerType = this.ruleNotificationForm.get('triggerType').value;
const currentForm = this.triggerTypeFormsMap.get(triggerType); const currentForm = this.triggerTypeFormsMap.get(triggerType);
Object.assign(formValue, currentForm.value); Object.assign(formValue, currentForm.value);
if (triggerType === TriggerType.DEVICE_INACTIVITY) { if (triggerType === TriggerType.DEVICE_ACTIVITY) {
delete formValue.triggerConfig.filterByDevice; delete formValue.triggerConfig.filterByDevice;
} }
formValue.recipientsConfig.triggerType = triggerType; formValue.recipientsConfig.triggerType = triggerType;

View File

@ -41,7 +41,7 @@ import { getCurrentTime } from '@shared/models/time/time.models';
import { import {
RecipientNotificationDialogComponent, RecipientNotificationDialogComponent,
RecipientNotificationDialogData RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet'; } from '@home/pages/notification/recipient/recipient-notification-dialog.component';
import { MatButton } from '@angular/material/button'; import { MatButton } from '@angular/material/button';
import { TemplateConfiguration } from '@home/pages/notification/template/template-configuration'; import { TemplateConfiguration } from '@home/pages/notification/template/template-configuration';

View File

@ -133,7 +133,6 @@ export class TemplateAutocompleteComponent implements ControlValueAccessor, OnIn
} }
}), }),
map(value => value ? (typeof value === 'string' ? value : value.name) : ''), map(value => value ? (typeof value === 'string' ? value : value.name) : ''),
distinctUntilChanged(),
switchMap(name => this.fetchTemplate(name)), switchMap(name => this.fetchTemplate(name)),
share() share()
); );

View File

@ -203,6 +203,16 @@ export const AlarmAssignmentActionTranslationMap = new Map<AlarmAssignmentAction
[AlarmAssignmentAction.UNASSIGNED, 'notification.notify-alarm-action.unassigned'] [AlarmAssignmentAction.UNASSIGNED, 'notification.notify-alarm-action.unassigned']
]); ]);
export enum DeviceEvent {
ACTIVE = 'ACTIVE',
INACTIVE = 'INACTIVE'
}
export const DeviceEventTranslationMap = new Map<DeviceEvent, string>([
[DeviceEvent.ACTIVE, 'notification.active'],
[DeviceEvent.INACTIVE, 'notification.inactive']
]);
export interface NotificationRuleRecipientConfig { export interface NotificationRuleRecipientConfig {
targets?: Array<string>; targets?: Array<string>;
escalationTable?: {[key: number]: Array<string>}; escalationTable?: {[key: number]: Array<string>};
@ -415,7 +425,7 @@ export const NotificationTargetConfigTypeInfoMap = new Map<NotificationTargetCon
export enum NotificationType { export enum NotificationType {
GENERAL = 'GENERAL', GENERAL = 'GENERAL',
ALARM = 'ALARM', ALARM = 'ALARM',
DEVICE_INACTIVITY = 'DEVICE_INACTIVITY', DEVICE_ACTIVITY = 'DEVICE_ACTIVITY',
ENTITY_ACTION = 'ENTITY_ACTION', ENTITY_ACTION = 'ENTITY_ACTION',
ALARM_COMMENT = 'ALARM_COMMENT', ALARM_COMMENT = 'ALARM_COMMENT',
ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT', ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT',
@ -425,7 +435,7 @@ export enum NotificationType {
export const NotificationTypeIcons = new Map<NotificationType, string | null>([ export const NotificationTypeIcons = new Map<NotificationType, string | null>([
[NotificationType.ALARM, 'warning'], [NotificationType.ALARM, 'warning'],
[NotificationType.DEVICE_INACTIVITY, 'phonelink_off'], [NotificationType.DEVICE_ACTIVITY, 'phonelink_off'],
[NotificationType.ENTITY_ACTION, 'devices'], [NotificationType.ENTITY_ACTION, 'devices'],
[NotificationType.ALARM_COMMENT, 'comment'], [NotificationType.ALARM_COMMENT, 'comment'],
[NotificationType.ALARM_ASSIGNMENT, 'assignment_turned_in'], [NotificationType.ALARM_ASSIGNMENT, 'assignment_turned_in'],
@ -471,10 +481,10 @@ export const NotificationTemplateTypeTranslateMap = new Map<NotificationType, No
helpId: 'notification/alarm' helpId: 'notification/alarm'
} }
], ],
[NotificationType.DEVICE_INACTIVITY, [NotificationType.DEVICE_ACTIVITY,
{ {
name: 'notification.template-type.device-inactivity', name: 'notification.template-type.device-activity',
helpId: 'notification/device_inactivity' helpId: 'notification/device_activity'
} }
], ],
[NotificationType.ENTITY_ACTION, [NotificationType.ENTITY_ACTION,
@ -510,7 +520,7 @@ export const NotificationTemplateTypeTranslateMap = new Map<NotificationType, No
export enum TriggerType { export enum TriggerType {
ALARM = 'ALARM', ALARM = 'ALARM',
DEVICE_INACTIVITY = 'DEVICE_INACTIVITY', DEVICE_ACTIVITY = 'DEVICE_ACTIVITY',
ENTITY_ACTION = 'ENTITY_ACTION', ENTITY_ACTION = 'ENTITY_ACTION',
ALARM_COMMENT = 'ALARM_COMMENT', ALARM_COMMENT = 'ALARM_COMMENT',
ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT', ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT',
@ -520,7 +530,7 @@ export enum TriggerType {
export const TriggerTypeTranslationMap = new Map<TriggerType, string>([ export const TriggerTypeTranslationMap = new Map<TriggerType, string>([
[TriggerType.ALARM, 'notification.trigger.alarm'], [TriggerType.ALARM, 'notification.trigger.alarm'],
[TriggerType.DEVICE_INACTIVITY, 'notification.trigger.device-inactivity'], [TriggerType.DEVICE_ACTIVITY, 'notification.trigger.device-activity'],
[TriggerType.ENTITY_ACTION, 'notification.trigger.entity-action'], [TriggerType.ENTITY_ACTION, 'notification.trigger.entity-action'],
[TriggerType.ALARM_COMMENT, 'notification.trigger.alarm-comment'], [TriggerType.ALARM_COMMENT, 'notification.trigger.alarm-comment'],
[TriggerType.ALARM_ASSIGNMENT, 'notification.trigger.alarm-assignment'], [TriggerType.ALARM_ASSIGNMENT, 'notification.trigger.alarm-assignment'],

View File

@ -173,6 +173,7 @@ import { CustomDateAdapter } from '@shared/adapter/custom-datatime-adapter';
import { CustomPaginatorIntl } from '@shared/services/custom-paginator-intl'; import { CustomPaginatorIntl } from '@shared/services/custom-paginator-intl';
import { TbScriptLangComponent } from '@shared/components/script-lang.component'; import { TbScriptLangComponent } from '@shared/components/script-lang.component';
import { NotificationComponent } from '@shared/components/notification/notification.component'; import { NotificationComponent } from '@shared/components/notification/notification.component';
import { SlackConversationAutocompleteComponent } from '@shared/components/slack-conversation-autocomplete.component';
import { DateAgoPipe } from '@shared/pipe/date-ago.pipe'; import { DateAgoPipe } from '@shared/pipe/date-ago.pipe';
export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) { export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) {
@ -323,6 +324,7 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
PhoneInputComponent, PhoneInputComponent,
TbScriptLangComponent, TbScriptLangComponent,
NotificationComponent, NotificationComponent,
SlackConversationAutocompleteComponent,
DateAgoPipe DateAgoPipe
], ],
imports: [ imports: [
@ -535,6 +537,7 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
PhoneInputComponent, PhoneInputComponent,
TbScriptLangComponent, TbScriptLangComponent,
NotificationComponent, NotificationComponent,
SlackConversationAutocompleteComponent,
DateAgoPipe DateAgoPipe
] ]
}) })

View File

@ -2729,6 +2729,7 @@
"notification": { "notification": {
"action-button": "Action button", "action-button": "Action button",
"action-type": "Action type", "action-type": "Action type",
"active": "Active",
"add-notification-recipients-group": "Add notification recipients group", "add-notification-recipients-group": "Add notification recipients group",
"add-notification-template": "Add notification template", "add-notification-template": "Add notification template",
"add-recipient": "Add recipient", "add-recipient": "Add recipient",
@ -2791,7 +2792,7 @@
}, },
"delivery-methods": "Delivery methods", "delivery-methods": "Delivery methods",
"description": "Description", "description": "Description",
"device-inactivity-trigger-settings": "Device inactive trigger settings", "device-activity-trigger-settings": "Device active trigger settings",
"device-list-rule-hint": "If the field is empty, the trigger will be applied to all devices", "device-list-rule-hint": "If the field is empty, the trigger will be applied to all devices",
"device-profiles-list-rule-hint": "If the field is empty, the trigger will be applied to all device profiles", "device-profiles-list-rule-hint": "If the field is empty, the trigger will be applied to all device profiles",
"edit-notification-recipients-group": "Edit notification recipients group", "edit-notification-recipients-group": "Edit notification recipients group",
@ -2806,6 +2807,7 @@
"fails": "Fails", "fails": "Fails",
"filter": "Filter", "filter": "Filter",
"first-recipient": "First recipient", "first-recipient": "First recipient",
"inactive": "Inactive",
"inbox": "Inbox", "inbox": "Inbox",
"input-field-support-templatization": "Input field support templatization.", "input-field-support-templatization": "Input field support templatization.",
"input-fields-support-templatization": "Input fields support templatization.", "input-fields-support-templatization": "Input fields support templatization.",
@ -2919,7 +2921,7 @@
"alarm": "Alarm", "alarm": "Alarm",
"alarm-assignment": "Alarm assignment", "alarm-assignment": "Alarm assignment",
"alarm-comment": "Alarm comment", "alarm-comment": "Alarm comment",
"device-inactivity": "Device inactivity", "device-activity": "Device activity",
"entities-limit": "Entities limit", "entities-limit": "Entities limit",
"entity-action": "Entity action", "entity-action": "Entity action",
"general": "General", "general": "General",
@ -2935,7 +2937,7 @@
"alarm": "Alarm", "alarm": "Alarm",
"alarm-assignment": "Alarm assignment", "alarm-assignment": "Alarm assignment",
"alarm-comment": "Alarm comment", "alarm-comment": "Alarm comment",
"device-inactivity": "Device inactivity", "device-activity": "Device activity",
"entities-limit": "Entities limit", "entities-limit": "Entities limit",
"entity-action": "Entity action", "entity-action": "Entity action",
"rule-engine-lifecycle-event": "Rule engine lifecycle event", "rule-engine-lifecycle-event": "Rule engine lifecycle event",