Commit 7343afb876d213e178e39476b64baf4594a8f51c

Authored by Igor Kulikov
1 parent 31f0689f

UI: Add alarmFields to AlarmDataQuery

... ... @@ -91,6 +91,11 @@ export class AlarmDataSubscription {
91 91 this.subscriber = new TelemetrySubscriber(this.telemetryService);
92 92 this.alarmDataCommand = new AlarmDataCmd();
93 93
  94 + const alarmFields: Array<EntityKey> =
  95 + this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.alarm).map(
  96 + dataKey => ({ type: EntityKeyType.ALARM_FIELD, key: dataKey.name })
  97 + );
  98 +
94 99 const entityFields: Array<EntityKey> =
95 100 this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.entityField).map(
96 101 dataKey => ({ type: EntityKeyType.ENTITY_FIELD, key: dataKey.name })
... ... @@ -116,6 +121,7 @@ export class AlarmDataSubscription {
116 121 entityFilter: this.alarmDataSubscriptionOptions.entityFilter,
117 122 pageLink: deepClone(this.alarmDataSubscriptionOptions.pageLink),
118 123 keyFilters,
  124 + alarmFields,
119 125 entityFields,
120 126 latestValues
121 127 };
... ...
... ... @@ -556,6 +556,7 @@ export interface EntityDataQuery extends AbstractDataQuery<EntityDataPageLink> {
556 556 }
557 557
558 558 export interface AlarmDataQuery extends AbstractDataQuery<AlarmDataPageLink> {
  559 + alarmFields?: Array<EntityKey>;
559 560 }
560 561
561 562 export interface TsValue {
... ...