@flexem/fc-gui 3.0.0-alpha.69 → 3.0.0-alpha.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ export declare class AlarmElement extends ConditionalDisplayElement {
14
14
  private element;
15
15
  private refreshIntervalId;
16
16
  private readonly displayOption;
17
+ private alarmNames;
17
18
  private startTime;
18
19
  private endTime;
19
20
  private currentTimePeriod;
@@ -8,7 +8,7 @@ import { find, isNil, pull, remove } from 'lodash';
8
8
  import { AlarmState } from './alarm-state-enum';
9
9
  export class AlarmElement extends ConditionalDisplayElement {
10
10
  constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
11
- var _a, _b;
11
+ var _a;
12
12
  super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
13
13
  this.alarmsStore = alarmsStore;
14
14
  this.displayOption = {
@@ -24,6 +24,7 @@ export class AlarmElement extends ConditionalDisplayElement {
24
24
  operationButtonHeight: 24,
25
25
  operationButtonMargin: 4
26
26
  };
27
+ this.alarmNames = [];
27
28
  this.alarmList = [];
28
29
  this.currentAlarmList = [];
29
30
  this.page = 0;
@@ -36,8 +37,8 @@ export class AlarmElement extends ConditionalDisplayElement {
36
37
  this.timePeriods = this.getValidTimePeriods();
37
38
  this.pageSize = this.model.generalSetting.pageSize;
38
39
  if (this.model.filterSetting) {
39
- this.currentTimePeriod = (_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.refreshCycle;
40
- this.currentTimePeriod = (_b = this.model.filterSetting) === null || _b === void 0 ? void 0 : _b.displayPeriod;
40
+ this.alarmNames = this.model.filterSetting.detailsData.map(item => item.name);
41
+ this.currentTimePeriod = (_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.displayPeriod;
41
42
  this.updateQueryTimeRange();
42
43
  if (this.model.filterSetting.alarmType) {
43
44
  this.refreshIntervalId = setInterval(() => {
@@ -51,7 +52,7 @@ export class AlarmElement extends ConditionalDisplayElement {
51
52
  return;
52
53
  }
53
54
  const alarm = alarmWithAppId.alarm;
54
- if (!find(this.model.filterSetting.detailsData, alarmName => alarmName === alarm.name)) {
55
+ if (!find(this.alarmNames, itemName => itemName === alarm.name)) {
55
56
  return;
56
57
  }
57
58
  const currentAlarm = this.currentAlarmList.find(re => re.name === alarm.name);
@@ -110,7 +111,8 @@ export class AlarmElement extends ConditionalDisplayElement {
110
111
  }
111
112
  init() {
112
113
  if (this.model.filterSetting.alarmType) {
113
- const input = new GetAlarmsArgs(this.model.filterSetting.detailsData, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
114
+ this.updateQueryTimeRange();
115
+ const input = new GetAlarmsArgs(this.alarmNames, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
114
116
  this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
115
117
  if (!result.error) {
116
118
  this.totalCount = result.totalCount;
@@ -125,7 +127,7 @@ export class AlarmElement extends ConditionalDisplayElement {
125
127
  });
126
128
  }
127
129
  else {
128
- const input = new GetAlarmsArgs(this.model.filterSetting.detailsData, undefined, undefined, this.pageSize, this.page * this.pageSize);
130
+ const input = new GetAlarmsArgs(this.alarmNames, undefined, undefined, this.pageSize, this.page * this.pageSize);
129
131
  this.alarmsStore.getCurrentAlarms(input).subscribe(result => {
130
132
  if (!result.error) {
131
133
  this.totalCount = result.totalCount;
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AlarmElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":17,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":48,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":49,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":50,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":51,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":52,"character":23},{"__symbolic":"reference","module":"../../config","name":"AlarmsStore","line":53,"character":38},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AlarmElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":17,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":49,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":50,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":51,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":52,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":53,"character":23},{"__symbolic":"reference","module":"../../config","name":"AlarmsStore","line":54,"character":38},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}]}}}}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.69",
3
+ "version": "3.0.0-alpha.70",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",