((_, item) => item),
@@ -248,18 +245,19 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
defaultItemCols: 8,
defaultItemRows: 6,
displayGrid: this.displayGrid,
- resizable: {enabled: this.isEdit && !this.isEditingWidget, delayStart: 50},
- draggable: {enabled: this.isEdit && !this.isEditingWidget},
+ resizable: {
+ enabled: this.isEdit && !this.isEditingWidget,
+ delayStart: 50,
+ stop: (_, itemComponent) => {(itemComponent.item as DashboardWidget).updatePosition(itemComponent.$item.x, itemComponent.$item.y);}
+ },
+ draggable: {
+ enabled: this.isEdit && !this.isEditingWidget,
+ delayStart: 100,
+ stop: (_, itemComponent) => {(itemComponent.item as DashboardWidget).updatePosition(itemComponent.$item.x, itemComponent.$item.y);}
+ },
itemChangeCallback: () => this.dashboardWidgets.sortWidgets(),
itemInitCallback: (_, itemComponent) => {
(itemComponent.item as DashboardWidget).gridsterItemComponent = itemComponent;
- },
- colWidthUpdateCallback: (colWidth) => {
- if (this.colWidthInteger) {
- return Math.floor(colWidth);
- } else {
- return colWidth;
- }
}
};
@@ -354,7 +352,9 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
ngAfterViewInit(): void {
this.gridsterResize$ = new ResizeObserver(() => {
- this.onGridsterParentResize();
+ this.ngZone.run(() => {
+ this.onGridsterParentResize();
+ });
});
this.gridsterResize$.observe(this.gridster.el.parentElement);
}
@@ -397,7 +397,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
}
}
- openDashboardContextMenu($event: MouseEvent) {
+ openDashboardContextMenu($event: TbContextMenuEvent) {
if (this.callbacks && this.callbacks.prepareDashboardContextMenu) {
const items = this.callbacks.prepareDashboardContextMenu($event);
if (items && items.length) {
@@ -412,7 +412,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
}
}
- private openWidgetContextMenu($event: MouseEvent, widget: DashboardWidget) {
+ private openWidgetContextMenu($event: TbContextMenuEvent, widget: DashboardWidget) {
if (this.callbacks && this.callbacks.prepareWidgetContextMenu) {
const items = this.callbacks.prepareWidgetContextMenu($event, widget.widget, widget.isReference);
if (items && items.length) {
diff --git a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
index 75f44be0b3..96b272f2d2 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
+++ b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
@@ -22,7 +22,7 @@ import {
ComponentFactoryResolver,
ElementRef,
EventEmitter,
- Input,
+ Input, NgZone,
OnChanges,
OnDestroy,
OnInit,
@@ -142,7 +142,8 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
private router: Router,
private componentFactoryResolver: ComponentFactoryResolver,
private elementRef: ElementRef,
- private fb: FormBuilder) {
+ private fb: FormBuilder,
+ private zone: NgZone) {
super(store);
}
@@ -157,11 +158,13 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
});
}
this.widgetResize$ = new ResizeObserver(() => {
- const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
- if (showHidePageSize !== this.hidePageSize) {
- this.hidePageSize = showHidePageSize;
- this.cd.markForCheck();
- }
+ this.zone.run(() => {
+ const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
+ if (showHidePageSize !== this.hidePageSize) {
+ this.hidePageSize = showHidePageSize;
+ this.cd.markForCheck();
+ }
+ });
});
this.widgetResize$.observe(this.elementRef.nativeElement);
}
@@ -432,8 +435,8 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
}
}
- private getTimePageLinkInterval(): {startTime?: number, endTime?: number} {
- const interval: {startTime?: number, endTime?: number} = {};
+ private getTimePageLinkInterval(): {startTime?: number; endTime?: number} {
+ const interval: {startTime?: number; endTime?: number} = {};
switch (this.timewindow.history.historyType) {
case HistoryWindowType.LAST_INTERVAL:
const currentTime = Date.now();
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
index 0bda4c08c2..08e1de73f2 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
@@ -530,8 +530,10 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
this.removeObserveAttrTelemetryFromJson(ATTRIBUTE, value.keyId);
this.removeKeyNameFromJson(value.keyId);
this.removeAttributesFromJson(value.keyId);
- this.updateObserveAttrTelemetryObjectFormGroup(objectsOld);
- }
+ this.lwm2mDeviceProfileFormGroup.patchValue({
+ observeAttrTelemetry: deepClone(objectsOld)
+ }, {emitEvent: false});
+ };
private removeObserveAttrTelemetryFromJson = (observeAttrTel: string, keyId: string): void => {
const isIdIndex = (element) => element.startsWith(`/${keyId}`);
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 670eafc63f..d0bf8bb8e2 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
@@ -20,7 +20,7 @@ import {
ChangeDetectorRef,
Component,
ElementRef,
- Input,
+ Input, NgZone,
OnDestroy,
OnInit,
ViewChild
@@ -121,7 +121,8 @@ export class RelationTableComponent extends PageComponent implements AfterViewIn
private dialogService: DialogService,
private cd: ChangeDetectorRef,
private elementRef: ElementRef,
- private fb: FormBuilder) {
+ private fb: FormBuilder,
+ private zone: NgZone) {
super(store);
this.dirtyValue = !this.activeValue;
const sortOrder: SortOrder = { property: 'type', direction: Direction.ASC };
@@ -133,11 +134,13 @@ 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.zone.run(() => {
+ const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
+ if (showHidePageSize !== this.hidePageSize) {
+ this.hidePageSize = showHidePageSize;
+ this.cd.markForCheck();
+ }
+ });
});
this.widgetResize$.observe(this.elementRef.nativeElement);
}
diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.ts b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.ts
index a432d4898f..c39b1b1ee3 100644
--- a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.ts
+++ b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.ts
@@ -20,7 +20,7 @@ import {
Component,
ElementRef,
EventEmitter,
- Input,
+ Input, NgZone,
OnDestroy,
OnInit,
Output,
@@ -141,7 +141,8 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
private cd: ChangeDetectorRef,
private viewContainerRef: ViewContainerRef,
private elementRef: ElementRef,
- private fb: FormBuilder) {
+ private fb: FormBuilder,
+ private zone: NgZone) {
super(store);
this.dirtyValue = !this.activeValue;
const sortOrder: SortOrder = { property: 'timestamp', direction: Direction.DESC };
@@ -151,11 +152,13 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
ngOnInit() {
this.componentResize$ = new ResizeObserver(() => {
- const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
- if (showHidePageSize !== this.hidePageSize) {
- this.hidePageSize = showHidePageSize;
- this.cd.markForCheck();
- }
+ this.zone.run(() => {
+ const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
+ if (showHidePageSize !== this.hidePageSize) {
+ this.hidePageSize = showHidePageSize;
+ this.cd.markForCheck();
+ }
+ });
});
this.componentResize$.observe(this.elementRef.nativeElement);
this.isReadOnly = this.adminService.getRepositorySettingsInfo().pipe(map(settings => settings.readOnly));
diff --git a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts
index 92be318fc2..2a83f97b80 100644
--- a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts
@@ -20,7 +20,7 @@ import {
Component,
ElementRef,
forwardRef,
- Input,
+ Input, NgZone,
OnDestroy,
OnInit,
ViewChild
@@ -105,7 +105,8 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni
private dialog: MatDialog,
private dialogs: DialogService,
private cd: ChangeDetectorRef,
- private elementRef: ElementRef) {
+ private elementRef: ElementRef,
+ private zone: NgZone) {
super(store);
const sortOrder: SortOrder = { property: 'actionSourceName', direction: Direction.ASC };
this.pageLink = new PageLink(10, 0, null, sortOrder);
@@ -115,11 +116,13 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni
ngOnInit(): void {
this.widgetResize$ = new ResizeObserver(() => {
- const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
- if (showHidePageSize !== this.hidePageSize) {
- this.hidePageSize = showHidePageSize;
- this.cd.markForCheck();
- }
+ this.zone.run(() => {
+ const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
+ if (showHidePageSize !== this.hidePageSize) {
+ this.hidePageSize = showHidePageSize;
+ this.cd.markForCheck();
+ }
+ });
});
this.widgetResize$.observe(this.elementRef.nativeElement);
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/alarm/alarms-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/alarm/alarms-table-widget.component.html
index 0aca6e05bc..b8fc11aed5 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/alarm/alarms-table-widget.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/alarm/alarms-table-widget.component.html
@@ -88,24 +88,24 @@
-
-
- {{ getUserInitials(alarm) }}
+
+
+ {{ getUserInitials(alarm.assignee) }}
-
- {{ getUserDisplayName(alarm) }}
+
+ {{ getUserDisplayName(alarm.assignee) }}
-
- account_circle
-
- alarm.unassigned
+
+
+ {{ alarm.assigneeId ? 'no_accounts' : 'account_circle' }}
+
+ {{ (alarm.assigneeId ? 'alarm.user-deleted' : 'alarm.unassigned') | translate }}
+
-
+