dashboard.title
- @if (tbEditWidget.widgetConfig?.hasBasicMode) {
+ @if (tbEditWidget.widgetConfig?.hasBasicMode && !isHtml) {
{{ 'widget.basic-mode' | translate }}
{{ 'widget.advanced-mode' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
index 2b27e54fbd..fe1d2663c9 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
@@ -67,6 +67,7 @@ import { EntityService } from '@core/http/entity.service';
import { AliasController } from '@core/api/alias-controller';
import { BehaviorSubject, Observable, of, Subject, Subscription, throwError } from 'rxjs';
import { DashboardUtilsService } from '@core/services/dashboard-utils.service';
+import { HtmlContainerWidgetSettings } from '@shared/models/html-container.models';
import { DashboardService } from '@core/http/dashboard.service';
import {
DashboardContextMenuItem,
@@ -196,6 +197,10 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
return ((this.hideToolbarValue || this.hideToolbarSetting()) && !this.isEdit) || (this.isEditingWidget || this.isAddingWidget);
}
+ get isHtml(): boolean {
+ return this.layouts.main?.layoutCtx?.gridSettings?.layoutType === LayoutType.html;
+ }
+
@Input()
hideMainToolbar = true;
@@ -1086,7 +1091,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
}
let gridSettings: GridSettings = null;
const layoutKeys = this.dashboardUtils.isSingleLayoutDashboard(this.dashboard);
- if (layoutKeys) {
+ // An HTML page has no widget grid, so the dialog shows only the dashboard settings.
+ if (layoutKeys && !this.isHtml) {
const layouts = this.dashboardUtils.getDashboardLayoutConfig(
this.dashboard.configuration.states[layoutKeys.state].layouts[layoutKeys.layout],
this.layouts[layoutKeys.layout].layoutCtx.breakpoint);
@@ -1114,6 +1120,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
this.dashboardUtils.updateLayoutSettings(layoutConfig, newGridSettings);
this.updateDashboardLayouts(layouts);
}
+ this.cd.markForCheck();
}
});
}
@@ -1584,13 +1591,22 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
const widget = this.dashboardUtils.prepareWidgetForSaving(deepClone(this.editingWidget));
const widgetLayout = deepClone(this.editingWidgetLayout);
const id = this.editingWidgetOriginal.id;
- this.dashboardConfiguration.widgets[id] = widget;
this.editingWidgetOriginal = widget;
this.editingWidgetLayoutOriginal = widgetLayout;
- this.editingLayoutCtx.widgetLayouts[widget.id] = widgetLayout;
- setTimeout(() => {
- this.editingLayoutCtx.ctrl.highlightWidget(widget.id, 0);
- }, 0);
+ if (this.isHtml) {
+ const state = this.dashboardConfiguration.states[this.dashboardCtx.state];
+ state.layouts.main.gridSettings.htmlPageConfig = {
+ settings: widget.config.settings as HtmlContainerWidgetSettings,
+ actions: widget.config.actions
+ };
+ this.updateLayouts();
+ } else {
+ this.dashboardConfiguration.widgets[id] = widget;
+ this.editingLayoutCtx.widgetLayouts[widget.id] = widgetLayout;
+ setTimeout(() => {
+ this.editingLayoutCtx.ctrl.highlightWidget(widget.id, 0);
+ }, 0);
+ }
}
onEditWidgetClosed() {
@@ -1618,31 +1634,22 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
if (this.editingWidgetOriginal === widget) {
this.onEditWidgetClosed();
} else {
- const transition = !this.forceDashboardMobileMode;
- this.editingWidgetOriginal = widget;
- this.editingWidgetLayoutOriginal = layoutCtx.widgetLayouts[widget.id];
- this.editingWidget = deepClone(this.editingWidgetOriginal);
- this.editingWidgetLayout = deepClone(this.editingWidgetLayoutOriginal);
- this.editingLayoutCtx = layoutCtx;
- this.editingWidgetSubtitle = this.widgetComponentService.getInstantWidgetInfo(this.editingWidget).widgetName;
- this.forceDashboardMobileMode = true;
- this.isEditingWidget = true;
- this.updateLayoutSizes();
- if (layoutCtx) {
- const delayOffset = transition ? 350 : 0;
- const delay = transition ? 400 : 300;
- setTimeout(() => {
- layoutCtx.ctrl.highlightWidget(widget.id, delay);
- }, delayOffset);
- }
+ this.prepareWidgetEdit(widget, layoutCtx);
}
}
+ editHtmlPage($event: Event) {
+ $event.stopPropagation();
+ const layoutCtx = this.layouts.main?.layoutCtx;
+ const widget = layoutCtx.widgets.widgetByIndex(0);
+ this.prepareWidgetEdit(widget, layoutCtx, '');
+ }
+
showLayoutConfigInEdit(layoutCtx: DashboardPageLayoutContext): boolean {
- return layoutCtx?.gridSettings?.layoutType === LayoutType.divider ||
+ return layoutCtx?.gridSettings?.layoutType !== LayoutType.html && (layoutCtx?.gridSettings?.layoutType === LayoutType.divider ||
layoutCtx?.gridSettings?.layoutType === LayoutType.default &&
(layoutCtx?.breakpoint === 'default' ||
- layoutCtx?.breakpoint !== 'default' && layoutCtx?.gridSettings?.viewFormat === ViewFormatType.list);
+ layoutCtx?.breakpoint !== 'default' && layoutCtx?.gridSettings?.viewFormat === ViewFormatType.list));
}
replaceReferenceWithWidgetCopy($event: Event, layoutCtx: DashboardPageLayoutContext, widget: Widget) {
@@ -1726,14 +1733,14 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
}
widgetMouseDown($event: Event, layoutCtx: DashboardPageLayoutContext, widget: Widget) {
- if (this.isEdit && !this.isEditingWidget) {
+ if (this.isEdit && !this.isEditingWidget && !this.isHtml) {
layoutCtx.ctrl.selectWidget(widget.id, 0);
}
}
prepareDashboardContextMenu(layoutCtx: DashboardPageLayoutContext): Array {
const dashboardContextActions: Array = [];
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode && !this.isHtml) {
dashboardContextActions.push(
{
action: this.openDashboardSettings.bind(this),
@@ -1788,7 +1795,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
prepareWidgetContextMenu(layoutCtx: DashboardPageLayoutContext, widget: Widget, isReference: boolean): Array {
const widgetContextActions: Array = [];
- if (this.isEdit && !this.isEditingWidget) {
+ if (this.isEdit && !this.isEditingWidget && !this.isHtml) {
widgetContextActions.push(
{
action: (event, currentWidget) => {
@@ -1952,4 +1959,28 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
private getDashboardLogoLink(): UrlTree {
return this.forceFullscreen ? null : this.router.createUrlTree([], {relativeTo: this.route});
}
+
+ private prepareWidgetEdit(widget: Widget, layoutCtx: DashboardPageLayoutContext, subtitle?: string) {
+ const transition = !this.forceDashboardMobileMode;
+ this.editingWidgetOriginal = widget;
+ this.editingWidgetLayoutOriginal = layoutCtx.widgetLayouts[widget.id];
+ this.editingWidget = deepClone(this.editingWidgetOriginal);
+ this.editingWidgetLayout = deepClone(this.editingWidgetLayoutOriginal);
+ this.editingLayoutCtx = layoutCtx;
+ if (isDefinedAndNotNull(subtitle)) {
+ this.editingWidgetSubtitle = subtitle;
+ } else {
+ this.editingWidgetSubtitle = this.widgetComponentService.getInstantWidgetInfo(this.editingWidget).widgetName;
+ }
+ this.forceDashboardMobileMode = true;
+ this.isEditingWidget = true;
+ this.updateLayoutSizes();
+ if (layoutCtx) {
+ const delayOffset = transition ? 350 : 0;
+ const delay = transition ? 400 : 300;
+ setTimeout(() => {
+ layoutCtx.ctrl.highlightWidget(widget.id, delay);
+ }, delayOffset);
+ }
+ }
}
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts
index 5cbb4b709b..39207b18b5 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts
@@ -93,6 +93,8 @@ export class LayoutWidgetsArray implements Iterable {
private widgetIds: string[] = [];
+ private widget: Widget;
+
private loaded = false;
constructor(private dashboardCtx: DashboardContext) {
@@ -112,6 +114,13 @@ export class LayoutWidgetsArray implements Iterable {
setWidgetIds(widgetIds: string[]) {
this.widgetIds = widgetIds;
+ this.widget = null;
+ this.loaded = true;
+ }
+
+ setWidget(widget: Widget) {
+ this.widget = widget;
+ this.widgetIds = [this.widget.id];
this.loaded = true;
}
@@ -130,13 +139,19 @@ export class LayoutWidgetsArray implements Iterable {
[Symbol.iterator](): Iterator {
let pointer = 0;
+ const oneWidget = this.widget;
const widgetIds = this.widgetIds;
const dashboard = this.dashboardCtx.getDashboard();
return {
next(value?: any): IteratorResult {
if (pointer < widgetIds.length) {
const widgetId = widgetIds[pointer++];
- const widget = dashboard.configuration.widgets[widgetId];
+ let widget: Widget;
+ if (oneWidget && oneWidget.id === widgetId) {
+ widget = oneWidget;
+ } else {
+ widget = dashboard.configuration.widgets[widgetId];
+ }
return {
done: false,
value: widget
@@ -161,7 +176,11 @@ export class LayoutWidgetsArray implements Iterable {
}
private widgetById(widgetId: string): Widget {
- return this.dashboardCtx.getDashboard().configuration.widgets[widgetId];
+ if (this.widget && this.widget.id === widgetId) {
+ return this.widget;
+ } else {
+ return this.dashboardCtx.getDashboard().configuration.widgets[widgetId];
+ }
}
}
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.html
index 5284c797f1..c3537a8ce9 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.html
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.html
@@ -60,7 +60,7 @@
[aliasController]="dashboardCtx.aliasController"
[stateController]="dashboardCtx.stateController"
[dashboardTimewindow]="dashboardCtx.dashboardTimewindow"
- [isEdit]="isEdit"
+ [isEdit]="isEdit && !isHtml"
[isEditingWidget]="isEditingWidget"
[autofillHeight]="autoFillHeight"
[mobileAutofillHeight]="mobileAutoFillHeight"
@@ -68,9 +68,9 @@
[isMobile]="isMobileValue"
[isMobileDisabled]="isMobileDisabled"
[disableWidgetInteraction]="isEdit"
- [isEditActionEnabled]="isEdit && !isEditingWidget"
- [isExportActionEnabled]="isEdit && !widgetEditMode && !isEditingWidget"
- [isRemoveActionEnabled]="isEdit && !widgetEditMode && !isEditingWidget"
+ [isEditActionEnabled]="isEdit && !isEditingWidget && !isHtml"
+ [isExportActionEnabled]="isEdit && !widgetEditMode && !isEditingWidget && !isHtml"
+ [isRemoveActionEnabled]="isEdit && !widgetEditMode && !isEditingWidget && !isHtml"
[callbacks]="this"
[ignoreLoading]="layoutCtx.ignoreLoading"
[parentDashboard]="parentDashboard"
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts
index 7fcb115bdf..a622a8004a 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts
@@ -61,16 +61,34 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
return this.layoutCtx.gridSettings.layoutType === LayoutType.scada;
}
+ get isHtml(): boolean {
+ return this.layoutCtx.gridSettings.layoutType === LayoutType.html;
+ }
+
+ // The HTML page layout has no widget grid: its only widget is virtual and is not stored in the layout,
+ // so widgets cannot be copied from it, pasted into it, cut from it or referenced.
+ get widgetLayoutEditable(): boolean {
+ return this.isEdit && !this.isEditingWidget && !this.widgetEditMode && !this.isHtml;
+ }
+
+ get disableMargins(): boolean {
+ return this.isScada || this.isHtml;
+ }
+
get outerMargin(): boolean {
- return this.isScada ? false : this.layoutCtx.gridSettings.outerMargin;
+ return this.disableMargins ? false : this.layoutCtx.gridSettings.outerMargin;
}
get margin(): number {
- return this.isScada ? 0 : this.layoutCtx.gridSettings.margin;
+ return this.disableMargins ? 0 : this.layoutCtx.gridSettings.margin;
}
get autoFillHeight(): boolean {
- return (this.isEdit || this.isScada) ? false : this.layoutCtx.gridSettings.autoFillHeight;
+ if (this.isHtml) {
+ return true;
+ } else {
+ return (this.isEdit || this.isScada) ? false : this.layoutCtx.gridSettings.autoFillHeight;
+ }
}
get mobileAutoFillHeight(): boolean {
@@ -87,7 +105,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
}
get isMobileDisabled(): boolean {
- return this.widgetEditMode || this.isScada || (this.layoutCtx.breakpoint !== 'default' && !this.isMobileValue);
+ return this.widgetEditMode || this.isScada || this.isHtml || (this.layoutCtx.breakpoint !== 'default' && !this.isMobileValue);
}
get mobielRowHeigth(): number {
@@ -162,7 +180,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
private initHotKeys(): void {
this.hotKeys.push(
new Hotkey(['ctrl+c', 'meta+c'], (event: KeyboardEvent) => {
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.widgetLayoutEditable) {
const widget = this.dashboard.getSelectedWidget();
if (widget) {
event.preventDefault();
@@ -176,7 +194,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
);
this.hotKeys.push(
new Hotkey(['ctrl+r', 'meta+r'], (event: KeyboardEvent) => {
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.widgetLayoutEditable) {
const widget = this.dashboard.getSelectedWidget();
if (widget) {
event.preventDefault();
@@ -190,7 +208,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
);
this.hotKeys.push(
new Hotkey(['ctrl+v', 'meta+v'], (event: KeyboardEvent) => {
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.widgetLayoutEditable) {
if (this.itembuffer.hasWidget()) {
event.preventDefault();
this.pasteWidget(event);
@@ -203,7 +221,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
);
this.hotKeys.push(
new Hotkey(['ctrl+i', 'meta+i'], (event: KeyboardEvent) => {
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.widgetLayoutEditable) {
if (this.itembuffer.canPasteWidgetReference(this.dashboardCtx.getDashboard(),
this.dashboardCtx.state, this.layoutCtx.id, this.layoutCtx.breakpoint)) {
event.preventDefault();
@@ -217,7 +235,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
);
this.hotKeys.push(
new Hotkey(['ctrl+x', 'meta+x'], (event: KeyboardEvent) => {
- if (this.isEdit && !this.isEditingWidget && !this.widgetEditMode) {
+ if (this.widgetLayoutEditable) {
const widget = this.dashboard.getSelectedWidget();
if (widget) {
event.preventDefault();
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.html
index c89865433e..79deeb7399 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.html
@@ -29,7 +29,7 @@
- @if (!isDividerLayout) {
+ @if (isBreakpointsLayout) {
- @if (isDividerLayout) {
-
- @if (layoutsFormGroup.get('type').value === layoutWidthType.PERCENTAGE) {
-
-
- }
- @if (layoutsFormGroup.get('type').value !== layoutWidthType.PERCENTAGE) {
-
-
- }
-
-
-
-
+
+
+ } @else if (isHtmlLayout) {
+
}
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts
index fe67491ca9..2ef1094d10 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts
@@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
-// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc.
+// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
import { Component, Inject, OnDestroy, SkipSelf, ViewChild } from '@angular/core';
import { ErrorStateMatcher } from '@angular/material/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
@@ -23,6 +24,7 @@ import {
DashboardLayoutId,
DashboardStateLayouts,
LayoutDimension,
+ HtmlPageConfig,
LayoutType,
layoutTypes,
layoutTypeTranslationMap,
@@ -74,6 +76,11 @@ export class ManageDashboardLayoutsDialogComponent extends DialogComponent {
+ if (value !== LayoutType.html && this.layouts.main.gridSettings.htmlPageConfig) {
+ // Leaving the HTML page: start the widget grid from the defaults right away, so that layout settings
+ // and new breakpoints copied from the main layout are based on them.
+ this.layouts.main.gridSettings = this.dashboardUtils.createDefaultGridSettings();
+ }
+ })
+ );
+
this.subscriptions.push(
this.layoutsFormGroup.get('type').valueChanges.subscribe(
(value) => {
@@ -184,7 +203,7 @@ export class ManageDashboardLayoutsDialogComponent extends DialogComponent {
+ if (res) {
+ this.applyLayouts();
+ }
+ });
+ } else {
+ this.applyLayouts();
+ }
+ }
+
+ private applyLayouts(): void {
const layoutType = this.layoutsFormGroup.value.layoutType;
this.layouts.main.gridSettings.layoutType = layoutType;
- if (!this.isDividerLayout) {
- delete this.layouts.right;
+ delete this.layouts.main.gridSettings.layoutDimension;
+ if (this.isBreakpointsLayout) {
if (this.layouts.main.breakpoints) {
for (const breakpoint of Object.values(this.layouts.main.breakpoints)) {
breakpoint.gridSettings.layoutType = layoutType;
@@ -287,13 +324,10 @@ export class ManageDashboardLayoutsDialogComponent extends DialogComponent();
+ const layouts = [this.layouts.main, ...Object.values(this.layouts.main?.breakpoints || {})];
+ if (this.initialLayoutType === LayoutType.divider) {
+ layouts.push(this.layouts.right);
+ }
+ for (const layout of layouts) {
+ Object.keys(layout?.widgets || {}).forEach(id => widgetIds.add(id));
+ }
+ return widgetIds.size;
+ }
+
+ get isHtmlLayout(): boolean {
+ return this.layoutsFormGroup.get('layoutType').value === LayoutType.html;
+ }
+
+ get isBreakpointsLayout(): boolean {
+ return [LayoutType.default, LayoutType.scada].includes(this.layoutsFormGroup.get('layoutType').value);
+ }
+
addBreakpoint() {
this.dialog.open(AddNewBreakpointDialogComponent, {
diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.html b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.html
index 8c370cdd5d..cf3970ef5d 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.html
+++ b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.html
@@ -1,11 +1,12 @@
@for (subEntity of subEntities; track subEntity) {
-
{{ subEntity.name | customTranslate }}
diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.scss b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.scss
index ee4b487f32..045156fad3 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.scss
+++ b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.scss
@@ -1,11 +1,15 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
-// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc.
+// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
:host {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 4px 0;
+ width: 0;
+ min-width: 100%;
a.tb-entity-chip {
+ max-width: 100%;
padding: 4px 8px;
border-radius: 12px;
line-height: 16px;
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
index bea4732b05..3bc2fbcbd4 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.html
@@ -199,7 +199,8 @@
+ labelPosition="bottom"
+ (selectionChange)="onStepSelectionChange($event)">
done
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
index 554e09a210..ee4a325742 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts
@@ -9,6 +9,7 @@ import { AppState } from '@core/core.state';
import { DialogComponent } from '@shared/components/dialog.component';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatStepper } from '@angular/material/stepper';
+import { StepperSelectionEvent } from '@angular/cdk/stepper';
import { firstValueFrom } from 'rxjs';
import { TranslateService } from '@ngx-translate/core';
import { PageLink } from '@shared/models/page/page-link';
@@ -252,10 +253,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent {
- this.stepper?.next();
- this.onStepActivated();
- }, 0);
+ setTimeout(() => this.stepper?.next(), 0);
return;
}
this.startWizard();
@@ -306,12 +304,9 @@ export class TbDeviceInstallDialogComponent extends DialogComponent
} @else {
-
+
@if (getPreviewUrl(); as previewUrl) {
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html
index 81eac5a956..ba2efc4b16 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html
@@ -13,7 +13,7 @@
}
-
{{ item.name }}
+
{{ itemTitle }}
{{ getTypeIcon() }}
@@ -86,7 +86,7 @@
} @else {
-
+