Browse Source

fix(iot-hub): resolve DEVICE installed-item url to its dashboard

Add a DEVICE arm to getInstalledItemUrl so device-installs link to
their generated dashboard (descriptor.dashboardId / EntityType.DASHBOARD),
matching the existing SOLUTION_TEMPLATE handling instead of falling
through to no URL.
pull/15772/head
Igor Kulikov 4 months ago
parent
commit
f8f7e00cce
  1. 4
      ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts

4
ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts

@ -108,6 +108,10 @@ export const getInstalledItemUrl = (descriptor?: IotHubInstalledItemDescriptor):
let entityType: EntityType | null = null;
let query: string | null = null;
switch (descriptor.type) {
case 'DEVICE':
entityId = descriptor.dashboardId?.id;
entityType = EntityType.DASHBOARD;
break;
case 'WIDGET':
entityId = descriptor.widgetTypeId?.id;
entityType = EntityType.WIDGET_TYPE;

Loading…
Cancel
Save