|
@@ -83,7 +83,12 @@ import { |
|
@@ -83,7 +83,12 @@ import { |
83
|
import { alarmFields } from '@shared/models/alarm.models';
|
83
|
import { alarmFields } from '@shared/models/alarm.models';
|
84
|
import { OtaPackageService } from '@core/http/ota-package.service';
|
84
|
import { OtaPackageService } from '@core/http/ota-package.service';
|
85
|
import { EdgeService } from '@core/http/edge.service';
|
85
|
import { EdgeService } from '@core/http/edge.service';
|
86
|
-import { Edge, EdgeEvent, EdgeEventActionType, EdgeEventType } from '@shared/models/edge.models';
|
86
|
+import {
|
|
|
87
|
+ Edge,
|
|
|
88
|
+ EdgeEvent,
|
|
|
89
|
+ EdgeEventType,
|
|
|
90
|
+ bodyContentEdgeEventActionTypes
|
|
|
91
|
+} from '@shared/models/edge.models';
|
87
|
import { RuleChainMetaData, RuleChainType } from '@shared/models/rule-chain.models';
|
92
|
import { RuleChainMetaData, RuleChainType } from '@shared/models/rule-chain.models';
|
88
|
import { WidgetService } from '@core/http/widget.service';
|
93
|
import { WidgetService } from '@core/http/widget.service';
|
89
|
import { DeviceProfileService } from '@core/http/device-profile.service';
|
94
|
import { DeviceProfileService } from '@core/http/device-profile.service';
|
|
@@ -1391,7 +1396,6 @@ export class EntityService { |
|
@@ -1391,7 +1396,6 @@ export class EntityService { |
1391
|
let entityObservable: Observable<BaseData<HasId> | RuleChainMetaData | string>;
|
1396
|
let entityObservable: Observable<BaseData<HasId> | RuleChainMetaData | string>;
|
1392
|
const entityId: string = entity.entityId;
|
1397
|
const entityId: string = entity.entityId;
|
1393
|
const entityType: any = entity.type;
|
1398
|
const entityType: any = entity.type;
|
1394
|
- const entityAction: EdgeEventActionType = entity.action;
|
|
|
1395
|
switch (entityType) {
|
1399
|
switch (entityType) {
|
1396
|
case EdgeEventType.DASHBOARD:
|
1400
|
case EdgeEventType.DASHBOARD:
|
1397
|
case EdgeEventType.ALARM:
|
1401
|
case EdgeEventType.ALARM:
|
|
@@ -1403,12 +1407,8 @@ export class EntityService { |
|
@@ -1403,12 +1407,8 @@ export class EntityService { |
1403
|
case EdgeEventType.ASSET:
|
1407
|
case EdgeEventType.ASSET:
|
1404
|
case EdgeEventType.DEVICE:
|
1408
|
case EdgeEventType.DEVICE:
|
1405
|
case EdgeEventType.ENTITY_VIEW:
|
1409
|
case EdgeEventType.ENTITY_VIEW:
|
1406
|
- if (entityAction === EdgeEventActionType.POST_ATTRIBUTES ||
|
|
|
1407
|
- entityAction === EdgeEventActionType.ATTRIBUTES_UPDATED ||
|
|
|
1408
|
- entityAction === EdgeEventActionType.ATTRIBUTES_DELETED ||
|
|
|
1409
|
- entityAction === EdgeEventActionType.TIMESERIES_UPDATED ||
|
|
|
1410
|
- entityAction === EdgeEventActionType.RPC_CALL) {
|
|
|
1411
|
- return of(entity.body);
|
1410
|
+ if (bodyContentEdgeEventActionTypes.indexOf(entity.action) > -1) {
|
|
|
1411
|
+ entityObservable = of(entity.body);
|
1412
|
} else {
|
1412
|
} else {
|
1413
|
entityObservable = this.getEntity(entityType, entityId, { ignoreLoading: true, ignoreErrors: true });
|
1413
|
entityObservable = this.getEntity(entityType, entityId, { ignoreLoading: true, ignoreErrors: true });
|
1414
|
}
|
1414
|
}
|