From 256c575b42519b24b05f9c14751f4f6b11f02865 Mon Sep 17 00:00:00 2001 From: dpinkevych Date: Wed, 16 Sep 2026 14:46:00 +0300 Subject: [PATCH 1/4] warn that updating a solution template recreates everything it installed Updating a solution template deletes and reinstalls every entity it created, and unlike the other item types it is not stopped by the modified-entity check, so a tenant's own edits to those dashboards, devices and rule chains are lost without warning. The dialog showed the generic "replace the current version" wording, which does not suggest anything is destroyed. A second, smaller mismatch: a listing renamed between releases shows one name in the installed-items table and another in the dialog that table opens, because the dialog took its title from the published version while the table reads the tracking row. - show a dedicated description for SOLUTION_TEMPLATE that names what is deleted and recreated, and says local changes are lost - take the item details title from the tracking row while the dialog shows exactly the installed version; any other displayed version keeps its own name --- .../iot-hub/iot-hub-item-detail-dialog.component.html | 2 +- .../iot-hub/iot-hub-item-detail-dialog.component.ts | 11 +++++++++++ .../iot-hub/iot-hub-update-dialog.component.html | 4 ++-- .../iot-hub/iot-hub-update-dialog.component.ts | 11 +++++++++++ ui-ngx/src/assets/locale/locale.constant-en_US.json | 1 + 5 files changed, 26 insertions(+), 3 deletions(-) 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 28e7e74e6d..83f8b69dc4 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() }} diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts index d1c6f4f194..12a8900610 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts @@ -172,6 +172,17 @@ export class TbIotHubItemDetailDialogComponent extends DialogComponent{{ 'iot-hub.update-confirm-title' | translate:{ name: data.itemName } }} -

{{ 'iot-hub.update-desc' | translate }}

+

{{ updateDescKey | translate }}

} @case ('updating') {

{{ 'iot-hub.update-confirm-title' | translate:{ name: data.itemName } }}

-

{{ 'iot-hub.update-desc' | translate }}

+

{{ updateDescKey | translate }}

} @case ('success') {

{{ 'iot-hub.update-success-title' | translate }}

diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-update-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-update-dialog.component.ts index ec4a48cd2d..e5472c45a1 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-update-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-update-dialog.component.ts @@ -59,6 +59,17 @@ export class TbIotHubUpdateDialogComponent extends DialogComponent Date: Wed, 7 Oct 2026 10:22:14 +0300 Subject: [PATCH 2/4] Remove IoT Hub Dashboard item type (#16255) * Remove IoT Hub Dashboard item type The IoT Hub no longer has Dashboard items, so drop the DASHBOARD item type from the platform: install/update/checksum/delete handling and the DashboardInstalledItemDescriptor on the backend, and the item type, the /iot-hub/dashboards page and route, deep links, translations and styles in the UI. Dashboards created by device packages and solution templates are not affected. * Keep DashboardInstalledItemDescriptor for existing installed items Installed-item rows with a DASHBOARD descriptor may still exist on instances that were connected to the QA Hub. Without the subtype Jackson fails on such a row and the whole Installed items page breaks, so keep the descriptor and the delete branch to let those rows be read and removed. * Revert "Keep DashboardInstalledItemDescriptor for existing installed items" This reverts commit 61246776faf. A DASHBOARD installed-item row can only exist on instances connected to the QA Hub; production and official releases never had Dashboard items, so the legacy descriptor is not kept. --- .../service/iot_hub/DefaultIotHubService.java | 54 ---------- .../iot_hub/DefaultIotHubServiceTest.java | 12 +-- .../DashboardInstalledItemDescriptor.java | 13 --- .../IotHubInstalledItemDescriptor.java | 1 - .../iot-hub/iot-hub-browse.component.ts | 3 - ...t-hub-installed-items-table.component.scss | 1 - ...iot-hub-installed-items-table.component.ts | 1 - .../iot-hub/iot-hub-item-card.component.html | 2 +- .../iot-hub-item-detail-dialog.component.html | 4 +- .../pages/iot-hub/iot-hub-deep-link.utils.ts | 1 - .../pages/iot-hub/iot-hub-home.component.ts | 1 - .../iot-hub/iot-hub-items-page.component.ts | 7 -- .../pages/iot-hub/iot-hub-routing.module.ts | 10 -- .../iot-hub/iot-hub-installed-item.models.ts | 10 -- .../models/iot-hub/iot-hub-item.models.ts | 6 -- .../iot-hub/items-page-dashboards-hero.svg | 102 ------------------ .../assets/locale/locale.constant-en_US.json | 6 -- 17 files changed, 9 insertions(+), 225 deletions(-) delete mode 100644 common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/DashboardInstalledItemDescriptor.java delete mode 100644 ui-ngx/src/assets/iot-hub/items-page-dashboards-hero.svg diff --git a/application/src/main/java/org/thingsboard/server/service/iot_hub/DefaultIotHubService.java b/application/src/main/java/org/thingsboard/server/service/iot_hub/DefaultIotHubService.java index f4350f1ffc..7e6a2d88ad 100644 --- a/application/src/main/java/org/thingsboard/server/service/iot_hub/DefaultIotHubService.java +++ b/application/src/main/java/org/thingsboard/server/service/iot_hub/DefaultIotHubService.java @@ -10,7 +10,6 @@ import org.springframework.stereotype.Service; import org.thingsboard.common.util.ExceptionUtil; import org.thingsboard.common.util.JacksonUtil; import org.thingsboard.server.common.data.asset.AssetProfile; -import org.thingsboard.server.common.data.Dashboard; import org.thingsboard.server.common.data.DeviceProfile; import org.thingsboard.server.common.data.cf.CalculatedField; import org.thingsboard.server.common.data.exception.ThingsboardException; @@ -23,7 +22,6 @@ import org.thingsboard.server.common.data.id.IotHubInstalledItemId; import org.thingsboard.server.common.data.id.RuleChainId; import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.iot_hub.CalculatedFieldInstalledItemDescriptor; -import org.thingsboard.server.common.data.iot_hub.DashboardInstalledItemDescriptor; import org.thingsboard.server.common.data.iot_hub.DeviceInstalledItemDescriptor; import org.thingsboard.server.common.data.iot_hub.IotHubInstalledItem; import org.thingsboard.server.common.data.iot_hub.IotHubInstalledItemDescriptor; @@ -79,7 +77,6 @@ public class DefaultIotHubService implements IotHubService { private static final String SECTION_RULE_CHAIN_METADATA = "rule chain metadata"; private static final String ITEM_TYPE_WIDGET = "widget"; - private static final String ITEM_TYPE_DASHBOARD = "dashboard"; private static final String ITEM_TYPE_CALCULATED_FIELD = "calculated field"; private static final String ITEM_TYPE_RULE_CHAIN = "rule chain"; private static final String ITEM_TYPE_DEVICE_PROFILE = "device profile"; @@ -150,7 +147,6 @@ public class DefaultIotHubService implements IotHubService { IotHubInstalledItemDescriptor descriptor = switch (itemType) { case "WIDGET" -> installWidget(user, tenantId, fileData); - case "DASHBOARD" -> installDashboard(user, tenantId, fileData); case "CALCULATED_FIELD" -> installCalculatedField(user, tenantId, fileData, data); case "ALARM_RULE" -> throw new IllegalArgumentException( "Alarm Rules require ThingsBoard 4.3 or later. Please update your platform instance to install Alarm Rule packages."); @@ -212,22 +208,6 @@ public class DefaultIotHubService implements IotHubService { return descriptor; } - private DashboardInstalledItemDescriptor installDashboard(SecurityUser user, TenantId tenantId, byte[] fileData) throws Exception { - Dashboard dashboard; - try { - dashboard = JacksonUtil.fromString(new String(fileData), Dashboard.class, true); - } catch (Exception e) { - throw parseFailure(ACTION_INSTALL, ITEM_TYPE_DASHBOARD, e); - } - dashboard.setId(null); - dashboard.setTenantId(tenantId); - Dashboard saved = tbDashboardService.save(dashboard, user); - log.debug("[{}] Dashboard installed: {}", tenantId, saved.getTitle()); - DashboardInstalledItemDescriptor descriptor = new DashboardInstalledItemDescriptor(); - descriptor.setDashboardId(saved.getId()); - return descriptor; - } - private CalculatedFieldInstalledItemDescriptor installCalculatedField(SecurityUser user, TenantId tenantId, byte[] fileData, JsonNode data) throws Exception { CalculatedField calculatedField; try { @@ -405,7 +385,6 @@ public class DefaultIotHubService implements IotHubService { switch (itemType) { case "WIDGET" -> updateWidget(user, tenantId, (WidgetInstalledItemDescriptor) descriptor, fileData); - case "DASHBOARD" -> updateDashboard(user, tenantId, (DashboardInstalledItemDescriptor) descriptor, fileData); case "CALCULATED_FIELD" -> updateCalculatedField(user, tenantId, (CalculatedFieldInstalledItemDescriptor) descriptor, fileData); case "RULE_CHAIN" -> updateRuleChain(tenantId, (RuleChainInstalledItemDescriptor) descriptor, fileData); case "DEVICE" -> { @@ -462,22 +441,6 @@ public class DefaultIotHubService implements IotHubService { tbWidgetTypeService.save(existing, false, user); } - private void updateDashboard(SecurityUser user, TenantId tenantId, DashboardInstalledItemDescriptor descriptor, byte[] fileData) throws Exception { - Dashboard newDashboard; - try { - newDashboard = JacksonUtil.fromString(new String(fileData), Dashboard.class, true); - } catch (Exception e) { - throw parseFailure(ACTION_UPDATE, ITEM_TYPE_DASHBOARD, e); - } - Dashboard existing = dashboardService.findDashboardById(tenantId, descriptor.getDashboardId()); - if (existing == null) { - throw new Exception("Dashboard not found for update"); - } - existing.setTitle(newDashboard.getTitle()); - existing.setConfiguration(newDashboard.getConfiguration()); - tbDashboardService.save(existing, user); - } - private void updateCalculatedField(SecurityUser user, TenantId tenantId, CalculatedFieldInstalledItemDescriptor descriptor, byte[] fileData) throws Exception { CalculatedField newCf; try { @@ -524,8 +487,6 @@ public class DefaultIotHubService implements IotHubService { IotHubInstalledItemDescriptor descriptor = installedItem.getDescriptor(); if (descriptor instanceof WidgetInstalledItemDescriptor wd) { return calculateWidgetChecksum(tenantId, wd); - } else if (descriptor instanceof DashboardInstalledItemDescriptor dd) { - return calculateDashboardChecksum(tenantId, dd); } else if (descriptor instanceof CalculatedFieldInstalledItemDescriptor cd) { return calculateCalculatedFieldChecksum(tenantId, cd); } else if (descriptor instanceof RuleChainInstalledItemDescriptor rd) { @@ -545,16 +506,6 @@ public class DefaultIotHubService implements IotHubService { return sha256(content); } - private String calculateDashboardChecksum(TenantId tenantId, DashboardInstalledItemDescriptor descriptor) { - Dashboard dashboard = dashboardService.findDashboardById(tenantId, descriptor.getDashboardId()); - if (dashboard == null) { - return null; - } - String content = (dashboard.getTitle() != null ? dashboard.getTitle() : "") + - (dashboard.getConfiguration() != null ? dashboard.getConfiguration().toString() : ""); - return sha256(content); - } - private String calculateWidgetChecksum(TenantId tenantId, WidgetInstalledItemDescriptor descriptor) { WidgetTypeDetails widgetType = widgetTypeService.findWidgetTypeDetailsById(tenantId, descriptor.getWidgetTypeId()); if (widgetType == null) { @@ -727,11 +678,6 @@ public class DefaultIotHubService implements IotHubService { if (widgetType != null) { tbWidgetTypeService.delete(widgetType, user); } - } else if (descriptor instanceof DashboardInstalledItemDescriptor dd) { - Dashboard dashboard = dashboardService.findDashboardById(tenantId, dd.getDashboardId()); - if (dashboard != null) { - tbDashboardService.delete(dashboard, user); - } } else if (descriptor instanceof CalculatedFieldInstalledItemDescriptor cd) { CalculatedField calculatedField = calculatedFieldService.findById(tenantId, cd.getCalculatedFieldId()); if (calculatedField != null) { diff --git a/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java b/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java index 7ac28ffdb5..559215e526 100644 --- a/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/iot_hub/DefaultIotHubServiceTest.java @@ -15,8 +15,8 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.thingsboard.common.util.JacksonUtil; import org.thingsboard.server.common.data.id.IotHubInstalledItemId; import org.thingsboard.server.common.data.id.TenantId; -import org.thingsboard.server.common.data.iot_hub.DashboardInstalledItemDescriptor; import org.thingsboard.server.common.data.iot_hub.IotHubInstalledItem; +import org.thingsboard.server.common.data.iot_hub.RuleChainInstalledItemDescriptor; import org.thingsboard.server.dao.iot_hub.IotHubInstalledItemService; import org.thingsboard.server.service.security.model.SecurityUser; @@ -89,7 +89,7 @@ class DefaultIotHubServiceTest { mockTenant(); String versionId = UUID.randomUUID().toString(); String itemId = UUID.randomUUID().toString(); - when(iotHubRestClient.getVersionInfo(versionId)).thenReturn(version(versionId, itemId, "DASHBOARD", "Root", "1.0")); + when(iotHubRestClient.getVersionInfo(versionId)).thenReturn(version(versionId, itemId, "RULE_CHAIN", "Root", "1.0")); when(iotHubInstalledItemService.findInstalledItemIdsByTenantIdAndItemIdIn(eq(tenantId), any())).thenReturn(List.of()); InstallPlan plan = service.resolveInstallPlan(user, versionId); @@ -107,7 +107,7 @@ class DefaultIotHubServiceTest { String versionId = UUID.randomUUID().toString(); String rootItemId = UUID.randomUUID().toString(); String relatedItemId = UUID.randomUUID().toString(); - ObjectNode root = version(versionId, rootItemId, "DASHBOARD", "Root", "1.0"); + ObjectNode root = version(versionId, rootItemId, "RULE_CHAIN", "Root", "1.0"); root.putArray("relatedItems").add(relatedItemId); when(iotHubRestClient.getVersionInfo(versionId)).thenReturn(root); when(iotHubRestClient.getPublishedVersionByItemId(relatedItemId)) @@ -129,7 +129,7 @@ class DefaultIotHubServiceTest { String versionId = UUID.randomUUID().toString(); String rootItemId = UUID.randomUUID().toString(); String relatedItemId = UUID.randomUUID().toString(); - ObjectNode root = version(versionId, rootItemId, "DASHBOARD", "Root", "1.0"); + ObjectNode root = version(versionId, rootItemId, "RULE_CHAIN", "Root", "1.0"); root.putArray("relatedItems").add(relatedItemId); when(iotHubRestClient.getVersionInfo(versionId)).thenReturn(root); when(iotHubRestClient.getPublishedVersionByItemId(relatedItemId)).thenReturn(null); @@ -149,7 +149,7 @@ class DefaultIotHubServiceTest { String versionId = UUID.randomUUID().toString(); String rootItemId = UUID.randomUUID().toString(); String relatedItemId = UUID.randomUUID().toString(); - ObjectNode root = version(versionId, rootItemId, "DASHBOARD", "Root", "1.0"); + ObjectNode root = version(versionId, rootItemId, "RULE_CHAIN", "Root", "1.0"); root.putArray("relatedItems").add(relatedItemId); when(iotHubRestClient.getVersionInfo(versionId)).thenReturn(root); when(iotHubRestClient.getPublishedVersionByItemId(relatedItemId)).thenThrow(new RuntimeException("boom")); @@ -280,7 +280,7 @@ class DefaultIotHubServiceTest { when(iotHubInstalledItemService.findInstalledItemIdsByTenantIdAndItemIdIn(eq(tenantId), any())).thenReturn(List.of()); IotHubInstalledItem depItem = installedItem(UUID.randomUUID()); IotHubInstalledItem rootItem = installedItem(UUID.randomUUID()); - DashboardInstalledItemDescriptor rootDescriptor = new DashboardInstalledItemDescriptor(); + RuleChainInstalledItemDescriptor rootDescriptor = new RuleChainInstalledItemDescriptor(); rootItem.setDescriptor(rootDescriptor); doReturn(depItem).when(service).doInstallVersion(eq(user), eq(depVersionId), any(), any()); doReturn(rootItem).when(service).doInstallVersion(eq(user), eq(rootVersionId), any(), any()); diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/DashboardInstalledItemDescriptor.java b/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/DashboardInstalledItemDescriptor.java deleted file mode 100644 index 654f36f31e..0000000000 --- a/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/DashboardInstalledItemDescriptor.java +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: Copyright The Thingsboard Authors -// SPDX-License-Identifier: Apache-2.0 -package org.thingsboard.server.common.data.iot_hub; - -import lombok.Data; -import org.thingsboard.server.common.data.id.DashboardId; - -@Data -public class DashboardInstalledItemDescriptor implements IotHubInstalledItemDescriptor { - - private DashboardId dashboardId; - -} diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/IotHubInstalledItemDescriptor.java b/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/IotHubInstalledItemDescriptor.java index 0ef245c0ac..ca8b3a1b83 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/IotHubInstalledItemDescriptor.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/iot_hub/IotHubInstalledItemDescriptor.java @@ -15,7 +15,6 @@ import java.io.Serializable; property = "type") @JsonSubTypes({ @Type(name = "WIDGET", value = WidgetInstalledItemDescriptor.class), - @Type(name = "DASHBOARD", value = DashboardInstalledItemDescriptor.class), @Type(name = "CALCULATED_FIELD", value = CalculatedFieldInstalledItemDescriptor.class), @Type(name = "ALARM_RULE", value = AlarmRuleInstalledItemDescriptor.class), @Type(name = "RULE_CHAIN", value = RuleChainInstalledItemDescriptor.class), diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts index cc8d423c96..1568146cfc 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts @@ -34,7 +34,6 @@ export class TbIotHubBrowseComponent implements OnInit, AfterViewInit, OnDestroy private static typeTabLabel(t: ItemType): string { switch (t) { case ItemType.WIDGET: return 'item.type-widget-plural'; - case ItemType.DASHBOARD: return 'item.type-dashboard-plural'; case ItemType.SOLUTION_TEMPLATE: return 'item.type-solution-template-plural'; case ItemType.CALCULATED_FIELD: return 'item.type-calculated-field-plural'; case ItemType.ALARM_RULE: return 'item.type-alarm-rule-plural'; @@ -87,7 +86,6 @@ export class TbIotHubBrowseComponent implements OnInit, AfterViewInit, OnDestroy get searchPlaceholderKey(): string { switch (this._activeType) { case ItemType.WIDGET: return 'iot-hub.search-widgets'; - case ItemType.DASHBOARD: return 'iot-hub.search-dashboards'; case ItemType.SOLUTION_TEMPLATE: return 'iot-hub.search-solution-templates'; case ItemType.CALCULATED_FIELD: return 'iot-hub.search-calculated-fields'; case ItemType.ALARM_RULE: return 'iot-hub.search-alarm-rules'; @@ -524,7 +522,6 @@ export class TbIotHubBrowseComponent implements OnInit, AfterViewInit, OnDestroy getTitle(): string { switch (this.activeType) { case ItemType.WIDGET: return 'iot-hub.title-widgets'; - case ItemType.DASHBOARD: return 'iot-hub.title-dashboards'; case ItemType.SOLUTION_TEMPLATE: return 'iot-hub.title-solution-templates'; case ItemType.CALCULATED_FIELD: return 'iot-hub.title-calculated-fields'; case ItemType.ALARM_RULE: return 'iot-hub.title-alarm-rules'; diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.scss b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.scss index 32e91f43c7..9c90354d0d 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.scss +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.scss @@ -116,7 +116,6 @@ .tb-type-calc-field { color: #3db5e0; background: rgba(61, 181, 224, 0.06); } .tb-type-alarm-rule { color: #d7702f; background: rgba(215, 112, 47, 0.06); } .tb-type-rule-chain { color: #aa5be3; background: rgba(170, 91, 227, 0.06); } -.tb-type-dashboard { color: #607d8b; background: rgba(96, 125, 139, 0.06); } // "vX.X.X Available" button — Design: border rgba(0,0,0,0.12), rounded-4, px-12 py-6, gap-8 .tb-installed-version-btn { diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.ts index c441060f5a..63c88b4cce 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-installed-items-table.component.ts @@ -157,7 +157,6 @@ export class TbIotHubInstalledItemsTableComponent implements OnInit, OnChanges, getItemTypeChipClass(itemType: string): string { switch (itemType) { case 'WIDGET': return 'tb-type-widget'; - case 'DASHBOARD': return 'tb-type-dashboard'; case 'CALCULATED_FIELD': return 'tb-type-calc-field'; case 'ALARM_RULE': return 'tb-type-alarm-rule'; case 'RULE_CHAIN': return 'tb-type-rule-chain'; diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.html index cbde4bbf83..4187b431d3 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.html +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.html @@ -71,7 +71,7 @@ }
} @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 28e7e74e6d..bd155237d8 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 @@ -86,7 +86,7 @@
} @else { - +
@@ -156,7 +156,7 @@
-
+
@if (showCreator) {
{{ 'iot-hub.creator' | translate }} diff --git a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-deep-link.utils.ts b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-deep-link.utils.ts index 1bfed40ed3..6b417e3353 100644 --- a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-deep-link.utils.ts +++ b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-deep-link.utils.ts @@ -12,7 +12,6 @@ export function isUUID(s: string | null | undefined): s is string { export function typeSegment(t: ItemType): string | undefined { switch (t) { case ItemType.WIDGET: return 'widgets'; - case ItemType.DASHBOARD: return 'dashboards'; case ItemType.SOLUTION_TEMPLATE: return 'solution-templates'; case ItemType.CALCULATED_FIELD: return 'calculated-fields'; case ItemType.ALARM_RULE: return 'alarm-rules'; diff --git a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.ts b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.ts index fffd19c021..8164b1bdef 100644 --- a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.ts +++ b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.ts @@ -276,7 +276,6 @@ export class TbIotHubHomeComponent implements OnInit, OnDestroy { private getTypeRoute(type: ItemType): string { switch (type) { case ItemType.WIDGET: return 'widgets'; - case ItemType.DASHBOARD: return 'dashboards'; case ItemType.SOLUTION_TEMPLATE: return 'solution-templates'; case ItemType.CALCULATED_FIELD: return 'calculated-fields'; case ItemType.ALARM_RULE: return 'alarm-rules'; diff --git a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-items-page.component.ts b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-items-page.component.ts index 07beff5559..cc54a57641 100644 --- a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-items-page.component.ts +++ b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-items-page.component.ts @@ -29,13 +29,6 @@ const PAGE_CONFIGS: Record = { image: 'assets/iot-hub/items-page-widgets-hero.svg', routeSegment: 'widgets' }, - DASHBOARD: { - type: ItemType.DASHBOARD, - titleKey: 'item.type-dashboard-plural', - descriptionKey: 'iot-hub.items-page-desc-dashboards', - image: 'assets/iot-hub/items-page-dashboards-hero.svg', - routeSegment: 'dashboards' - }, SOLUTION_TEMPLATE: { type: ItemType.SOLUTION_TEMPLATE, titleKey: 'item.type-solution-template-plural', diff --git a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-routing.module.ts b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-routing.module.ts index 13f734636d..4840a87a10 100644 --- a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-routing.module.ts +++ b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-routing.module.ts @@ -41,16 +41,6 @@ const routes: Routes = [ breadcrumb: { label: 'item.type-widget-plural', icon: 'widgets' } } }, - { - path: 'dashboards', - component: TbIotHubItemsPageComponent, - data: { - auth: [Authority.TENANT_ADMIN], - title: 'item.type-dashboard-plural', - itemType: 'DASHBOARD', - breadcrumb: { label: 'item.type-dashboard-plural', icon: 'dashboard' } - } - }, { path: 'solution-templates', component: TbIotHubItemsPageComponent, diff --git a/ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts b/ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts index f1733e350a..106f6fa13a 100644 --- a/ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts +++ b/ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts @@ -9,11 +9,6 @@ export interface WidgetInstalledItemDescriptor { widgetTypeId: { id: string }; } -export interface DashboardInstalledItemDescriptor { - type: 'DASHBOARD'; - dashboardId: { id: string }; -} - export interface CalculatedFieldInstalledItemDescriptor { type: 'CALCULATED_FIELD'; calculatedFieldId: { id: string }; @@ -50,7 +45,6 @@ export interface SolutionTemplateInstalledItemDescriptor { export type IotHubInstalledItemDescriptor = | WidgetInstalledItemDescriptor - | DashboardInstalledItemDescriptor | CalculatedFieldInstalledItemDescriptor | AlarmRuleInstalledItemDescriptor | RuleChainInstalledItemDescriptor @@ -141,10 +135,6 @@ export const getInstalledItemUrl = (descriptor?: IotHubInstalledItemDescriptor): entityId = descriptor.widgetTypeId?.id; entityType = EntityType.WIDGET_TYPE; break; - case 'DASHBOARD': - entityId = descriptor.dashboardId?.id; - entityType = EntityType.DASHBOARD; - break; case 'CALCULATED_FIELD': case 'ALARM_RULE': entityId = descriptor.entityId?.id; diff --git a/ui-ngx/src/app/shared/models/iot-hub/iot-hub-item.models.ts b/ui-ngx/src/app/shared/models/iot-hub/iot-hub-item.models.ts index abdddc1734..2b822a5030 100644 --- a/ui-ngx/src/app/shared/models/iot-hub/iot-hub-item.models.ts +++ b/ui-ngx/src/app/shared/models/iot-hub/iot-hub-item.models.ts @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 export enum ItemType { WIDGET = 'WIDGET', - DASHBOARD = 'DASHBOARD', SOLUTION_TEMPLATE = 'SOLUTION_TEMPLATE', CALCULATED_FIELD = 'CALCULATED_FIELD', ALARM_RULE = 'ALARM_RULE', @@ -13,7 +12,6 @@ export enum ItemType { export const itemTypeTranslations = new Map( [ [ItemType.WIDGET, 'item.type-widget'], - [ItemType.DASHBOARD, 'item.type-dashboard'], [ItemType.SOLUTION_TEMPLATE, 'item.type-solution-template'], [ItemType.CALCULATED_FIELD, 'item.type-calculated-field'], [ItemType.ALARM_RULE, 'item.type-alarm-rule'], @@ -28,7 +26,6 @@ export const itemTypeTranslations = new Map( // mapping stays consistent across the app. export const itemTypeIcons: Record = { [ItemType.WIDGET]: 'widgets', - [ItemType.DASHBOARD]: 'dashboard', [ItemType.SOLUTION_TEMPLATE]: 'apps', [ItemType.CALCULATED_FIELD]: 'mdi:function-variant', [ItemType.RULE_CHAIN]: 'settings_ethernet', @@ -41,9 +38,6 @@ export const getItemTypeIcon = (type?: string | null): string => /** * Item types discoverable to creators in the marketplace UI. - * DASHBOARD is intentionally absent (IoT Hub no longer accepts Dashboard contributions). - * Defensive code paths (item card, detail dialog descriptor switch, installed-items table, - * install handler, /iot-hub/dashboards route) remain functional for already-installed items. */ export const CREATOR_VISIBLE_ITEM_TYPES: ItemType[] = [ ItemType.WIDGET, diff --git a/ui-ngx/src/assets/iot-hub/items-page-dashboards-hero.svg b/ui-ngx/src/assets/iot-hub/items-page-dashboards-hero.svg deleted file mode 100644 index c699714457..0000000000 --- a/ui-ngx/src/assets/iot-hub/items-page-dashboards-hero.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index b3aa95d6ec..234d7a136c 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -3685,8 +3685,6 @@ "item": { "type-widget": "Widget", "type-widget-plural": "Widgets", - "type-dashboard": "Dashboard", - "type-dashboard-plural": "Dashboards", "type-solution-template": "Solution Template", "type-solution-template-plural": "Solution Templates", "type-calculated-field": "Calculated Field", @@ -3732,7 +3730,6 @@ "filter": "Filter", "available": "Available", "items-page-desc-widgets": "Jumpstart your IoT journey with pre-configured widgets designed for your industry. Deploy proven architectures instantly and focus your energy on what matters: your unique business logic.", - "items-page-desc-dashboards": "Explore dashboards to find pre-built visualization templates and interactive UI layouts you can deploy in minutes to bring your IoT data to life.", "items-page-desc-solution-templates": "Complete IoT solution packages with dashboards, rule chains, and device configurations. Get started with proven architectures.", "items-page-desc-calculated-fields": "Use pre-configured Calculated Fields to automate complex metrics like fuel efficiency or power factor. Skip the manual logic and keep your dashboards clean and actionable.", "items-page-desc-alarm-rules": "Use pre-built Alarm Rule templates to detect critical conditions like low battery, threshold breaches, or devices going offline. Skip writing the rule logic and start reacting to incidents the moment they happen.", @@ -3755,20 +3752,17 @@ "contribute": "Contribute", "creator-profile": "Creator Profile", "title-widgets": "Widgets", - "title-dashboards": "Dashboards", "title-calculated-fields": "Calculated Fields", "title-alarm-rules": "Alarm Rules", "title-rule-chains": "Rule Chains", "title-devices": "Devices", "title-solution-templates": "Solution Templates", "subtitle-widgets": "Browse community widgets for your dashboards", - "subtitle-dashboards": "Browse ready-to-use dashboards", "subtitle-solution-templates": "Browse complete IoT solution packages", "subtitle-calculated-fields": "Browse calculated field templates", "subtitle-alarm-rules": "Browse alarm rule templates", "subtitle-rule-chains": "Browse rule chain templates", "subtitle-devices": "Browse device configurations", - "search-dashboards": "Search dashboards...", "search-solution-templates": "Search solution templates...", "search-calculated-fields": "Search calculated fields...", "search-alarm-rules": "Search alarm rules...", From 31a5b0c2073b32f31d57c0f8592b777ce98f8704 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 7 Oct 2026 15:16:04 +0300 Subject: [PATCH 3/4] simplify itemTitle in item detail dialog --- .../iot-hub/iot-hub-item-detail-dialog.component.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts index 12a8900610..41b5d77814 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.ts @@ -172,15 +172,9 @@ export class TbIotHubItemDetailDialogComponent extends DialogComponent Date: Thu, 8 Oct 2026 12:18:12 +0300 Subject: [PATCH 4/4] Fix device install wizard navigation via stepper header (#16265) Clicking a step in the stepper header bypassed nextStep(), so the Provisioning step was never activated and rendered empty, and the Configuration form values were not collected. Step activation now runs on the stepper selectionChange, and instruction steps are marked completed once shown so the header can move past them like the Next button does. --- .../device-install-dialog.component.html | 3 +- .../device-install-dialog.component.ts | 38 ++++++++++++------- 2 files changed, 26 insertions(+), 15 deletions(-) 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 bb72d65ea3..28e7f61ceb 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 @@ -190,7 +190,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 7f991316ee..33f2a6d08a 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 @@ -12,6 +12,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'; @@ -261,10 +262,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent { - this.stepper?.next(); - this.onStepActivated(); - }, 0); + setTimeout(() => this.stepper?.next(), 0); return; } this.startWizard(); @@ -315,12 +313,9 @@ export class TbDeviceInstallDialogComponent extends DialogComponent