From 84c2ea2f2f88d0bf742ddcc0edeb84a84083efca Mon Sep 17 00:00:00 2001 From: Andrii Shvaika Date: Thu, 2 Apr 2026 16:59:57 +0300 Subject: [PATCH] feat(iot-hub): add ${entity.url} template variable for all entity steps Each entity output now includes a url field: - deviceProfile: /profiles/deviceProfiles/{id} - device: /entities/devices/{id} - gateway: /entities/gateways (generic, no ID) - dashboard: /dashboards/{id} - ruleChain: /ruleChains/{id} Available in templates as ${device.url}, ${dashboard.url}, etc. --- .../device-install-dialog.component.ts | 13 +++++++------ .../shared/models/iot-hub/device-package.models.ts | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) 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 b392c995c4..97f0b61a41 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 @@ -456,12 +456,12 @@ export class TbDeviceInstallDialogComponent extends DialogComponent { const profiles = await firstValueFrom(this.deviceProfileService.getDeviceProfileNames()); const match = profiles.find(p => p.name === name); - return match ? { id: match.id.id, name: match.name } : null; + return match ? { id: match.id.id, name: match.name, url: `/profiles/deviceProfiles/${match.id.id}` } : null; } private async findRuleChainByName(name: string): Promise { const page = await firstValueFrom(this.ruleChainService.getRuleChains(new PageLink(100, 0, name))); const match = page.data.find(rc => rc.name === name); - return match ? { id: match.id.id, name: match.name } : null; + return match ? { id: match.id.id, name: match.name, url: `/ruleChains/${match.id.id}` } : null; } private collectCreatedEntityIds(): { entityType: string; id: string }[] { diff --git a/ui-ngx/src/app/shared/models/iot-hub/device-package.models.ts b/ui-ngx/src/app/shared/models/iot-hub/device-package.models.ts index 06561bfd9a..634bd68d35 100644 --- a/ui-ngx/src/app/shared/models/iot-hub/device-package.models.ts +++ b/ui-ngx/src/app/shared/models/iot-hub/device-package.models.ts @@ -128,6 +128,7 @@ export interface FormFieldDefinition { export interface EntityStepOutput { id: string; name: string; + url?: string; token?: string; dockerComposeUrl?: string; }