From 657c247687e88f2010f386e3d43c903afc3e169b Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Thu, 26 Oct 2023 15:23:09 +0300 Subject: [PATCH] UI: Add case for widget type --- ui-ngx/src/app/core/http/entity.service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index 69ca114001..fe884ab927 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -41,7 +41,7 @@ import { AttributeScope, DataKeyType } from '@shared/models/telemetry/telemetry. import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils'; import { RuleChainService } from '@core/http/rule-chain.service'; import { AliasInfo, StateParams, SubscriptionInfo } from '@core/api/widget-api.models'; -import { DataKey, Datasource, DatasourceType, KeyInfo } from '@app/shared/models/widget.models'; +import { DataKey, Datasource, DatasourceType, DeprecatedFilter, KeyInfo } from '@app/shared/models/widget.models'; import { UtilsService } from '@core/services/utils.service'; import { AliasFilterType, @@ -65,7 +65,9 @@ import { Device, DeviceCredentialsType } from '@shared/models/device.models'; import { AttributeService } from '@core/http/attribute.service'; import { AlarmData, - AlarmDataQuery, AlarmFilter, AlarmFilterConfig, + AlarmDataQuery, + AlarmFilter, + AlarmFilterConfig, createDefaultEntityDataPageLink, EntityData, EntityDataQuery, @@ -418,6 +420,10 @@ export class EntityService { pageLink.sortOrder.property = 'title'; entitiesObservable = this.widgetService.getWidgetBundles(pageLink, false, config); break; + case EntityType.WIDGET_TYPE: + pageLink.sortOrder.property = 'name'; + entitiesObservable = this.widgetService.getWidgetTypes(pageLink, true, false, DeprecatedFilter.ALL, null, config); + break; case EntityType.NOTIFICATION_TARGET: pageLink.sortOrder.property = 'name'; entitiesObservable = this.notificationService.getNotificationTargets(pageLink, subType as NotificationType, config);