diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.scss b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.scss
index 3546e48ca4..8596462c3e 100644
--- a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.scss
+++ b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.scss
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2021 The Thingsboard Authors
+ * Copyright © 2016-2022 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.ts b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.ts
index 20ea89e53c..81ec55261e 100644
--- a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.ts
@@ -1,5 +1,5 @@
///
-/// Copyright © 2016-2021 The Thingsboard Authors
+/// Copyright © 2016-2022 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
@@ -97,7 +97,9 @@ export class DeviceProfileAlarmComponent implements ControlValueAccessor, OnInit
createRules: [null],
clearRule: [null],
propagate: [null],
- propagateRelationTypes: [null]
+ propagateRelationTypes: [null],
+ propagateToOwner: [null],
+ propagateToTenant: [null]
}, { validators: deviceProfileAlarmValidator });
this.alarmFormGroup.valueChanges.subscribe(() => {
this.updateModel();
diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html
index df0d5af5a3..dde3df31c1 100644
--- a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html
+++ b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html
@@ -1,6 +1,6 @@
diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss b/ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss
index dfb94a7383..453c4ab897 100644
--- a/ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss
+++ b/ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss
@@ -1,5 +1,5 @@
/**
- * Copyright © 2016-2021 The Thingsboard Authors
+ * Copyright © 2016-2022 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
:host {
width: 100%;
height: 100%;
+ display: block;
.tb-entity-table {
.tb-entity-table-content {
width: 100%;
@@ -41,6 +42,9 @@
.table-container {
overflow: auto;
+ .link {
+ border-bottom: none;
+ }
}
.tb-entity-table-info{
diff --git a/ui-ngx/src/app/modules/home/components/relation/relation-table.component.ts b/ui-ngx/src/app/modules/home/components/relation/relation-table.component.ts
index b10ed82249..6b2649ec9a 100644
--- a/ui-ngx/src/app/modules/home/components/relation/relation-table.component.ts
+++ b/ui-ngx/src/app/modules/home/components/relation/relation-table.component.ts
@@ -1,5 +1,5 @@
///
-/// Copyright © 2016-2021 The Thingsboard Authors
+/// Copyright © 2016-2022 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
@@ -14,7 +14,16 @@
/// limitations under the License.
///
-import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
+import {
+ AfterViewInit,
+ ChangeDetectionStrategy,
+ ChangeDetectorRef,
+ Component,
+ ElementRef,
+ Input,
+ OnInit,
+ ViewChild
+} from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
import { PageLink } from '@shared/models/page/page-link';
import { MatPaginator } from '@angular/material/paginator';
@@ -38,6 +47,8 @@ import {
import { EntityId } from '@shared/models/id/entity-id';
import { RelationsDatasource } from '../../models/datasource/relation-datasource';
import { RelationDialogComponent, RelationDialogData } from '@home/components/relation/relation-dialog.component';
+import { hidePageSizePixelValue } from '@shared/models/constants';
+import { ResizeObserver } from '@juggle/resize-observer';
@Component({
selector: 'tb-relation-table',
@@ -56,6 +67,7 @@ export class RelationTableComponent extends PageComponent implements AfterViewIn
displayedColumns: string[];
direction: EntitySearchDirection;
pageLink: PageLink;
+ hidePageSize = false;
textSearchMode = false;
dataSource: RelationsDatasource;
@@ -65,6 +77,8 @@ export class RelationTableComponent extends PageComponent implements AfterViewIn
viewsInited = false;
+ private widgetResize$: ResizeObserver;
+
@Input()
set active(active: boolean) {
if (this.activeValue !== active) {
@@ -100,7 +114,9 @@ export class RelationTableComponent extends PageComponent implements AfterViewIn
private entityRelationService: EntityRelationService,
public translate: TranslateService,
public dialog: MatDialog,
- private dialogService: DialogService) {
+ private dialogService: DialogService,
+ private cd: ChangeDetectorRef,
+ private elementRef: ElementRef) {
super(store);
this.dirtyValue = !this.activeValue;
const sortOrder: SortOrder = { property: 'type', direction: Direction.ASC };
@@ -111,6 +127,20 @@ export class RelationTableComponent extends PageComponent implements AfterViewIn
}
ngOnInit() {
+ this.widgetResize$ = new ResizeObserver(() => {
+ const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
+ if (showHidePageSize !== this.hidePageSize) {
+ this.hidePageSize = showHidePageSize;
+ this.cd.markForCheck();
+ }
+ });
+ this.widgetResize$.observe(this.elementRef.nativeElement);
+ }
+
+ ngOnDestroy() {
+ if (this.widgetResize$) {
+ this.widgetResize$.disconnect();
+ }
}
updateColumns() {
diff --git a/ui-ngx/src/app/modules/home/components/rule-chain/rule-chain-autocomplete.component.html b/ui-ngx/src/app/modules/home/components/rule-chain/rule-chain-autocomplete.component.html
index c3ee17288e..fd99e1bc54 100644
--- a/ui-ngx/src/app/modules/home/components/rule-chain/rule-chain-autocomplete.component.html
+++ b/ui-ngx/src/app/modules/home/components/rule-chain/rule-chain-autocomplete.component.html
@@ -1,6 +1,6 @@
-