Browse Source

UI: Add alarmFields to AlarmDataQuery

pull/3089/head
Igor Kulikov 6 years ago
parent
commit
7343afb876
  1. 6
      ui-ngx/src/app/core/api/alarm-data-subscription.ts
  2. 1
      ui-ngx/src/app/shared/models/query/query.models.ts

6
ui-ngx/src/app/core/api/alarm-data-subscription.ts

@ -91,6 +91,11 @@ export class AlarmDataSubscription {
this.subscriber = new TelemetrySubscriber(this.telemetryService);
this.alarmDataCommand = new AlarmDataCmd();
const alarmFields: Array<EntityKey> =
this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.alarm).map(
dataKey => ({ type: EntityKeyType.ALARM_FIELD, key: dataKey.name })
);
const entityFields: Array<EntityKey> =
this.alarmDataSubscriptionOptions.dataKeys.filter(dataKey => dataKey.type === DataKeyType.entityField).map(
dataKey => ({ type: EntityKeyType.ENTITY_FIELD, key: dataKey.name })
@ -116,6 +121,7 @@ export class AlarmDataSubscription {
entityFilter: this.alarmDataSubscriptionOptions.entityFilter,
pageLink: deepClone(this.alarmDataSubscriptionOptions.pageLink),
keyFilters,
alarmFields,
entityFields,
latestValues
};

1
ui-ngx/src/app/shared/models/query/query.models.ts

@ -556,6 +556,7 @@ export interface EntityDataQuery extends AbstractDataQuery<EntityDataPageLink> {
}
export interface AlarmDataQuery extends AbstractDataQuery<AlarmDataPageLink> {
alarmFields?: Array<EntityKey>;
}
export interface TsValue {

Loading…
Cancel
Save