@c8y/ngx-components 1024.15.16 → 1024.16.10
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-ai-agent-chat.mjs +303 -63
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agents-html.mjs +9 -0
- package/fesm2022/c8y-ngx-components-ai-agents-html.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs +4 -0
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +394 -52
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +329 -19
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +5 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +96 -77
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +92 -47
- package/fesm2022/c8y-ngx-components-datapoint-selector.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 +25 -4
- package/fesm2022/c8y-ngx-components-echart.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-protocol-opcua.mjs +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +5 -6
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.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-sub-assets.mjs +30 -10
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +13 -9
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +4 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +122 -24
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +147 -16
- package/locales/es.po +143 -11
- package/locales/fr.po +459 -324
- package/locales/ja_JP.po +143 -11
- package/locales/ko.po +143 -11
- package/locales/locales.pot +136 -10
- package/locales/nl.po +143 -11
- package/locales/pl.po +143 -11
- package/locales/pt_BR.po +143 -11
- package/locales/zh_CN.po +143 -11
- package/locales/zh_TW.po +143 -11
- package/package.json +1 -1
- package/types/c8y-ngx-components-ai-agent-chat.d.ts +111 -4
- package/types/c8y-ngx-components-ai-agent-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-agents-html.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-agents-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-ai-chat.d.ts +224 -10
- package/types/c8y-ngx-components-ai-ai-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai.d.ts +176 -6
- package/types/c8y-ngx-components-ai.d.ts.map +1 -1
- package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
- package/types/c8y-ngx-components-datapoint-explorer-view.d.ts +7 -2
- package/types/c8y-ngx-components-datapoint-explorer-view.d.ts.map +1 -1
- package/types/c8y-ngx-components-datapoint-selector.d.ts +63 -50
- package/types/c8y-ngx-components-datapoint-selector.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +12 -0
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-register-device.d.ts.map +1 -1
- package/types/c8y-ngx-components-sub-assets.d.ts +10 -1
- package/types/c8y-ngx-components-sub-assets.d.ts.map +1 -1
- package/types/c8y-ngx-components-time-context.d.ts +2 -0
- package/types/c8y-ngx-components-time-context.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +37 -5
- package/types/c8y-ngx-components.d.ts.map +1 -1
|
@@ -461,7 +461,6 @@ class WorkspaceConfigComponent {
|
|
|
461
461
|
this.activatedRoute = inject(ActivatedRoute);
|
|
462
462
|
this.router = inject(Router);
|
|
463
463
|
this.nameGeneratorService = inject(NameGeneratorService);
|
|
464
|
-
this.datapointSyncService = inject(DatapointSyncService);
|
|
465
464
|
this.dataExplorerService = inject(DataExplorerService);
|
|
466
465
|
}
|
|
467
466
|
ngOnInit() {
|
|
@@ -534,22 +533,26 @@ class WorkspaceConfigComponent {
|
|
|
534
533
|
async shareConfig(configuration) {
|
|
535
534
|
await this.clipboardService.writeText(JSON.stringify(configuration.config));
|
|
536
535
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
/**
|
|
537
|
+
* Adds the workspace encoded in the URL and emits it exactly once, via addConfig.
|
|
538
|
+
* Managed-object enrichment is left to the parent, which performs it on every emission.
|
|
539
|
+
* Returns false when the URL config cannot be decoded (decodeConfig already alerts).
|
|
540
|
+
*/
|
|
541
|
+
addConfigFromUrl(queryParams) {
|
|
540
542
|
const config = this.workspaceConfigurationService.getConfigurationFromUrl(queryParams.config || {});
|
|
541
|
-
|
|
543
|
+
if (!config) {
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
542
546
|
if (config.datapoints?.length) {
|
|
543
547
|
this.dataExplorerService.processDatapoints(config);
|
|
544
548
|
}
|
|
545
|
-
const uniqueIds = this.datapointSyncService.getManagedObjectIds(config.datapoints || []);
|
|
546
|
-
if (uniqueIds.length) {
|
|
547
|
-
await this.dataExplorerService.loadAndAssignManagedObjects(config, uniqueIds);
|
|
548
|
-
}
|
|
549
549
|
if (config.alarmsEventsConfigs?.length) {
|
|
550
550
|
this.dataExplorerService.processAlarmEventConfigs(config);
|
|
551
551
|
}
|
|
552
|
-
|
|
552
|
+
const id = queryParams.id || new Date().toISOString();
|
|
553
|
+
const label = queryParams.label || this.nameGeneratorService.generateName();
|
|
554
|
+
this.addConfig(config, id, label);
|
|
555
|
+
return true;
|
|
553
556
|
}
|
|
554
557
|
updateConfigurations() {
|
|
555
558
|
const config = { ...this.updatedConfig };
|
|
@@ -586,23 +589,22 @@ class WorkspaceConfigComponent {
|
|
|
586
589
|
this.configurations = configurations;
|
|
587
590
|
this.currentConfiguration =
|
|
588
591
|
this.configurations.find(c => c.id === defaultId) || this.configurations[0];
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
this.currentConfiguration.id !== queryParams.id) {
|
|
596
|
-
this.currentConfiguration = this.configurations.find(c => c.id === queryParams.id);
|
|
597
|
-
this.changeConfiguration(true, this.currentConfiguration);
|
|
592
|
+
const urlConfiguration = queryParams?.id
|
|
593
|
+
? this.configurations.find(c => c.id === queryParams.id)
|
|
594
|
+
: undefined;
|
|
595
|
+
// A new workspace in the URL supersedes the stored default — emit only the URL one.
|
|
596
|
+
if (queryParams?.id && !urlConfiguration && this.addConfigFromUrl(queryParams)) {
|
|
597
|
+
return;
|
|
598
598
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
if (Object.keys(queryParams).length === 0) {
|
|
602
|
-
this.addConfig();
|
|
599
|
+
if (urlConfiguration && this.currentConfiguration.id !== urlConfiguration.id) {
|
|
600
|
+
this.changeConfiguration(true, urlConfiguration);
|
|
603
601
|
return;
|
|
604
602
|
}
|
|
605
|
-
this.
|
|
603
|
+
this.onConfigurationChange.emit(this.currentConfiguration.config);
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
if (Object.keys(queryParams).length === 0 || !this.addConfigFromUrl(queryParams)) {
|
|
607
|
+
this.addConfig();
|
|
606
608
|
}
|
|
607
609
|
}
|
|
608
610
|
initWorkspaceForm() {
|
|
@@ -655,7 +657,7 @@ class WorkspaceConfigComponent {
|
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
659
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
658
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: WorkspaceConfigComponent, isStandalone: true, selector: "c8y-workspace-config", inputs: { updatedConfig: "updatedConfig", silent: "silent", defaultConfigurationId: "defaultConfigurationId" }, outputs: { onConfigurationChange: "onConfigurationChange" }, usesOnChanges: true, ngImport: i0, template: "@if (!silent) {\n <div\n class=\"dropdown\"\n #actionbar_dropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"actionbar_dropdown.isOpen\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n style=\"max-width: 240px\"\n [attr.aria-label]=\"currentConfiguration?.label\"\n tooltip=\"{{ 'Selected configuration' | translate }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"current-configuration-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-8\"\n c8yIcon=\"list\"\n ></i>\n <div class=\"d-col text-left fit-w min-width-0\">\n <span class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Configuration' | translate }}\n </span>\n <span class=\"text-bold text-12 fit-w l-h-1 text-truncate\">\n {{ currentConfiguration?.label }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4 flex-no-shrink\"></span>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-wide dropdown-menu-action-bar\"\n *dropdownMenu\n >\n <div class=\"sticky-top separator-bottom p-t-8 p-b-8 p-l-16 p-r-16\">\n <p>\n <strong>{{ 'Data explorer configurations' | translate }}</strong>\n </p>\n <p>\n <small>{{ 'Easily switch and manage configurations.' | translate }}</small>\n </p>\n </div>\n <c8y-list-group class=\"no-border-last\">\n <form [formGroup]=\"configurationsFormGroup\">\n <div formArrayName=\"configurations\">\n @for (\n configuration of configurationsFormGroup.controls.configurations['controls'];\n track $index\n ) {\n <c8y-li\n class=\"p-0\"\n [dense]=\"true\"\n >\n <c8y-li-radio\n style=\"min-height: 48px\"\n [selected]=\"configuration.value.id === currentConfiguration.id\"\n (onSelect)=\"changeConfiguration($event, configuration.value)\"\n ></c8y-li-radio>\n\n <div class=\"d-flex a-i-center gap-8\">\n <div\n class=\"min-width-0 flex-grow\"\n [formGroupName]=\"$index\"\n >\n <c8y-input-group-editable\n formGroupClass=\"m-b-0\"\n size=\"sm\"\n [ariaLabel]=\"'Configuration label' | translate\"\n [placeholder]=\"'Configuration 1' | translate\"\n formControlName=\"label\"\n [validators]=\"labelValidators\"\n (save)=\"updateConfigurationLabel({ ...configuration.value, label: $event })\"\n ></c8y-input-group-editable>\n </div>\n\n <div class=\"m-l-auto flex-nogrow d-flex gap-8\">\n <button\n class=\"btn-dot btn m-0\"\n [attr.aria-label]=\"'Duplicate configuration' | translate\"\n tooltip=\"{{ 'Duplicate configuration' | translate }}\"\n placement=\"left\"\n (click)=\"addConfig(configuration.value.config)\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"copy\"></i>\n </button>\n\n <button\n class=\"btn-dot btn btn-dot--danger\"\n [attr.aria-label]=\"'Remove configurations' | translate\"\n tooltip=\"{{\n (configuration.value.id === currentConfiguration.id\n ? activeConfigTooltip\n : removeConfigTooltip\n ) | translate\n }}\"\n placement=\"left\"\n [delay]=\"500\"\n (click)=\"$event.stopPropagation(); deleteConfiguration(configuration.value)\"\n [disabled]=\"configuration.value.id === currentConfiguration.id\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </div>\n </c8y-li>\n }\n </div>\n </form>\n </c8y-list-group>\n <div class=\"sticky-bottom separator-top\">\n <div class=\"d-flex p-l-16 p-r-16 p-t-8 p-b-8\">\n <button\n class=\"btn btn-danger btn-sm flex-grow m-r-4\"\n (click)=\"clearAll()\"\n [disabled]=\"configurations.length < 2\"\n >\n <i [c8yIcon]=\"'delete'\"></i>\n {{ 'Delete all configurations' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n type=\"button\"\n (click)=\"addConfig()\"\n >\n <i [c8yIcon]=\"'add-circle-outline'\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.InputGroupEditableComponent, selector: "c8y-input-group-editable", inputs: ["ariaLabel", "name", "size", "placeholder", "multiline", "maxHeight", "maxLength", "noSaveButton", "formGroupClass", "validators", "asyncValidators", "autocomplete"], outputs: ["save", "cancel"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemRadioComponent, selector: "c8y-list-item-radio, c8y-li-radio", inputs: ["selected", "name", "disabled", "value"], outputs: ["onSelect"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i3.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i3.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i4.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
660
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: WorkspaceConfigComponent, isStandalone: true, selector: "c8y-workspace-config", inputs: { updatedConfig: "updatedConfig", silent: "silent", defaultConfigurationId: "defaultConfigurationId" }, outputs: { onConfigurationChange: "onConfigurationChange" }, usesOnChanges: true, ngImport: i0, template: "@if (!silent) {\n <div\n class=\"dropdown\"\n #actionbar_dropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"actionbar_dropdown.isOpen\"\n dropdown\n [insideClick]=\"true\"\n >\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n style=\"max-width: 240px\"\n [attr.aria-label]=\"currentConfiguration?.label\"\n tooltip=\"{{ 'Selected configuration' | translate }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"current-configuration-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-8\"\n c8yIcon=\"list\"\n ></i>\n <div class=\"d-col text-left fit-w min-width-0\">\n <span class=\"text-muted fit-w text-10 l-h-1\">\n {{ 'Configuration' | translate }}\n </span>\n <span class=\"text-bold text-12 fit-w l-h-1 text-truncate\">\n {{ currentConfiguration?.label }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4 flex-no-shrink\"></span>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-wide dropdown-menu-action-bar\"\n *dropdownMenu\n >\n <div class=\"sticky-top separator-bottom p-t-8 p-b-8 p-l-16 p-r-16\">\n <p>\n <strong>{{ 'Data explorer configurations' | translate }}</strong>\n </p>\n <p>\n <small>{{ 'Easily switch and manage configurations.' | translate }}</small>\n </p>\n </div>\n <c8y-list-group class=\"no-border-last\">\n <form [formGroup]=\"configurationsFormGroup\">\n <div formArrayName=\"configurations\">\n @for (\n configuration of configurationsFormGroup.controls.configurations['controls'];\n track $index\n ) {\n <c8y-li\n class=\"p-0\"\n [dense]=\"true\"\n >\n <c8y-li-radio\n style=\"min-height: 48px\"\n [selected]=\"configuration.value.id === currentConfiguration.id\"\n (onSelect)=\"changeConfiguration($event, configuration.value)\"\n ></c8y-li-radio>\n\n <div class=\"d-flex a-i-center gap-8\">\n <div\n class=\"min-width-0 flex-grow\"\n [formGroupName]=\"$index\"\n >\n <c8y-input-group-editable\n formGroupClass=\"m-b-0\"\n size=\"sm\"\n [ariaLabel]=\"'Configuration label' | translate\"\n [placeholder]=\"'Configuration 1' | translate\"\n formControlName=\"label\"\n [validators]=\"labelValidators\"\n (save)=\"updateConfigurationLabel({ ...configuration.value, label: $event })\"\n ></c8y-input-group-editable>\n </div>\n\n <div class=\"m-l-auto flex-nogrow d-flex gap-8\">\n <button\n class=\"btn-dot btn m-0\"\n [attr.aria-label]=\"'Duplicate configuration' | translate\"\n tooltip=\"{{ 'Duplicate configuration' | translate }}\"\n placement=\"left\"\n (click)=\"addConfig(configuration.value.config)\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"copy\"></i>\n </button>\n\n <button\n class=\"btn-dot btn btn-dot--danger\"\n [attr.aria-label]=\"'Remove configurations' | translate\"\n tooltip=\"{{\n (configuration.value.id === currentConfiguration.id\n ? activeConfigTooltip\n : removeConfigTooltip\n ) | translate\n }}\"\n placement=\"left\"\n [delay]=\"500\"\n (click)=\"$event.stopPropagation(); deleteConfiguration(configuration.value)\"\n [disabled]=\"configuration.value.id === currentConfiguration.id\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </div>\n </c8y-li>\n }\n </div>\n </form>\n </c8y-list-group>\n <div class=\"sticky-bottom separator-top\">\n <div class=\"d-flex p-l-16 p-r-16 p-t-8 p-b-8\">\n <button\n class=\"btn btn-danger btn-sm flex-grow m-r-4\"\n (click)=\"clearAll()\"\n [disabled]=\"configurations.length < 2\"\n >\n <i [c8yIcon]=\"'delete'\"></i>\n {{ 'Delete all configurations' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n type=\"button\"\n (click)=\"addConfig()\"\n >\n <i [c8yIcon]=\"'add-circle-outline'\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.InputGroupEditableComponent, selector: "c8y-input-group-editable", inputs: ["ariaLabel", "name", "size", "placeholder", "title", "multiline", "maxHeight", "maxLength", "noSaveButton", "formGroupClass", "validators", "asyncValidators", "autocomplete", "required"], outputs: ["save", "cancel"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemRadioComponent, selector: "c8y-list-item-radio, c8y-li-radio", inputs: ["selected", "name", "disabled", "value"], outputs: ["onSelect"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i3.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i3.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i4.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
659
661
|
}
|
|
660
662
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WorkspaceConfigComponent, decorators: [{
|
|
661
663
|
type: Component,
|
|
@@ -821,7 +823,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
821
823
|
class DatapointExplorerComponent {
|
|
822
824
|
#destroyRef;
|
|
823
825
|
constructor() {
|
|
824
|
-
this.config = {
|
|
826
|
+
this.config = signal({
|
|
827
|
+
datapoints: [],
|
|
828
|
+
alarmsEventsConfigs: []
|
|
829
|
+
}, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
825
830
|
this.alerts = new DynamicComponentAlertAggregator();
|
|
826
831
|
this.alarms = [];
|
|
827
832
|
this.events = [];
|
|
@@ -831,11 +836,11 @@ class DatapointExplorerComponent {
|
|
|
831
836
|
this.isMarkedAreaEnabled = false;
|
|
832
837
|
this.alarmsOrEventsHaveNoMatchingDps = false;
|
|
833
838
|
this.canAddReport = false;
|
|
834
|
-
this.datapointSelectDefaultFormOptions = {
|
|
839
|
+
this.datapointSelectDefaultFormOptions = signal({
|
|
835
840
|
showRange: true,
|
|
836
841
|
showChart: true,
|
|
837
842
|
showAdvancedChartOptions: false
|
|
838
|
-
};
|
|
843
|
+
}, ...(ngDevMode ? [{ debugName: "datapointSelectDefaultFormOptions" }] : /* istanbul ignore next */ []));
|
|
839
844
|
this.inFullScreen$ = fromEvent(document, 'fullscreenchange').pipe(takeUntilDestroyed(), map$1(() => this.fullScreen()), startWith(this.fullScreen()));
|
|
840
845
|
this.fullScreenToggleTooltipText = {
|
|
841
846
|
enter: gettext('Full screen'),
|
|
@@ -843,7 +848,6 @@ class DatapointExplorerComponent {
|
|
|
843
848
|
};
|
|
844
849
|
/** Flag to skip onTimeContextChange during zoom handling */
|
|
845
850
|
this.isHandlingZoom = false;
|
|
846
|
-
this.isMigrated = false;
|
|
847
851
|
this.chartViewContext = CHART_VIEW_CONTEXT.DATAPOINT_EXPLORER;
|
|
848
852
|
this.TIME_PICKER_CONFIG = {
|
|
849
853
|
showMinutes: true,
|
|
@@ -865,6 +869,7 @@ class DatapointExplorerComponent {
|
|
|
865
869
|
this.measurementService = inject(MeasurementService);
|
|
866
870
|
this.showSettings = false;
|
|
867
871
|
this.formGroup = this.initForm();
|
|
872
|
+
this.formDefaults = this.formGroup.value;
|
|
868
873
|
this.settings$ = this.activatedRoute.data.pipe(map$1(data => data.settings));
|
|
869
874
|
}
|
|
870
875
|
ngOnInit() {
|
|
@@ -877,43 +882,37 @@ class DatapointExplorerComponent {
|
|
|
877
882
|
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
878
883
|
]);
|
|
879
884
|
// Initialize timeProps from config if available
|
|
880
|
-
|
|
885
|
+
const config = this.config();
|
|
886
|
+
if (config.dateFrom && config.dateTo) {
|
|
881
887
|
this.timeProps = {
|
|
882
|
-
dateFrom: new Date(
|
|
883
|
-
dateTo: new Date(
|
|
884
|
-
interval: (
|
|
885
|
-
realtime:
|
|
886
|
-
aggregation:
|
|
887
|
-
autoAggregation:
|
|
888
|
+
dateFrom: new Date(config.dateFrom),
|
|
889
|
+
dateTo: new Date(config.dateTo),
|
|
890
|
+
interval: (config.interval === 'none' ? null : config.interval),
|
|
891
|
+
realtime: config.realtime,
|
|
892
|
+
aggregation: config.aggregation,
|
|
893
|
+
autoAggregation: config.autoAggregation ?? null
|
|
888
894
|
};
|
|
889
895
|
}
|
|
890
|
-
//
|
|
891
|
-
//
|
|
892
|
-
const existingDatapoints = this.config.datapoints || [];
|
|
893
|
-
if (existingDatapoints.length > 0) {
|
|
894
|
-
this.detectTimeSeriesMigration(existingDatapoints[0]).then(isMigrated => {
|
|
895
|
-
this.isMigrated = isMigrated;
|
|
896
|
-
this.updateAdvancedChartOptions();
|
|
897
|
-
});
|
|
898
|
-
}
|
|
896
|
+
// Datapoints added to an empty workspace never pass through onConfigurationChange,
|
|
897
|
+
// so resolve migration here too (cached) to keep showAdvancedChartOptions correct.
|
|
899
898
|
this.formGroup.controls.datapoints.valueChanges
|
|
900
899
|
.pipe(takeUntilDestroyed(this.#destroyRef), filter(value => value.length > 0), take(1))
|
|
901
900
|
.subscribe(async (value) => {
|
|
902
|
-
|
|
901
|
+
await this.resolveMigrationStatus(value[0]);
|
|
903
902
|
this.updateAdvancedChartOptions();
|
|
904
903
|
});
|
|
905
904
|
this.formGroup.valueChanges
|
|
906
905
|
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
907
906
|
.subscribe(configChange => {
|
|
908
907
|
const { alarms, events, ...configValues } = configChange;
|
|
909
|
-
this.config
|
|
908
|
+
this.config.set({
|
|
910
909
|
...configValues,
|
|
911
910
|
alarmsEventsConfigs: [...(alarms || []), ...(events || [])]
|
|
912
|
-
};
|
|
911
|
+
});
|
|
913
912
|
this.updateExportConfig();
|
|
914
913
|
this.checkForMatchingDatapoints();
|
|
915
914
|
});
|
|
916
|
-
const configSummaryGS = this.chartHelpersService.getConfigSummaryForGainsight(this.config);
|
|
915
|
+
const configSummaryGS = this.chartHelpersService.getConfigSummaryForGainsight(this.config());
|
|
917
916
|
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_DATA_EXPLORER_AND_GRAPH.EVENTS.DATA_EXPLORER_AND_GRAPH, {
|
|
918
917
|
component: PRODUCT_EXPERIENCE_DATA_EXPLORER_AND_GRAPH.COMPONENTS.DATA_EXPLORER_DETAILS,
|
|
919
918
|
action: PRODUCT_EXPERIENCE_DATA_EXPLORER_AND_GRAPH.ACTIONS.DATA_EXPLORER_CONFIG_INIT,
|
|
@@ -979,6 +978,9 @@ class DatapointExplorerComponent {
|
|
|
979
978
|
const errors = managedObjectsResult.errors;
|
|
980
979
|
config.datapoints = this.datapointSyncService.assignUpdatedValues(config.datapoints, managedObjects, errors);
|
|
981
980
|
}
|
|
981
|
+
// Resolve migration before patching so the chart's first fetch already uses the correct
|
|
982
|
+
// aggregation shape, instead of fetching once and refetching when the async probe resolves.
|
|
983
|
+
await this.resolveMigrationStatus(config.datapoints?.[0]);
|
|
982
984
|
// Calculate date range based on interval if not provided
|
|
983
985
|
const hasExplicitDates = this.isActualDate(config.dateFrom) && this.isActualDate(config.dateTo);
|
|
984
986
|
let dateFrom, dateTo;
|
|
@@ -1007,9 +1009,10 @@ class DatapointExplorerComponent {
|
|
|
1007
1009
|
action: PRODUCT_EXPERIENCE_DATA_EXPLORER_AND_GRAPH.ACTIONS.DATA_EXPLORER_CONFIG_CHANGE,
|
|
1008
1010
|
...configSummaryGS
|
|
1009
1011
|
});
|
|
1010
|
-
//
|
|
1011
|
-
//
|
|
1012
|
+
// formDefaults first so any control the incoming config omits resets to its default, instead of
|
|
1013
|
+
// keeping the previously shown workspace's value. The valueChanges subscription updates config.
|
|
1012
1014
|
this.formGroup.patchValue({
|
|
1015
|
+
...this.formDefaults,
|
|
1013
1016
|
alarms: this.alarms,
|
|
1014
1017
|
events: this.events,
|
|
1015
1018
|
...config,
|
|
@@ -1018,6 +1021,7 @@ class DatapointExplorerComponent {
|
|
|
1018
1021
|
isAutoRefreshEnabled: config.realtime ? true : config.isAutoRefreshEnabled || false,
|
|
1019
1022
|
refreshInterval: config.realtime ? 5000 : config.refreshInterval || 0
|
|
1020
1023
|
});
|
|
1024
|
+
this.updateAdvancedChartOptions();
|
|
1021
1025
|
}
|
|
1022
1026
|
onSliderZoom(timeProps) {
|
|
1023
1027
|
this.isHandlingZoom = true;
|
|
@@ -1064,7 +1068,7 @@ class DatapointExplorerComponent {
|
|
|
1064
1068
|
}
|
|
1065
1069
|
handleDatapointOutOfSync(dpOutOfSync) {
|
|
1066
1070
|
const key = (dp) => dp.__target?.id + dp.fragment + dp.series;
|
|
1067
|
-
const dpMatch = this.config.datapoints?.find(dp => key(dp) === key(dpOutOfSync));
|
|
1071
|
+
const dpMatch = this.config().datapoints?.find(dp => key(dp) === key(dpOutOfSync));
|
|
1068
1072
|
if (!dpMatch) {
|
|
1069
1073
|
return;
|
|
1070
1074
|
}
|
|
@@ -1072,7 +1076,7 @@ class DatapointExplorerComponent {
|
|
|
1072
1076
|
}
|
|
1073
1077
|
handleDatapointBackInSync(dpBackInSync) {
|
|
1074
1078
|
const key = (dp) => dp.__target?.id + dp.fragment + dp.series;
|
|
1075
|
-
const dpMatch = this.config.datapoints?.find(dp => key(dp) === key(dpBackInSync));
|
|
1079
|
+
const dpMatch = this.config().datapoints?.find(dp => key(dp) === key(dpBackInSync));
|
|
1076
1080
|
if (!dpMatch) {
|
|
1077
1081
|
return;
|
|
1078
1082
|
}
|
|
@@ -1209,12 +1213,19 @@ class DatapointExplorerComponent {
|
|
|
1209
1213
|
}
|
|
1210
1214
|
updateAdvancedChartOptions() {
|
|
1211
1215
|
const hasAggregation = !!(this.timeProps?.aggregation || this.timeProps?.autoAggregation);
|
|
1212
|
-
const showAdvancedChartOptions = this.isMigrated && hasAggregation;
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1216
|
+
const showAdvancedChartOptions = !!this.isMigrated && hasAggregation;
|
|
1217
|
+
// Guard the signal and the form control independently: a saved config can set the form control
|
|
1218
|
+
// before this runs while the signal still holds its initial value, so they may differ.
|
|
1219
|
+
if (this.datapointSelectDefaultFormOptions().showAdvancedChartOptions !== showAdvancedChartOptions) {
|
|
1220
|
+
this.datapointSelectDefaultFormOptions.update(options => ({
|
|
1221
|
+
...options,
|
|
1222
|
+
showAdvancedChartOptions
|
|
1223
|
+
}));
|
|
1224
|
+
}
|
|
1225
|
+
// patchValue emits valueChanges even for an unchanged value, which would trigger a redundant reload.
|
|
1226
|
+
if (this.formGroup.value.showAdvancedChartOptions !== showAdvancedChartOptions) {
|
|
1227
|
+
this.formGroup.patchValue({ showAdvancedChartOptions });
|
|
1228
|
+
}
|
|
1218
1229
|
}
|
|
1219
1230
|
/**
|
|
1220
1231
|
* DEPRECATED: to be removed when there is another way to identify time series migration.
|
|
@@ -1235,6 +1246,12 @@ class DatapointExplorerComponent {
|
|
|
1235
1246
|
return err?.res?.status === 405;
|
|
1236
1247
|
}
|
|
1237
1248
|
}
|
|
1249
|
+
/** Probe the tenant migration state at most once; migration is tenant-wide and stable. */
|
|
1250
|
+
async resolveMigrationStatus(firstDp) {
|
|
1251
|
+
if (this.isMigrated === undefined && firstDp) {
|
|
1252
|
+
this.isMigrated = await this.detectTimeSeriesMigration(firstDp);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1238
1255
|
isActualDate(val) {
|
|
1239
1256
|
if (!val)
|
|
1240
1257
|
return false;
|
|
@@ -1251,13 +1268,14 @@ class DatapointExplorerComponent {
|
|
|
1251
1268
|
return alarms.length > 0 && alarms.some(alarm => alarm.__active);
|
|
1252
1269
|
}
|
|
1253
1270
|
checkForMatchingDatapoints() {
|
|
1254
|
-
const allMatch = this.config
|
|
1271
|
+
const allMatch = this.config().alarmsEventsConfigs?.every(ae => this.formGroup.value.datapoints?.some(dp => dp.__target?.id === ae.__target?.id));
|
|
1255
1272
|
queueMicrotask(() => {
|
|
1256
1273
|
this.alarmsOrEventsHaveNoMatchingDps = !allMatch;
|
|
1257
1274
|
});
|
|
1258
1275
|
}
|
|
1259
1276
|
updateExportConfig() {
|
|
1260
|
-
const
|
|
1277
|
+
const config = this.config();
|
|
1278
|
+
const datapointDetails = config.datapoints
|
|
1261
1279
|
.filter(({ __active }) => __active)
|
|
1262
1280
|
.map(({ __target, fragment, series }) => ({
|
|
1263
1281
|
deviceName: __target.name,
|
|
@@ -1270,9 +1288,9 @@ class DatapointExplorerComponent {
|
|
|
1270
1288
|
}
|
|
1271
1289
|
else {
|
|
1272
1290
|
this.exportConfig = {
|
|
1273
|
-
aggregation:
|
|
1274
|
-
dateFrom: new Date(
|
|
1275
|
-
dateTo: new Date(
|
|
1291
|
+
aggregation: config.aggregation,
|
|
1292
|
+
dateFrom: new Date(config.dateFrom).toISOString(),
|
|
1293
|
+
dateTo: new Date(config.dateTo).toISOString(),
|
|
1276
1294
|
datapointDetails: datapointDetails
|
|
1277
1295
|
};
|
|
1278
1296
|
}
|
|
@@ -1294,23 +1312,24 @@ class DatapointExplorerComponent {
|
|
|
1294
1312
|
title: gettext('Data points'),
|
|
1295
1313
|
_width: 24,
|
|
1296
1314
|
_height: 12,
|
|
1297
|
-
config: this.config
|
|
1315
|
+
config: this.config()
|
|
1298
1316
|
};
|
|
1299
1317
|
}
|
|
1300
1318
|
initForm() {
|
|
1319
|
+
const config = this.config();
|
|
1301
1320
|
return this.formBuilder.group({
|
|
1302
|
-
datapoints: [
|
|
1303
|
-
aggregatedDatapoint: [
|
|
1321
|
+
datapoints: [config.datapoints || []],
|
|
1322
|
+
aggregatedDatapoint: [config.aggregatedDatapoint || null],
|
|
1304
1323
|
alarms: [this.alarms || []],
|
|
1305
1324
|
events: [this.events || []],
|
|
1306
|
-
dateFrom: [
|
|
1307
|
-
dateTo: [
|
|
1308
|
-
interval: [
|
|
1309
|
-
aggregation: [
|
|
1310
|
-
autoAggregation: [
|
|
1311
|
-
realtime: [
|
|
1312
|
-
isAutoRefreshEnabled: [
|
|
1313
|
-
refreshInterval: [
|
|
1325
|
+
dateFrom: [config.dateFrom || null],
|
|
1326
|
+
dateTo: [config.dateTo || null],
|
|
1327
|
+
interval: [config.interval || 'hours'],
|
|
1328
|
+
aggregation: [config.aggregation || null],
|
|
1329
|
+
autoAggregation: [config.autoAggregation || null],
|
|
1330
|
+
realtime: [config.realtime || false],
|
|
1331
|
+
isAutoRefreshEnabled: [config.isAutoRefreshEnabled || false],
|
|
1332
|
+
refreshInterval: [config.refreshInterval || 5000],
|
|
1314
1333
|
displayMarkedLine: [true, []],
|
|
1315
1334
|
displayMarkedPoint: [true, []],
|
|
1316
1335
|
mergeMatchingDatapoints: [true, []],
|
|
@@ -1332,7 +1351,7 @@ class DatapointExplorerComponent {
|
|
|
1332
1351
|
ChartAlarmsService,
|
|
1333
1352
|
ChartHelpersService,
|
|
1334
1353
|
WidgetTimeContextDateRangeService
|
|
1335
|
-
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }, { propertyName: "timeContext", first: true, predicate: ["timeContext"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n #timeContext\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n [timeContext]=\"(settings$ | async)?.timeContext\"\n [enableAutoAggregation]=\"true\"\n [timePickerConfig]=\"TIME_PICKER_CONFIG\"\n></c8y-time-context>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n [silent]=\"(settings$ | async)?.hideWorkspaceConfig\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"datapoint-explorer--full-screen\"\n >\n <i\n [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n@if (!(settings$ | async)?.hideExportSelector) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n </c8y-action-bar-item>\n}\n\n@if (!(settings$ | async)?.hideWidgetActions) {\n @if (contextAsset) {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"th\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n } @else {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n }\n}\n\n<c8y-resizable-grid\n class=\"content-fullpage\"\n [leftColumnWidth]=\"'calc(100% - 360px)'\"\n [collapseThreshold]=\"360\"\n [trackId]=\"'datapoint-explorer'\"\n>\n <div\n class=\"d-col gap-16 inner-scroll\"\n left-pane\n >\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n style=\"min-height: 340px\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n [chartViewContext]=\"chartViewContext\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (datapointBackInSync)=\"handleDatapointBackInSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n (updateActiveDatapoints)=\"updateActiveDatapoints($event)\"\n (updateAggregatedSliderDatapoint)=\"updateAggregatedSliderDatapoint($event)\"\n ></c8y-charts>\n <form\n class=\"flex-shrink p-16 p-r-16 p-relative\"\n [class.bg-level-1]=\"showSettings\"\n [class.p-b-0]=\"!showSettings\"\n style=\"z-index: 1\"\n [formGroup]=\"formGroup\"\n >\n <button\n class=\"legend form-block center btn-clean m-b-0 m-t-0\"\n aria-controls=\"chart-settings-panel\"\n [attr.aria-expanded]=\"showSettings\"\n (click)=\"showSettings = !showSettings; triggerResize()\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'combo-chart'\"\n aria-hidden=\"true\"\n ></i>\n <span>\n {{ 'Display settings' | translate }}\n </span>\n <i\n class=\"m-l-4\"\n [c8yIcon]=\"showSettings ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"collapse bg-level-1\"\n id=\"chart-settings-panel\"\n [collapse]=\"!showSettings\"\n [isAnimated]=\"true\"\n >\n <div class=\"bg-level-1 responsive-grid-table-wrapper--600\">\n <div\n class=\"responsive-grid-table responsive-grid-table--padded responsive-grid-table__body\"\n >\n <div class=\"col-5 d-col a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n @if (alarmsOrEventsHaveNoMatchingDps) {\n <button\n class=\"btn-dot m-l-4\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [popover]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n </button>\n }\n </label>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show smooth lines' | translate\"\n >\n <input\n name=\"smoothLines\"\n type=\"checkbox\"\n formControlName=\"smoothLines\"\n />\n <span></span>\n <span translate>Show smooth lines</span>\n </label>\n </fieldset>\n </div>\n <div class=\"col-7 a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into a single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [popover]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into a single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [popover]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Set Y-axis start to 0' | translate\"\n >\n <input\n name=\"setYaxisStartToZero\"\n type=\"checkbox\"\n formControlName=\"setYaxisStartToZero\"\n />\n <span></span>\n <span translate>Set Y-axis start to 0</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n [popover]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n class=\"inner-scroll bg-level-1\"\n right-pane\n >\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</c8y-resizable-grid>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i3$2.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle", "removeTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: AlarmEventSelectorModule }, { kind: "component", type: i4$1.AlarmEventSelectionListComponent, selector: "c8y-alarm-event-selection-list", inputs: ["timelineType", "canRemove", "canEdit", "canDragAndDrop", "title", "addButtonLabel", "hideSource", "inline", "activeToggleAsSwitch", "omitProperties", "datapoints", "config"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i6.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i7.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "component", type: TimeContextComponent, selector: "c8y-time-context", inputs: ["changedDateContext", "controlsAvailable", "timeContext", "timePickerConfig", "enableAutoAggregation", "context"], outputs: ["contextChange"] }, { kind: "component", type: ChartsComponent, selector: "c8y-charts", inputs: ["config", "alerts", "chartViewContext"], outputs: ["configChangeOnZoomOut", "timeRangeChangeOnRealtime", "datapointOutOfSync", "datapointBackInSync", "updateAlarmsAndEvents", "isMarkedAreaEnabled", "finishLoading", "updateActiveDatapoints", "updateAggregatedSliderDatapoint", "duplicateAggregationsDetected"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["displayMode", "containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: WorkspaceConfigComponent, selector: "c8y-workspace-config", inputs: ["updatedConfig", "silent", "defaultConfigurationId"], outputs: ["onConfigurationChange"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold", "collapsible"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1354
|
+
], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }, { propertyName: "timeContext", first: true, predicate: ["timeContext"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n #timeContext\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n [timeContext]=\"(settings$ | async)?.timeContext\"\n [enableAutoAggregation]=\"true\"\n [timePickerConfig]=\"TIME_PICKER_CONFIG\"\n></c8y-time-context>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-workspace-config\n [updatedConfig]=\"config()\"\n [silent]=\"(settings$ | async)?.hideWorkspaceConfig\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"datapoint-explorer--full-screen\"\n >\n <i\n [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n@if (!(settings$ | async)?.hideExportSelector) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n </c8y-action-bar-item>\n}\n\n@if (!(settings$ | async)?.hideWidgetActions) {\n @if (contextAsset) {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"th\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n } @else {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n }\n}\n\n<c8y-resizable-grid\n class=\"content-fullpage\"\n [leftColumnWidth]=\"'calc(100% - 360px)'\"\n [collapseThreshold]=\"360\"\n [trackId]=\"'datapoint-explorer'\"\n>\n <div\n class=\"d-col gap-16 inner-scroll\"\n left-pane\n >\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n style=\"min-height: 340px\"\n #chart\n [config]=\"config()\"\n [alerts]=\"alerts\"\n [chartViewContext]=\"chartViewContext\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (datapointBackInSync)=\"handleDatapointBackInSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n (updateActiveDatapoints)=\"updateActiveDatapoints($event)\"\n (updateAggregatedSliderDatapoint)=\"updateAggregatedSliderDatapoint($event)\"\n ></c8y-charts>\n <form\n class=\"flex-shrink p-16 p-r-16 p-relative\"\n [class.bg-level-1]=\"showSettings\"\n [class.p-b-0]=\"!showSettings\"\n style=\"z-index: 1\"\n [formGroup]=\"formGroup\"\n >\n <button\n class=\"legend form-block center btn-clean m-b-0 m-t-0\"\n aria-controls=\"chart-settings-panel\"\n [attr.aria-expanded]=\"showSettings\"\n (click)=\"showSettings = !showSettings; triggerResize()\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'combo-chart'\"\n aria-hidden=\"true\"\n ></i>\n <span>\n {{ 'Display settings' | translate }}\n </span>\n <i\n class=\"m-l-4\"\n [c8yIcon]=\"showSettings ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"collapse bg-level-1\"\n id=\"chart-settings-panel\"\n [collapse]=\"!showSettings\"\n [isAnimated]=\"true\"\n >\n <div class=\"bg-level-1 responsive-grid-table-wrapper--600\">\n <div\n class=\"responsive-grid-table responsive-grid-table--padded responsive-grid-table__body\"\n >\n <div class=\"col-5 d-col a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n @if (alarmsOrEventsHaveNoMatchingDps) {\n <button\n class=\"btn-dot m-l-4\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [popover]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n </button>\n }\n </label>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show smooth lines' | translate\"\n >\n <input\n name=\"smoothLines\"\n type=\"checkbox\"\n formControlName=\"smoothLines\"\n />\n <span></span>\n <span translate>Show smooth lines</span>\n </label>\n </fieldset>\n </div>\n <div class=\"col-7 a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into a single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [popover]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into a single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [popover]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Set Y-axis start to 0' | translate\"\n >\n <input\n name=\"setYaxisStartToZero\"\n type=\"checkbox\"\n formControlName=\"setYaxisStartToZero\"\n />\n <span></span>\n <span translate>Set Y-axis start to 0</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n [popover]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n class=\"inner-scroll bg-level-1\"\n right-pane\n >\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions()\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config().datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config().datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</c8y-resizable-grid>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i3$2.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle", "removeTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: AlarmEventSelectorModule }, { kind: "component", type: i4$1.AlarmEventSelectionListComponent, selector: "c8y-alarm-event-selection-list", inputs: ["timelineType", "canRemove", "canEdit", "canDragAndDrop", "title", "addButtonLabel", "hideSource", "inline", "activeToggleAsSwitch", "omitProperties", "datapoints", "config"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i6.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i7.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "component", type: TimeContextComponent, selector: "c8y-time-context", inputs: ["changedDateContext", "controlsAvailable", "timeContext", "timePickerConfig", "enableAutoAggregation", "context"], outputs: ["contextChange"] }, { kind: "component", type: ChartsComponent, selector: "c8y-charts", inputs: ["config", "alerts", "chartViewContext"], outputs: ["configChangeOnZoomOut", "timeRangeChangeOnRealtime", "datapointOutOfSync", "datapointBackInSync", "updateAlarmsAndEvents", "isMarkedAreaEnabled", "finishLoading", "updateActiveDatapoints", "updateAggregatedSliderDatapoint", "duplicateAggregationsDetected"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["displayMode", "containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: WorkspaceConfigComponent, selector: "c8y-workspace-config", inputs: ["updatedConfig", "silent", "defaultConfigurationId"], outputs: ["onConfigurationChange"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold", "collapsible"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1336
1355
|
}
|
|
1337
1356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DatapointExplorerComponent, decorators: [{
|
|
1338
1357
|
type: Component,
|
|
@@ -1358,7 +1377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
1358
1377
|
ChartAlarmsService,
|
|
1359
1378
|
ChartHelpersService,
|
|
1360
1379
|
WidgetTimeContextDateRangeService
|
|
1361
|
-
], template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n #timeContext\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n [timeContext]=\"(settings$ | async)?.timeContext\"\n [enableAutoAggregation]=\"true\"\n [timePickerConfig]=\"TIME_PICKER_CONFIG\"\n></c8y-time-context>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n [silent]=\"(settings$ | async)?.hideWorkspaceConfig\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"datapoint-explorer--full-screen\"\n >\n <i\n [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n@if (!(settings$ | async)?.hideExportSelector) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n </c8y-action-bar-item>\n}\n\n@if (!(settings$ | async)?.hideWidgetActions) {\n @if (contextAsset) {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"th\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n } @else {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n }\n}\n\n<c8y-resizable-grid\n class=\"content-fullpage\"\n [leftColumnWidth]=\"'calc(100% - 360px)'\"\n [collapseThreshold]=\"360\"\n [trackId]=\"'datapoint-explorer'\"\n>\n <div\n class=\"d-col gap-16 inner-scroll\"\n left-pane\n >\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n style=\"min-height: 340px\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n [chartViewContext]=\"chartViewContext\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (datapointBackInSync)=\"handleDatapointBackInSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n (updateActiveDatapoints)=\"updateActiveDatapoints($event)\"\n (updateAggregatedSliderDatapoint)=\"updateAggregatedSliderDatapoint($event)\"\n ></c8y-charts>\n <form\n class=\"flex-shrink p-16 p-r-16 p-relative\"\n [class.bg-level-1]=\"showSettings\"\n [class.p-b-0]=\"!showSettings\"\n style=\"z-index: 1\"\n [formGroup]=\"formGroup\"\n >\n <button\n class=\"legend form-block center btn-clean m-b-0 m-t-0\"\n aria-controls=\"chart-settings-panel\"\n [attr.aria-expanded]=\"showSettings\"\n (click)=\"showSettings = !showSettings; triggerResize()\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'combo-chart'\"\n aria-hidden=\"true\"\n ></i>\n <span>\n {{ 'Display settings' | translate }}\n </span>\n <i\n class=\"m-l-4\"\n [c8yIcon]=\"showSettings ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"collapse bg-level-1\"\n id=\"chart-settings-panel\"\n [collapse]=\"!showSettings\"\n [isAnimated]=\"true\"\n >\n <div class=\"bg-level-1 responsive-grid-table-wrapper--600\">\n <div\n class=\"responsive-grid-table responsive-grid-table--padded responsive-grid-table__body\"\n >\n <div class=\"col-5 d-col a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n @if (alarmsOrEventsHaveNoMatchingDps) {\n <button\n class=\"btn-dot m-l-4\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [popover]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n </button>\n }\n </label>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show smooth lines' | translate\"\n >\n <input\n name=\"smoothLines\"\n type=\"checkbox\"\n formControlName=\"smoothLines\"\n />\n <span></span>\n <span translate>Show smooth lines</span>\n </label>\n </fieldset>\n </div>\n <div class=\"col-7 a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into a single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [popover]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into a single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [popover]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Set Y-axis start to 0' | translate\"\n >\n <input\n name=\"setYaxisStartToZero\"\n type=\"checkbox\"\n formControlName=\"setYaxisStartToZero\"\n />\n <span></span>\n <span translate>Set Y-axis start to 0</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n [popover]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n class=\"inner-scroll bg-level-1\"\n right-pane\n >\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</c8y-resizable-grid>\n" }]
|
|
1380
|
+
], template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n #timeContext\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n [timeContext]=\"(settings$ | async)?.timeContext\"\n [enableAutoAggregation]=\"true\"\n [timePickerConfig]=\"TIME_PICKER_CONFIG\"\n></c8y-time-context>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <c8y-workspace-config\n [updatedConfig]=\"config()\"\n [silent]=\"(settings$ | async)?.hideWorkspaceConfig\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n [priority]=\"-5000\"\n itemClass=\"pull-right\"\n>\n <button\n class=\"btn btn-link\"\n [attr.aria-label]=\"'Full screen' | translate\"\n [tooltip]=\"\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n \"\n placement=\"left\"\n container=\"body\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleFullscreen()\"\n data-cy=\"datapoint-explorer--full-screen\"\n >\n <i\n [c8yIcon]=\"(inFullScreen$ | async) ? 'compress' : 'expand'\"\n aria-hidden=\"true\"\n ></i>\n <span class=\"visible-xs-inline hidden-sm visible-md-inline visibile-lg-inline\">\n {{\n ((inFullScreen$ | async)\n ? fullScreenToggleTooltipText.exit\n : fullScreenToggleTooltipText.enter\n ) | translate\n }}\n </span>\n </button>\n</c8y-action-bar-item>\n\n@if (!(settings$ | async)?.hideExportSelector) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n </c8y-action-bar-item>\n}\n\n@if (!(settings$ | async)?.hideWidgetActions) {\n @if (contextAsset) {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"th\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n } @else {\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config().datapoints?.length === 0 || !canAddReport\"\n >\n <i\n c8yIcon=\"c8y-reports\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n }\n}\n\n<c8y-resizable-grid\n class=\"content-fullpage\"\n [leftColumnWidth]=\"'calc(100% - 360px)'\"\n [collapseThreshold]=\"360\"\n [trackId]=\"'datapoint-explorer'\"\n>\n <div\n class=\"d-col gap-16 inner-scroll\"\n left-pane\n >\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n style=\"min-height: 340px\"\n #chart\n [config]=\"config()\"\n [alerts]=\"alerts\"\n [chartViewContext]=\"chartViewContext\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (datapointBackInSync)=\"handleDatapointBackInSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n (updateActiveDatapoints)=\"updateActiveDatapoints($event)\"\n (updateAggregatedSliderDatapoint)=\"updateAggregatedSliderDatapoint($event)\"\n ></c8y-charts>\n <form\n class=\"flex-shrink p-16 p-r-16 p-relative\"\n [class.bg-level-1]=\"showSettings\"\n [class.p-b-0]=\"!showSettings\"\n style=\"z-index: 1\"\n [formGroup]=\"formGroup\"\n >\n <button\n class=\"legend form-block center btn-clean m-b-0 m-t-0\"\n aria-controls=\"chart-settings-panel\"\n [attr.aria-expanded]=\"showSettings\"\n (click)=\"showSettings = !showSettings; triggerResize()\"\n >\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'combo-chart'\"\n aria-hidden=\"true\"\n ></i>\n <span>\n {{ 'Display settings' | translate }}\n </span>\n <i\n class=\"m-l-4\"\n [c8yIcon]=\"showSettings ? 'chevron-up' : 'chevron-down'\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <div\n class=\"collapse bg-level-1\"\n id=\"chart-settings-panel\"\n [collapse]=\"!showSettings\"\n [isAnimated]=\"true\"\n >\n <div class=\"bg-level-1 responsive-grid-table-wrapper--600\">\n <div\n class=\"responsive-grid-table responsive-grid-table--padded responsive-grid-table__body\"\n >\n <div class=\"col-5 d-col a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n @if (alarmsOrEventsHaveNoMatchingDps) {\n <button\n class=\"btn-dot m-l-4\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [popover]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n </button>\n }\n </label>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show smooth lines' | translate\"\n >\n <input\n name=\"smoothLines\"\n type=\"checkbox\"\n formControlName=\"smoothLines\"\n />\n <span></span>\n <span translate>Show smooth lines</span>\n </label>\n </fieldset>\n </div>\n <div class=\"col-7 a-s-start p-b-0\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into a single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [popover]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into a single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into a single axis</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [popover]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Set Y-axis start to 0' | translate\"\n >\n <input\n name=\"setYaxisStartToZero\"\n type=\"checkbox\"\n formControlName=\"setYaxisStartToZero\"\n />\n <span></span>\n <span translate>Set Y-axis start to 0</span>\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n [popover]=\"\n 'Sets the Y-axis minimum to 0 for all data points with positive values. If any data point includes negative values, the axis may still extend below 0. Explicitly configured minimum and maximum values take precedence over this option.'\n | translate\n \"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n </label>\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n class=\"inner-scroll bg-level-1\"\n right-pane\n >\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions()\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config().datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config().datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</c8y-resizable-grid>\n" }]
|
|
1362
1381
|
}], ctorParameters: () => [], propDecorators: { chart: [{
|
|
1363
1382
|
type: ViewChild,
|
|
1364
1383
|
args: ['chart']
|