Commit 64d33bde99c4c9d918e80bd5c3921439cc8775f4
Merge branch 'feature/entity-data-query' of github.com:thingsboard/thingsboard i…
…nto feature/entity-data-query
Showing
2 changed files
with
15 additions
and
11 deletions
... | ... | @@ -383,6 +383,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
383 | 383 | private prepareDataSubscriptions(): Observable<any> { |
384 | 384 | if (this.hasDataPageLink) { |
385 | 385 | this.hasResolvedData = true; |
386 | + this.notifyDataLoaded(); | |
386 | 387 | return of(null); |
387 | 388 | } |
388 | 389 | const resolveResultObservables = this.configuredDatasources.map((datasource, index) => { | ... | ... |
... | ... | @@ -45,23 +45,18 @@ import { Datasource, DatasourceType, KeyInfo } from '@app/shared/models/widget.m |
45 | 45 | import { UtilsService } from '@core/services/utils.service'; |
46 | 46 | import { AliasFilterType, EntityAlias, EntityAliasFilter, EntityAliasFilterResult } from '@shared/models/alias.models'; |
47 | 47 | import { entityFields, EntityInfo, ImportEntitiesResultInfo, ImportEntityData } from '@shared/models/entity.models'; |
48 | -import { | |
49 | - EntityRelationInfo, | |
50 | - EntityRelationsQuery, | |
51 | - EntitySearchDirection, | |
52 | - EntitySearchQuery | |
53 | -} from '@shared/models/relation.models'; | |
48 | +import { EntityRelationInfo, EntitySearchDirection } from '@shared/models/relation.models'; | |
54 | 49 | import { EntityRelationService } from '@core/http/entity-relation.service'; |
55 | -import { deepClone, isDefined, isDefinedAndNotNull } from '@core/utils'; | |
56 | -import { Asset, AssetSearchQuery } from '@shared/models/asset.models'; | |
57 | -import { ClaimResult, Device, DeviceCredentialsType, DeviceSearchQuery } from '@shared/models/device.models'; | |
58 | -import { EntityViewSearchQuery } from '@shared/models/entity-view.models'; | |
50 | +import { deepClone, isDefinedAndNotNull } from '@core/utils'; | |
51 | +import { Asset } from '@shared/models/asset.models'; | |
52 | +import { Device, DeviceCredentialsType } from '@shared/models/device.models'; | |
59 | 53 | import { AttributeService } from '@core/http/attribute.service'; |
60 | 54 | import { |
61 | 55 | createDefaultEntityDataPageLink, |
62 | 56 | EntityData, |
63 | 57 | EntityDataQuery, |
64 | - EntityFilter, EntityKeyType | |
58 | + EntityFilter, | |
59 | + EntityKeyType | |
65 | 60 | } from '@shared/models/query/query.models'; |
66 | 61 | |
67 | 62 | @Injectable({ |
... | ... | @@ -1259,6 +1254,14 @@ export class EntityService { |
1259 | 1254 | name: entity.name, |
1260 | 1255 | entityType: subscriptionInfo.entityType, |
1261 | 1256 | entityId: entity.id.id, |
1257 | + pageLink: { | |
1258 | + pageSize: 1, | |
1259 | + page: 0 | |
1260 | + }, | |
1261 | + entityFilter: { | |
1262 | + type: AliasFilterType.singleEntity, | |
1263 | + singleEntity: entity.id | |
1264 | + }, | |
1262 | 1265 | dataKeys: [] |
1263 | 1266 | }; |
1264 | 1267 | } else if (subscriptionInfo.type === DatasourceType.function) { | ... | ... |