Browse Source

Merge pull request #15814 from thingsboard/rc

Merge rc into master
pull/15825/head
Vladyslav Prykhodko 1 month ago
committed by GitHub
parent
commit
c35fd0d1f4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html
  2. 3
      ui-ngx/src/app/modules/home/components/widget/widget.component.ts
  3. 8
      ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.scss
  4. 12
      ui-ngx/src/app/shared/models/iot-hub/iot-hub-installed-item.models.ts

2
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html

@ -96,7 +96,7 @@
</div>
} @else {
<!-- Widget/Dashboard/Solution: image + description side by side -->
<div class="flex gap-6">
<div class="flex gap-6 lt-md:flex-col">
<div class="dlg-preview"
[class.dlg-preview-carousel]="item.type === ItemType.SOLUTION_TEMPLATE && carouselImages.length > 1">
@if (item.type === ItemType.SOLUTION_TEMPLATE && carouselImages.length > 1) {

3
ui-ngx/src/app/modules/home/components/widget/widget.component.ts

@ -685,6 +685,7 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges,
}
private reInitImpl() {
this.displayNoData = false;
this.onDestroy();
if (!this.typeParameters.useCustomDatasources) {
this.createDefaultSubscription().subscribe({
@ -728,7 +729,6 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges,
subscriptionChanged = subscriptionChanged || subscription.onAliasesChanged(aliasIds);
}
if (subscriptionChanged && !this.typeParameters.useCustomDatasources) {
this.displayNoData = false;
this.reInit();
}
}
@ -742,7 +742,6 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges,
subscriptionChanged = subscriptionChanged || subscription.onFiltersChanged(filterIds);
}
if (subscriptionChanged && !this.typeParameters.useCustomDatasources) {
this.displayNoData = false;
this.reInit();
}
}

8
ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.scss

@ -757,6 +757,14 @@
padding: 140px 16px 40px;
}
.tb-iot-hub-hero-cluster {
top: 15%;
}
.tb-iot-hub-hero-title {
font-size: 28px;
}
.tb-iot-hub-categories {
grid-template-columns: 1fr;
}

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

@ -139,8 +139,16 @@ export const getInstalledItemUrl = (descriptor?: IotHubInstalledItemDescriptor):
let entityType: EntityType | null = null;
switch (descriptor.type) {
case 'DEVICE':
entityId = descriptor.dashboardId?.id;
entityType = EntityType.DASHBOARD;
if (descriptor.dashboardId) {
entityId = descriptor.dashboardId?.id;
entityType = EntityType.DASHBOARD;
} else if (descriptor.createdEntityIds) {
const found = descriptor.createdEntityIds.find(id => id.entityType === EntityType.DEVICE);
if (found) {
entityId = found.id;
entityType = EntityType.DEVICE;
}
}
break;
case 'WIDGET':
entityId = descriptor.widgetTypeId?.id;

Loading…
Cancel
Save