|
|
|
@ -83,7 +83,12 @@ import { |
|
|
|
import { alarmFields } from '@shared/models/alarm.models'; |
|
|
|
import { OtaPackageService } from '@core/http/ota-package.service'; |
|
|
|
import { EdgeService } from '@core/http/edge.service'; |
|
|
|
import { Edge, EdgeEvent, EdgeEventActionType, EdgeEventType } from '@shared/models/edge.models'; |
|
|
|
import { |
|
|
|
Edge, |
|
|
|
EdgeEvent, |
|
|
|
EdgeEventType, |
|
|
|
bodyContentEdgeEventActionTypes |
|
|
|
} from '@shared/models/edge.models'; |
|
|
|
import { RuleChainMetaData, RuleChainType } from '@shared/models/rule-chain.models'; |
|
|
|
import { WidgetService } from '@core/http/widget.service'; |
|
|
|
import { DeviceProfileService } from '@core/http/device-profile.service'; |
|
|
|
@ -1391,7 +1396,6 @@ export class EntityService { |
|
|
|
let entityObservable: Observable<BaseData<HasId> | RuleChainMetaData | string>; |
|
|
|
const entityId: string = entity.entityId; |
|
|
|
const entityType: any = entity.type; |
|
|
|
const entityAction: EdgeEventActionType = entity.action; |
|
|
|
switch (entityType) { |
|
|
|
case EdgeEventType.DASHBOARD: |
|
|
|
case EdgeEventType.ALARM: |
|
|
|
@ -1403,12 +1407,8 @@ export class EntityService { |
|
|
|
case EdgeEventType.ASSET: |
|
|
|
case EdgeEventType.DEVICE: |
|
|
|
case EdgeEventType.ENTITY_VIEW: |
|
|
|
if (entityAction === EdgeEventActionType.POST_ATTRIBUTES || |
|
|
|
entityAction === EdgeEventActionType.ATTRIBUTES_UPDATED || |
|
|
|
entityAction === EdgeEventActionType.ATTRIBUTES_DELETED || |
|
|
|
entityAction === EdgeEventActionType.TIMESERIES_UPDATED || |
|
|
|
entityAction === EdgeEventActionType.RPC_CALL) { |
|
|
|
return of(entity.body); |
|
|
|
if (bodyContentEdgeEventActionTypes.indexOf(entity.action) > -1) { |
|
|
|
entityObservable = of(entity.body); |
|
|
|
} else { |
|
|
|
entityObservable = this.getEntity(entityType, entityId, { ignoreLoading: true, ignoreErrors: true }); |
|
|
|
} |
|
|
|
|