@c8y/ngx-components 1022.26.1 → 1022.28.2
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/core/search/inventory-search.service.d.ts +4 -3
- package/core/search/inventory-search.service.d.ts.map +1 -1
- package/core/search/search-input.component.d.ts +5 -2
- package/core/search/search-input.component.d.ts.map +1 -1
- package/core/search/search.model.d.ts +4 -0
- package/core/search/search.model.d.ts.map +1 -1
- package/core/search/search.service.d.ts +2 -1
- package/core/search/search.service.d.ts.map +1 -1
- package/core/select/typeahead.component.d.ts +2 -1
- package/core/select/typeahead.component.d.ts.map +1 -1
- package/device-grid/device-grid.component.d.ts.map +1 -1
- package/device-grid/device-grid.service.d.ts +4 -3
- package/device-grid/device-grid.service.d.ts.map +1 -1
- package/echart/charts.component.d.ts.map +1 -1
- package/ecosystem/application-plugins/application-plugins.component.d.ts +3 -0
- package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +2 -2
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +21 -13
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +22 -70
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +41 -21
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +84 -26
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +2 -2
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +2 -2
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-search.mjs +328 -210
- package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +36 -16
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +7390 -7345
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +27 -0
- package/locales/es.po +27 -0
- package/locales/fr.po +27 -0
- package/locales/ja_JP.po +27 -0
- package/locales/ko.po +27 -0
- package/locales/locales.pot +25 -3
- package/locales/nl.po +27 -0
- package/locales/pl.po +27 -0
- package/locales/pt_BR.po +27 -0
- package/locales/zh_CN.po +27 -0
- package/locales/zh_TW.po +27 -0
- package/map/map.service.d.ts +13 -10
- package/map/map.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/search/columns/asset-type-search-grid-column.d.ts.map +1 -1
- package/search/search-action.component.d.ts +12 -8
- package/search/search-action.component.d.ts.map +1 -1
- package/search/search-custom-filters.component.d.ts +18 -4
- package/search/search-custom-filters.component.d.ts.map +1 -1
- package/search/search-grid.component.d.ts +14 -14
- package/search/search-grid.component.d.ts.map +1 -1
- package/search/search-results.component.d.ts +3 -1
- package/search/search-results.component.d.ts.map +1 -1
- package/search/search.module.d.ts.map +1 -1
- package/search/search.service.d.ts +14 -6
- package/search/search.service.d.ts.map +1 -1
- package/sub-assets/sub-assets.service.d.ts +9 -5
- package/sub-assets/sub-assets.service.d.ts.map +1 -1
- package/echart/services/custom-measurements.service.d.ts +0 -12
- package/echart/services/custom-measurements.service.d.ts.map +0 -1
|
@@ -1,68 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Input, Component, EventEmitter, inject, ViewChild, Output } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import * as i1 from '@c8y/
|
|
6
|
-
import { MeasurementService, AlarmStatus, aggregationType } from '@c8y/client';
|
|
7
|
-
import { fromFetch } from 'rxjs/fetch';
|
|
8
|
-
import * as i2 from '@c8y/ngx-components/api';
|
|
9
|
-
import { cloneDeep } from 'lodash-es';
|
|
10
|
-
import * as i1$1 from '@c8y/ngx-components';
|
|
3
|
+
import { from, merge, interval, BehaviorSubject, of, lastValueFrom, defer, forkJoin } from 'rxjs';
|
|
4
|
+
import { mergeMap, map, tap, throttleTime, buffer, switchMap } from 'rxjs/operators';
|
|
5
|
+
import * as i1 from '@c8y/ngx-components';
|
|
11
6
|
import { gettext, CommonModule, WidgetTimeContextDateRangeService, DismissAlertStrategy, DynamicComponentAlert, CoreModule, MeasurementRealtimeService, AlarmRealtimeService, EventRealtimeService } from '@c8y/ngx-components';
|
|
7
|
+
import * as i1$1 from '@c8y/client';
|
|
8
|
+
import { AlarmStatus, MeasurementService, aggregationType } from '@c8y/client';
|
|
12
9
|
import * as i6 from '@angular/router';
|
|
13
10
|
import * as i4 from '@c8y/ngx-components/alarms';
|
|
14
11
|
import { AlarmsModule, AlarmSeverityToIconPipe, AlarmSeverityToLabelPipe } from '@c8y/ngx-components/alarms';
|
|
15
12
|
import { INTERVALS } from '@c8y/ngx-components/interval-picker';
|
|
16
13
|
import * as i5 from '@ngx-translate/core';
|
|
17
|
-
import * as i2
|
|
14
|
+
import * as i2 from '@angular/common';
|
|
18
15
|
import { CommonModule as CommonModule$1 } from '@angular/common';
|
|
19
16
|
import * as i3 from 'ngx-echarts';
|
|
20
17
|
import { NgxEchartsModule, NGX_ECHARTS_CONFIG } from 'ngx-echarts';
|
|
21
18
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
22
19
|
import { PopoverModule } from 'ngx-bootstrap/popover';
|
|
23
20
|
|
|
24
|
-
class CustomMeasurementService extends MeasurementService {
|
|
25
|
-
constructor(client, realtime, apiService) {
|
|
26
|
-
super(client, realtime);
|
|
27
|
-
this.apiService = apiService;
|
|
28
|
-
}
|
|
29
|
-
listSeries$(params) {
|
|
30
|
-
const url = `/${this.baseUrl}/${this.listUrl}/series`;
|
|
31
|
-
const fetchOptions = {
|
|
32
|
-
params: {
|
|
33
|
-
revert: true,
|
|
34
|
-
...params
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const options = this.client.getFetchOptions(fetchOptions);
|
|
38
|
-
const fullUrl = this.client.getUrl(url, fetchOptions);
|
|
39
|
-
const callOnStart = {
|
|
40
|
-
options,
|
|
41
|
-
method: 'GET',
|
|
42
|
-
url
|
|
43
|
-
};
|
|
44
|
-
const callOnFinish = {
|
|
45
|
-
...cloneDeep(callOnStart),
|
|
46
|
-
response: { status: null }
|
|
47
|
-
};
|
|
48
|
-
return defer(() => {
|
|
49
|
-
this.apiService.onStart(callOnStart);
|
|
50
|
-
return fromFetch(fullUrl, options);
|
|
51
|
-
}).pipe(switchMap(async (res) => {
|
|
52
|
-
callOnFinish.response = res;
|
|
53
|
-
const data = await res.json();
|
|
54
|
-
return { res: res, data };
|
|
55
|
-
}), finalize(() => {
|
|
56
|
-
this.apiService.onFinish(callOnFinish);
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomMeasurementService, deps: [{ token: i1.FetchClient }, { token: i1.Realtime }, { token: i2.ApiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomMeasurementService }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomMeasurementService, decorators: [{
|
|
63
|
-
type: Injectable
|
|
64
|
-
}], ctorParameters: () => [{ type: i1.FetchClient }, { type: i1.Realtime }, { type: i2.ApiService }] });
|
|
65
|
-
|
|
66
21
|
class YAxisService {
|
|
67
22
|
constructor(appStateService) {
|
|
68
23
|
this.appStateService = appStateService;
|
|
@@ -236,12 +191,12 @@ class YAxisService {
|
|
|
236
191
|
return 'left';
|
|
237
192
|
}
|
|
238
193
|
}
|
|
239
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YAxisService, deps: [{ token: i1
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YAxisService, deps: [{ token: i1.AppStateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
240
195
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YAxisService }); }
|
|
241
196
|
}
|
|
242
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YAxisService, decorators: [{
|
|
243
198
|
type: Injectable
|
|
244
|
-
}], ctorParameters: () => [{ type: i1
|
|
199
|
+
}], ctorParameters: () => [{ type: i1.AppStateService }] });
|
|
245
200
|
|
|
246
201
|
function assertUnreachable(_) {
|
|
247
202
|
throw new Error('Case unreachable.');
|
|
@@ -1377,12 +1332,12 @@ class EchartsOptionsService {
|
|
|
1377
1332
|
return acc;
|
|
1378
1333
|
}, null);
|
|
1379
1334
|
}
|
|
1380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1
|
|
1335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i5.TranslateService }, { token: i6.Router }, { token: i1.AppStateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1381
1336
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService }); }
|
|
1382
1337
|
}
|
|
1383
1338
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, decorators: [{
|
|
1384
1339
|
type: Injectable
|
|
1385
|
-
}], ctorParameters: () => [{ type: i1
|
|
1340
|
+
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i5.TranslateService }, { type: i6.Router }, { type: i1.AppStateService }] });
|
|
1386
1341
|
|
|
1387
1342
|
class ChartRealtimeService {
|
|
1388
1343
|
constructor(measurementRealtime, alarmRealtimeService, eventRealtimeService, echartsOptionsService) {
|
|
@@ -1632,16 +1587,16 @@ class ChartRealtimeService {
|
|
|
1632
1587
|
datapointOutOfSyncCallback(datapoint);
|
|
1633
1588
|
}
|
|
1634
1589
|
}
|
|
1635
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartRealtimeService, deps: [{ token: i1
|
|
1590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartRealtimeService, deps: [{ token: i1.MeasurementRealtimeService }, { token: i1.AlarmRealtimeService }, { token: i1.EventRealtimeService }, { token: EchartsOptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1636
1591
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartRealtimeService }); }
|
|
1637
1592
|
}
|
|
1638
1593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartRealtimeService, decorators: [{
|
|
1639
1594
|
type: Injectable
|
|
1640
|
-
}], ctorParameters: () => [{ type: i1
|
|
1595
|
+
}], ctorParameters: () => [{ type: i1.MeasurementRealtimeService }, { type: i1.AlarmRealtimeService }, { type: i1.EventRealtimeService }, { type: EchartsOptionsService }] });
|
|
1641
1596
|
|
|
1642
1597
|
class ChartAlertsComponent {
|
|
1643
1598
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlertsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1644
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ChartAlertsComponent, isStandalone: true, selector: "c8y-chart-alerts", inputs: { alerts: "alerts" }, ngImport: i0, template: "<div\n class=\"overlay-center-vertically d-col p-16 p-r-24 p-l-24\"\n *ngIf=\"alerts?.anyAlertExists$ | async\"\n>\n <ng-container *ngFor=\"let alertGroup of alerts?.alertGroups\">\n <div\n class=\"alert\"\n role=\"alert\"\n *ngIf=\"alertGroup.value.alerts.length\"\n [ngClass]=\"'alert-' + alertGroup.type\"\n >\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"alerts.dismissAlertGroup(alertGroup.type, dismissPermanently.checked)\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n <span class=\"sr-only\">{{ 'Close' | translate }}</span>\n </button>\n <p *ngFor=\"let alertItem of alertGroup.value.alerts\">\n {{ alertItem.text | translate }}\n </p>\n <label\n class=\"c8y-checkbox m-t-16\"\n title=\"{{ 'Don\\'t show again' | translate }}\"\n >\n <input\n type=\"checkbox\"\n #dismissPermanently\n />\n <span></span>\n <span>{{ \"Don't show again\" | translate }}</span>\n </label>\n </div>\n </ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
|
1599
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ChartAlertsComponent, isStandalone: true, selector: "c8y-chart-alerts", inputs: { alerts: "alerts" }, ngImport: i0, template: "<div\n class=\"overlay-center-vertically d-col p-16 p-r-24 p-l-24\"\n *ngIf=\"alerts?.anyAlertExists$ | async\"\n>\n <ng-container *ngFor=\"let alertGroup of alerts?.alertGroups\">\n <div\n class=\"alert\"\n role=\"alert\"\n *ngIf=\"alertGroup.value.alerts.length\"\n [ngClass]=\"'alert-' + alertGroup.type\"\n >\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"alerts.dismissAlertGroup(alertGroup.type, dismissPermanently.checked)\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n <span class=\"sr-only\">{{ 'Close' | translate }}</span>\n </button>\n <p *ngFor=\"let alertItem of alertGroup.value.alerts\">\n {{ alertItem.text | translate }}\n </p>\n <label\n class=\"c8y-checkbox m-t-16\"\n title=\"{{ 'Don\\'t show again' | translate }}\"\n >\n <input\n type=\"checkbox\"\n #dismissPermanently\n />\n <span></span>\n <span>{{ \"Don't show again\" | translate }}</span>\n </label>\n </div>\n </ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
1645
1600
|
}
|
|
1646
1601
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlertsComponent, decorators: [{
|
|
1647
1602
|
type: Component,
|
|
@@ -1683,12 +1638,12 @@ class ChartEventsService {
|
|
|
1683
1638
|
const result = await Promise.all(promises);
|
|
1684
1639
|
return result.flat();
|
|
1685
1640
|
}
|
|
1686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartEventsService, deps: [{ token: i1.EventService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartEventsService, deps: [{ token: i1$1.EventService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1687
1642
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartEventsService }); }
|
|
1688
1643
|
}
|
|
1689
1644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartEventsService, decorators: [{
|
|
1690
1645
|
type: Injectable
|
|
1691
|
-
}], ctorParameters: () => [{ type: i1.EventService }] });
|
|
1646
|
+
}], ctorParameters: () => [{ type: i1$1.EventService }] });
|
|
1692
1647
|
|
|
1693
1648
|
class ChartAlarmsService {
|
|
1694
1649
|
constructor(alarmService) {
|
|
@@ -1737,12 +1692,12 @@ class ChartAlarmsService {
|
|
|
1737
1692
|
const result = await Promise.all(promises);
|
|
1738
1693
|
return result.flat();
|
|
1739
1694
|
}
|
|
1740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlarmsService, deps: [{ token: i1.AlarmService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1695
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlarmsService, deps: [{ token: i1$1.AlarmService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1741
1696
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlarmsService }); }
|
|
1742
1697
|
}
|
|
1743
1698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartAlarmsService, decorators: [{
|
|
1744
1699
|
type: Injectable
|
|
1745
|
-
}], ctorParameters: () => [{ type: i1.AlarmService }] });
|
|
1700
|
+
}], ctorParameters: () => [{ type: i1$1.AlarmService }] });
|
|
1746
1701
|
|
|
1747
1702
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1748
1703
|
class ChartsComponent {
|
|
@@ -1757,7 +1712,7 @@ class ChartsComponent {
|
|
|
1757
1712
|
this.updateAlarmsAndEvents = new EventEmitter();
|
|
1758
1713
|
this.isMarkedAreaEnabled = new EventEmitter();
|
|
1759
1714
|
this.configChangedSubject = new BehaviorSubject(null);
|
|
1760
|
-
this.measurementService = inject(
|
|
1715
|
+
this.measurementService = inject(MeasurementService);
|
|
1761
1716
|
this.echartsOptionsService = inject(EchartsOptionsService);
|
|
1762
1717
|
this.chartRealtimeService = inject(ChartRealtimeService);
|
|
1763
1718
|
this.chartEventsService = inject(ChartEventsService);
|
|
@@ -2193,8 +2148,8 @@ class ChartsComponent {
|
|
|
2193
2148
|
const datapointsWithValuesRequests = [];
|
|
2194
2149
|
const timeRange = this.getTimeRange(60_000);
|
|
2195
2150
|
for (const dp of activeDatapoints) {
|
|
2196
|
-
const request = this.measurementService
|
|
2197
|
-
|
|
2151
|
+
const request = defer(() => this.measurementService.listSeries({
|
|
2152
|
+
revert: true,
|
|
2198
2153
|
...(customTimeRange ? customTimeRange : timeRange),
|
|
2199
2154
|
source: dp.__target?.id || '',
|
|
2200
2155
|
series: [`${dp.fragment}.${dp.series}`],
|
|
@@ -2203,8 +2158,7 @@ class ChartsComponent {
|
|
|
2203
2158
|
aggregationType: customTimeRange ? aggregationType.HOURLY : this.config.aggregation
|
|
2204
2159
|
}
|
|
2205
2160
|
: {})
|
|
2206
|
-
})
|
|
2207
|
-
.pipe(map(res => {
|
|
2161
|
+
})).pipe(map(res => {
|
|
2208
2162
|
const values = res.data.values;
|
|
2209
2163
|
if (res.data.truncated && this.config.dateFrom) {
|
|
2210
2164
|
values[new Date(this.config.dateFrom).toISOString()] = [{ min: null, max: null }];
|
|
@@ -2271,11 +2225,10 @@ class ChartsComponent {
|
|
|
2271
2225
|
EventRealtimeService,
|
|
2272
2226
|
ChartTypesService,
|
|
2273
2227
|
EchartsOptionsService,
|
|
2274
|
-
CustomMeasurementService,
|
|
2275
2228
|
YAxisService,
|
|
2276
2229
|
AlarmSeverityToIconPipe,
|
|
2277
2230
|
AlarmSeverityToLabelPipe
|
|
2278
|
-
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"p-relative fit-h chart-container\"\n>\n <div\n class=\"fit-w fit-h\"\n #chart\n echarts\n [options]=\"chartOption$ | async\"\n (chartInit)=\"onChartInit($event)\"\n ></div>\n\n <c8y-chart-alerts [alerts]=\"alerts\"></c8y-chart-alerts>\n\n <div *ngIf=\"showLoadMore\" class=\"chart-load-more\">\n <button\n class=\"btn btn-primary btn-sm btn-block\"\n (click)=\"loadMoreData()\"\n >\n <i c8yIcon=\"restore\"></i>\n {{ 'Load more' | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2
|
|
2231
|
+
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"p-relative fit-h chart-container\"\n>\n <div\n class=\"fit-w fit-h\"\n #chart\n echarts\n [options]=\"chartOption$ | async\"\n (chartInit)=\"onChartInit($event)\"\n ></div>\n\n <c8y-chart-alerts [alerts]=\"alerts\"></c8y-chart-alerts>\n\n <div *ngIf=\"showLoadMore\" class=\"chart-load-more\">\n <button\n class=\"btn btn-primary btn-sm btn-block\"\n (click)=\"loadMoreData()\"\n >\n <i c8yIcon=\"restore\"></i>\n {{ 'Load more' | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "ngmodule", type: NgxEchartsModule }, { kind: "directive", type: i3.NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: ChartAlertsComponent, selector: "c8y-chart-alerts", inputs: ["alerts"] }, { kind: "ngmodule", type: AlarmsModule }] }); }
|
|
2279
2232
|
}
|
|
2280
2233
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ChartsComponent, decorators: [{
|
|
2281
2234
|
type: Component,
|
|
@@ -2287,7 +2240,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2287
2240
|
EventRealtimeService,
|
|
2288
2241
|
ChartTypesService,
|
|
2289
2242
|
EchartsOptionsService,
|
|
2290
|
-
CustomMeasurementService,
|
|
2291
2243
|
YAxisService,
|
|
2292
2244
|
AlarmSeverityToIconPipe,
|
|
2293
2245
|
AlarmSeverityToLabelPipe
|