UI: Add device profile fetch functions to entity service

This commit is contained in:
Igor Kulikov 2022-06-07 10:52:43 +03:00
parent 6f1b3a93fe
commit 540aeec2d7

View File

@ -67,7 +67,6 @@ import {
AlarmData,
AlarmDataQuery,
createDefaultEntityDataPageLink,
defaultEntityDataPageLink,
EntityData,
EntityDataQuery,
entityDataToEntityInfo,
@ -233,6 +232,11 @@ export class EntityService {
case EntityType.ALARM:
console.error('Get Alarm Entity is not implemented!');
break;
case EntityType.DEVICE_PROFILE:
observable = this.getEntitiesByIdsObservable(
(id) => this.deviceProfileService.getDeviceProfileInfo(id, config),
entityIds);
break;
}
return observable;
}
@ -374,6 +378,10 @@ export class EntityService {
pageLink.sortOrder.property = 'title';
entitiesObservable = this.otaPackageService.getOtaPackages(pageLink, config);
break;
case EntityType.DEVICE_PROFILE:
pageLink.sortOrder.property = 'name';
entitiesObservable = this.deviceProfileService.getDeviceProfileInfos(pageLink, null, config);
break;
}
return entitiesObservable;
}