diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss b/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss index d532fa1ec3..a3e9f3bdf1 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss +++ b/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss @@ -46,7 +46,7 @@ } .action-buttons { - color: rgba(0,0,0,.54); + color: rgba(0, 0, 0, .54); } } @@ -55,52 +55,9 @@ flex-direction: column; flex: 1 1 100%; } - - //.mat-toolbar-tools{ - // min-height: auto; - //} - // - //.title-container{ - // overflow: hidden; - //} - // - //.tb-entity-table-title { - // padding-right: 20px; - // white-space: nowrap; - // overflow: hidden; - // text-overflow: ellipsis; - //} - // - //.table-container { - // overflow: auto; - //} - // - //.tb-entity-table-info{ - // white-space: nowrap; - // overflow: hidden; - // text-overflow: ellipsis; - //} - // - //.button-widget-action{ - // margin-left: auto; - // overflow: hidden; - // text-overflow: ellipsis; - //} } } - //@media #{$mat-xs} { - // .mat-toolbar { - // height: auto; - // min-height: 100px; - // - // .tb-entity-table-title{ - // padding-bottom: 5px; - // width: 100%; - // } - // } - //} - @media #{$mat-xs} { .tb-notification-center { .tb-notification-center-content { @@ -158,32 +115,18 @@ } } } -} -//:host ::ng-deep { -// .mat-sort-header-sorted .mat-sort-header-arrow { -// opacity: 1 !important; -// } -// tb-branch-autocomplete { -// mat-form-field { -// font-size: 16px; -// width: 250px; -// -// .mat-form-field-wrapper { -// padding-bottom: 0; -// } -// -// .mat-form-field-underline { -// bottom: 0; -// } -// -// @media #{$mat-xs} { -// width: 100%; -// -// .mat-form-field-infix { -// width: auto !important; -// } -// } -// } -// } -//} + @media #{$mat-xs} { + .tabs-container { + .mat-tab-group { + > .mat-tab-header { + .mat-tab-label { + &.mat-tab-disabled { + width: auto; + } + } + } + } + } + } +} diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts b/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts index 584c244e63..e51ac5507f 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts +++ b/ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts @@ -51,6 +51,7 @@ import { EscalationFormComponent } from '@home/pages/notification-center/rule-ta import { AlarmSeveritiesListComponent } from '@home/pages/notification-center/rule-table/alarm-severities-list.component'; +import { TemplateConfiguration } from '@home/pages/notification-center/template-table/template-configuration'; @NgModule({ declarations: [ diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/rule-table-config.ts b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/rule-table-config.ts index e97a748eee..346843d6aa 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/rule-table-config.ts +++ b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/rule-table-config.ts @@ -39,6 +39,8 @@ export class RuleTableConfig extends EntityTableConfig { private dialog: MatDialog) { super(); this.loadDataOnInit = false; + this.rowPointer = true; + this.entityTranslations = { noEntities: 'notification.no-rules-notification', search: 'notification.search-rules' @@ -57,6 +59,11 @@ export class RuleTableConfig extends EntityTableConfig { this.defaultSortOrder = {property: 'name', direction: Direction.ASC}; + this.handleRowClick = ($event, rule) => { + this.editRule($event, rule) + return true; + } + this.columns.push( new EntityTableColumn('name', 'notification.rule-name', '30%'), new EntityTableColumn('templateName', 'notification.template', '20%'), @@ -75,11 +82,6 @@ export class RuleTableConfig extends EntityTableConfig { icon: 'content_copy', isEnabled: () => true, onAction: ($event, entity) => this.editRule($event, entity, false, true) - }, { - name: this.translate.instant('notification.edit-rule'), - icon: 'edit', - isEnabled: () => true, - onAction: ($event, entity) => this.editRule($event, entity) }]; } diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/targets-table-config.ts b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/targets-table-config.ts index e4f428047f..8b2d9da907 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/targets-table-config.ts +++ b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/targets-table-config.ts @@ -41,6 +41,8 @@ export class TargetsTableConfig extends EntityTableConfig { private dialog: MatDialog) { super(); this.loadDataOnInit = false; + this.rowPointer = true; + this.entityTranslations = { noEntities: 'notification.no-targets-notification', search: 'notification.search-targets' @@ -60,6 +62,11 @@ export class TargetsTableConfig extends EntityTableConfig { this.defaultSortOrder = {property: 'name', direction: Direction.ASC}; + this.handleRowClick = ($event, target) => { + this.editTarget($event, target); + return true; + } + this.columns.push( new EntityTableColumn('name', 'notification.notification-target', '20%'), new EntityTableColumn('configuration.type', 'notification.type', '40%', @@ -72,12 +79,7 @@ export class TargetsTableConfig extends EntityTableConfig { } private configureCellActions(): Array> { - return [{ - name: this.translate.instant('device.make-public'), - icon: 'edit', - isEnabled: () => true, - onAction: ($event, entity) => this.editTarget($event, entity) - }]; + return []; } private editTarget($event: Event, target: NotificationTarget, isAdd = false) { diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/template-table-config.ts b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/template-table-config.ts index d41dd4c8ca..c14db49877 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/template-table-config.ts +++ b/ui-ngx/src/app/modules/home/pages/notification-center/notification-table/template-table-config.ts @@ -41,6 +41,8 @@ export class TemplateTableConfig extends EntityTableConfig private dialog: MatDialog) { super(); this.loadDataOnInit = false; + this.rowPointer = true; + this.entityTranslations = { noEntities: 'notification.no-notification-templates', search: 'notification.search-templates' @@ -60,6 +62,11 @@ export class TemplateTableConfig extends EntityTableConfig this.defaultSortOrder = {property: 'notificationType', direction: Direction.ASC}; + this.handleRowClick = ($event, template) => { + this.editTemplate($event, template) + return true; + } + this.columns.push( new EntityTableColumn('notificationType', 'notification.type', '15%', (template) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(template.notificationType).name)), @@ -78,11 +85,6 @@ export class TemplateTableConfig extends EntityTableConfig icon: 'content_copy', isEnabled: () => true, onAction: ($event, entity) => this.editTemplate($event, entity, false, true) - }, { - name: this.translate.instant('notification.edit-template'), - icon: 'edit', - isEnabled: () => true, - onAction: ($event, entity) => this.editTemplate($event, entity) } ]; } diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.html index 33ad14aee0..4e47d48348 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.html @@ -55,19 +55,21 @@
- + 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.hierarchy-of-receiving
@@ -87,7 +87,7 @@ {{ 'notification.alarm-trigger-settings' | translate }}
-
+
notification.filter
-
+
notification.clear-rule alarm.alarm-status-list @@ -132,7 +132,6 @@ {{ 'notification.device-inactivity-trigger-settings' | translate }}
- notification.filter-by
{{ 'notification.entity-action-trigger-settings' | translate }} -
+
notification.filter - +

{{ (isAdd ? 'notification.add-notification-target' : 'notification.edit-notification-target') | translate }}

@@ -77,9 +77,7 @@ -
-
{{ slackChanelTypesTranslateMap.get(slackChanelType) | translate }}
-
+ {{ slackChanelTypesTranslateMap.get(slackChanelType) | translate }}
extends DialogComponent< notificationDeliveryMethods = Object.keys(NotificationDeliveryMethod) as NotificationDeliveryMethod[]; notificationDeliveryMethodTranslateMap = NotificationDeliveryMethodTranslateMap; + notificationTemplateTypeTranslateMap = NotificationTemplateTypeTranslateMap; tinyMceOptions: Record = { base_url: '/assets/tinymce', diff --git a/ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.html index b8f587f5d5..fbb6429b05 100644 --- a/ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.html @@ -50,22 +50,23 @@ {{ notificationTemplateTypeTranslateMap.get(notificationType).name | translate }} - {{ notificationTemplateTypeTranslateMap.get(templateNotificationForm.get('notificationType').value).hint | translate }}
- + 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 }}