From c153d0665726aa6a445630d0fb6e443093bfd301 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 22 Apr 2026 14:38:32 +0300 Subject: [PATCH] fix(iot-hub): include peOnly and tbVersion in filter info and widget categories requests - getFilterInfo and getWidgetCategories now append peOnly=false and tbVersion= to the URL, matching getPublishedVersions behavior - add-item dialog content: scope max-height: 70vh to mat-gt-sm --- ui-ngx/src/app/core/http/iot-hub-api.service.ts | 17 ++++++++--------- .../iot-hub-add-item-dialog.component.scss | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ui-ngx/src/app/core/http/iot-hub-api.service.ts b/ui-ngx/src/app/core/http/iot-hub-api.service.ts index f6583a32ef..15be07599a 100644 --- a/ui-ngx/src/app/core/http/iot-hub-api.service.ts +++ b/ui-ngx/src/app/core/http/iot-hub-api.service.ts @@ -86,25 +86,24 @@ export class IotHubApiService { } public getFilterInfo(itemType: ItemType, config?: IotHubRequestConfig): Observable { - return this.http.get( - `${this.baseUrl}/api/item-listing/filterInfo/${itemType}`, - { params: this.buildParams(config) } - ); + const url = `${this.baseUrl}/api/item-listing/filterInfo/${itemType}` + + `?peOnly=false&tbVersion=${tbVersionToInt(env.tbVersion)}`; + return this.http.get(url, { params: this.buildParams(config) }); } public getWidgetCategories(textSearch?: string, scadaFirst?: boolean, config?: IotHubRequestConfig): Observable { - let url = `${this.baseUrl}/api/item-listing/widgetCategories`; - const queryParams: string[] = []; + const queryParams: string[] = [ + `peOnly=false`, + `tbVersion=${tbVersionToInt(env.tbVersion)}` + ]; if (textSearch?.trim()) { queryParams.push(`textSearch=${encodeURIComponent(textSearch.trim())}`); } if (scadaFirst != null) { queryParams.push(`scadaFirst=${scadaFirst}`); } - if (queryParams.length) { - url += `?${queryParams.join('&')}`; - } + const url = `${this.baseUrl}/api/item-listing/widgetCategories?${queryParams.join('&')}`; return this.http.get(url, { params: this.buildParams(config) }); } diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss index c2234ab92e..1505568f72 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss @@ -22,7 +22,6 @@ padding: 0; overflow-x: hidden; height: 70vh; - max-height: 70vh; tb-iot-hub-browse { height: 100%; @@ -30,6 +29,7 @@ @media #{$mat-gt-sm} { width: 80vw; + max-height: 70vh; } @media #{$mat-gt-md} {