@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.
- package/CHANGELOG.md +8 -2
- package/bundles/@flexem/fc-gui.umd.js +8 -6
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/alarm/alarm-element.d.ts +1 -0
- package/elements/alarm/alarm-element.js +8 -6
- package/elements/alarm/alarm-element.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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.
|
|
40
|
-
this.currentTimePeriod = (
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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":
|
|
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"}]}}}}]
|