Commit 7343afb876d213e178e39476b64baf4594a8f51c
1 parent
31f0689f
UI: Add alarmFields to AlarmDataQuery
Showing
2 changed files
with
7 additions
and
0 deletions
@@ -91,6 +91,11 @@ export class AlarmDataSubscription { | @@ -91,6 +91,11 @@ export class AlarmDataSubscription { | ||
91 | this.subscriber = new TelemetrySubscriber(this.telemetryService); | 91 | this.subscriber = new TelemetrySubscriber(this.telemetryService); |
92 | this.alarmDataCommand = new AlarmDataCmd(); | 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 | const entityFields: Array<EntityKey> = | 99 | const entityFields: Array<EntityKey> = |
95 | this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.entityField).map( | 100 | this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.entityField).map( |
96 | dataKey => ({ type: EntityKeyType.ENTITY_FIELD, key: dataKey.name }) | 101 | dataKey => ({ type: EntityKeyType.ENTITY_FIELD, key: dataKey.name }) |
@@ -116,6 +121,7 @@ export class AlarmDataSubscription { | @@ -116,6 +121,7 @@ export class AlarmDataSubscription { | ||
116 | entityFilter: this.alarmDataSubscriptionOptions.entityFilter, | 121 | entityFilter: this.alarmDataSubscriptionOptions.entityFilter, |
117 | pageLink: deepClone(this.alarmDataSubscriptionOptions.pageLink), | 122 | pageLink: deepClone(this.alarmDataSubscriptionOptions.pageLink), |
118 | keyFilters, | 123 | keyFilters, |
124 | + alarmFields, | ||
119 | entityFields, | 125 | entityFields, |
120 | latestValues | 126 | latestValues |
121 | }; | 127 | }; |
@@ -556,6 +556,7 @@ export interface EntityDataQuery extends AbstractDataQuery<EntityDataPageLink> { | @@ -556,6 +556,7 @@ export interface EntityDataQuery extends AbstractDataQuery<EntityDataPageLink> { | ||
556 | } | 556 | } |
557 | 557 | ||
558 | export interface AlarmDataQuery extends AbstractDataQuery<AlarmDataPageLink> { | 558 | export interface AlarmDataQuery extends AbstractDataQuery<AlarmDataPageLink> { |
559 | + alarmFields?: Array<EntityKey>; | ||
559 | } | 560 | } |
560 | 561 | ||
561 | export interface TsValue { | 562 | export interface TsValue { |