Browse Source

UI: Add case for widget type

pull/9503/head
Artem Dzhereleiko 3 years ago
parent
commit
657c247687
  1. 10
      ui-ngx/src/app/core/http/entity.service.ts

10
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);

Loading…
Cancel
Save