@c8y/ngx-components 1024.19.1 → 1024.19.5
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/fesm2022/c8y-ngx-components-alarms.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +1 -0
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +9 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +2 -2
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +3 -0
- package/locales/es.po +3 -0
- package/locales/fr.po +3 -0
- package/locales/ja_JP.po +3 -0
- package/locales/ko.po +3 -0
- package/locales/nl.po +3 -0
- package/locales/pl.po +3 -0
- package/locales/pt_BR.po +3 -0
- package/locales/zh_CN.po +3 -0
- package/locales/zh_TW.po +3 -0
- package/package.json +1 -1
- package/types/c8y-ngx-components-widgets-implementations-datapoints-graph.d.ts.map +1 -1
|
@@ -286,7 +286,7 @@ class DatapointsGraphWidgetViewComponent {
|
|
|
286
286
|
this.AGGREGATION_TEXTS = AGGREGATION_TEXTS;
|
|
287
287
|
this.datapointsOutOfSync = new Map();
|
|
288
288
|
this.hasAtLeastOneDatapointActive = true;
|
|
289
|
-
this.hasAtLeastOneAlarmActive =
|
|
289
|
+
this.hasAtLeastOneAlarmActive = false;
|
|
290
290
|
this.isMarkedAreaEnabled = false;
|
|
291
291
|
this.loadedDatapoints = [];
|
|
292
292
|
this.loadedAlarmsOrEvents = [];
|
|
@@ -346,6 +346,10 @@ class DatapointsGraphWidgetViewComponent {
|
|
|
346
346
|
this.totalLegendItems = dpLegendCount + (this.displayConfig?.alarmsEventsConfigs?.length || 0);
|
|
347
347
|
this.loadedDatapoints = (this.displayConfig?.datapoints || []).filter(dp => dp.__active);
|
|
348
348
|
this.loadedAlarmsOrEvents = (this.displayConfig?.alarmsEventsConfigs || []).filter(aOrE => aOrE.__active && !aOrE.__hidden);
|
|
349
|
+
// Seed from the config so the severity filter mounts with the widget. The filter emits its
|
|
350
|
+
// initial value on init, and mounting it only after the chart has loaded its alarms would
|
|
351
|
+
// trigger a second load.
|
|
352
|
+
this.hasAtLeastOneAlarmActive = (this.displayConfig?.alarmsEventsConfigs || []).some(aOrE => aOrE.timelineType === 'ALARM' && aOrE.__active);
|
|
349
353
|
if (this.totalLegendItems > 5 || this.displayConfig?.dataPointLegendDisplay === 'dropdown') {
|
|
350
354
|
this.selectableItems = this.buildSelectableItems();
|
|
351
355
|
// Initialize selectedItems with the currently active items
|
|
@@ -801,9 +805,10 @@ class DatapointsGraphWidgetViewComponent {
|
|
|
801
805
|
updateAlarmsAndEvents(alarmsEventsConfigs) {
|
|
802
806
|
this.alarms = alarmsEventsConfigs.filter(alarm => alarm.timelineType === 'ALARM');
|
|
803
807
|
this.events = alarmsEventsConfigs.filter(event => event.timelineType === 'EVENT');
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
808
|
+
// Recompute in both directions. Only ever clearing this flag left the severity filter
|
|
809
|
+
// showing for widgets that have no alarms at all, and kept it hidden after an alarm was
|
|
810
|
+
// added back.
|
|
811
|
+
this.hasAtLeastOneAlarmActive = this.alarms.some(alarm => alarm.__active);
|
|
807
812
|
}
|
|
808
813
|
filterSeverity(eventTarget) {
|
|
809
814
|
this.alarms = this.alarms.map(alarm => {
|