@c8y/ngx-components 1024.20.1 → 1024.21.3
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 +527 -12
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +31 -9
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +503 -62
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +3 -3
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-application-select.mjs +1 -1
- package/fesm2022/c8y-ngx-components-application-select.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +3 -2
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.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-branding-shared-lazy.mjs +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +5 -5
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +81 -20
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +146 -126
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +2 -2
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +4 -4
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +2 -2
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +4 -4
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +5 -5
- package/fesm2022/c8y-ngx-components-protocol-lpwan.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 +3 -3
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +3 -3
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +1 -1
- package/fesm2022/c8y-ngx-components-tracking.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.mjs +17 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs +21 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +60 -31
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +500 -38
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +72 -0
- package/locales/es.po +72 -0
- package/locales/fr.po +72 -0
- package/locales/ja_JP.po +72 -0
- package/locales/ko.po +72 -0
- package/locales/locales.pot +72 -3
- package/locales/nl.po +72 -0
- package/locales/pl.po +73 -1
- package/locales/pt_BR.po +74 -2
- package/locales/zh_CN.po +72 -0
- package/locales/zh_TW.po +72 -0
- package/package.json +1 -1
- package/types/c8y-ngx-components-ai-agent-chat.d.ts +201 -3
- package/types/c8y-ngx-components-ai-agent-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-ai-chat.d.ts +14 -4
- package/types/c8y-ngx-components-ai-ai-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai.d.ts +157 -2
- package/types/c8y-ngx-components-ai.d.ts.map +1 -1
- package/types/c8y-ngx-components-asset-properties.d.ts.map +1 -1
- package/types/c8y-ngx-components-context-dashboard.d.ts +37 -3
- package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +6 -0
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-asset-table.d.ts +5 -0
- package/types/c8y-ngx-components-widgets-implementations-asset-table.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +310 -12
- package/types/c8y-ngx-components.d.ts.map +1 -1
|
@@ -201,7 +201,7 @@ class ReportDashboardListComponent {
|
|
|
201
201
|
: this.reportDashboardService.removeNavigatorNode(report);
|
|
202
202
|
}
|
|
203
203
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1$1.InventoryService }, { token: i1.ContextDashboardService }, { token: i3.TranslateService }, { token: i4.ModalService }, { token: i4.AlertService }, { token: ReportDashboardService }, { token: i4.Permissions }, { token: i4.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
204
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ReportDashboardListComponent, isStandalone: true, selector: "c8y-report-dashboard-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n @if ((textFilter$ | async).length === 0) {\n <i c8yIcon=\"search\"></i>\n }\n @if ((textFilter$ | async).length > 0) {\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n }\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n routerLink=\"/report/new-report\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n @if (!canAddReport) {\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n }\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/docs/cockpit/working-with-reports/#working-with-reports\"></c8y-help>\n\n<c8y-list-group>\n @if ((reports$ | async)?.data.length > 0) {\n <c8y-li class=\"page-sticky-header hidden-xs hidden-sm\">\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n @let reportName = report.translateDashboardTitle ? (report.name | translate) : report.name;\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ reportName }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ reportName }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n @if (!report.description) {\n <em class=\"text-muted\">\n {{ 'No description available' | translate }}\n </em>\n } @else {\n {{ report.description }}\n }\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [ngModel]=\"!!report.c8y_IsNavigatorNode\"\n (ngModelChange)=\"report.c8y_IsNavigatorNode = $event\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n@if ((reports$ | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n >\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n routerLink=\"/report/new-report\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\"\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.ADD_REPORT }\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-reports\">user documentation</a>.\n </small>\n </p>\n </c8y-ui-empty-state>\n}\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "directive", type: 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: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
204
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ReportDashboardListComponent, isStandalone: true, selector: "c8y-report-dashboard-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n @if ((textFilter$ | async).length === 0) {\n <i c8yIcon=\"search\"></i>\n }\n @if ((textFilter$ | async).length > 0) {\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n }\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n routerLink=\"/report/new-report\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n @if (!canAddReport) {\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n }\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/docs/cockpit/working-with-reports/#working-with-reports\"></c8y-help>\n\n<c8y-list-group>\n @if ((reports$ | async)?.data.length > 0) {\n <c8y-li class=\"page-sticky-header hidden-xs hidden-sm\">\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n @let reportName = report.translateDashboardTitle ? (report.name | translate) : report.name;\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ reportName }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ reportName }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n @if (!report.description) {\n <em class=\"text-muted\">\n {{ 'No description available' | translate }}\n </em>\n } @else {\n {{ report.description }}\n }\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [ngModel]=\"!!report.c8y_IsNavigatorNode\"\n (ngModelChange)=\"report.c8y_IsNavigatorNode = $event\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n@if ((reports$ | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n >\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n routerLink=\"/report/new-report\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\"\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.ADD_REPORT }\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-reports\">user documentation</a>.\n </small>\n </p>\n </c8y-ui-empty-state>\n}\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.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: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable", "selectOnClick"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "directive", type: 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: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
205
205
|
}
|
|
206
206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ReportDashboardListComponent, decorators: [{
|
|
207
207
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-report-dashboard.mjs","sources":["../../report-dashboard/report-dashboard.guard.ts","../../report-dashboard/report-dashboard.service.ts","../../report-dashboard/report-dashboard-navigation.factory.ts","../../report-dashboard/report-dashboard-list.component.ts","../../report-dashboard/report-dashboard-list.component.html","../../report-dashboard/report-dashboard.module.ts","../../report-dashboard/c8y-ngx-components-report-dashboard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport {\n ContextDashboardService,\n ContextDashboardType\n} from '@c8y/ngx-components/context-dashboard';\nimport { tap } from 'rxjs/operators';\nimport { from, Observable, of } from 'rxjs';\nimport { Tab } from '@c8y/ngx-components';\n\n@Injectable({ providedIn: 'root' })\nexport class ReportDashboardGuard {\n constructor(private contextDashboardService: ContextDashboardService) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean | Tab[]> {\n const reportId = route.data.contextData && route.data.contextData.id;\n return from(\n this.contextDashboardService.activateDashboards(route, [ContextDashboardType.Named])\n ).pipe(\n tap(res => {\n return Array.isArray(res) && res.length === 0\n ? this.createDashboardIfNotExist(reportId)\n : of(true);\n })\n );\n }\n\n createDashboardIfNotExist(reportId) {\n const dashboardCfg = {};\n return this.contextDashboardService\n .create(dashboardCfg, undefined, `report_${reportId}`)\n .then(() => true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n InventoryService,\n QueriesUtil,\n QueryObjectFilterComparison,\n QueryObjectRoot,\n QueryObjectWithDedicatedFilter\n} from '@c8y/client';\nimport { NavigatorService } from '@c8y/ngx-components';\n\n@Injectable()\nexport class ReportDashboardService {\n private queriesUtil: QueriesUtil;\n constructor(\n private inventoryService: InventoryService,\n private navigatorService: NavigatorService\n ) {\n this.queriesUtil = new QueriesUtil();\n }\n\n listReports(options: { filter?: QueryObjectRoot; pageSize?: number } = {}) {\n let query: QueryObjectFilterComparison | QueryObjectWithDedicatedFilter = {\n __has: 'c8y_Report'\n };\n if (options.filter) {\n query = this.queriesUtil.addAndFilter(query, options.filter);\n }\n const filters = {\n query: this.queriesUtil.buildQuery(query),\n pageSize: options.pageSize || 50,\n withTotalPages: true,\n withChildren: false\n };\n return this.inventoryService.list(filters);\n }\n\n removeNavigatorNode(report: IManagedObject) {\n this.navigatorService.state.forEach(node => {\n if (node.path === `reports/${report.id}`) {\n this.navigatorService.remove(node);\n return;\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { NavigatorNode, NavigatorService } from '@c8y/ngx-components';\nimport { ReportDashboardService } from './report-dashboard.service';\n\nconst REPORTS_NAVIGATOR_NODE_PRIORITY = 40;\n\n@Injectable({ providedIn: 'root' })\nexport class ReportDashboardNavigationFactory {\n loaded = false;\n\n constructor(\n private navigatorService: NavigatorService,\n private reportDashboardService: ReportDashboardService\n ) {}\n\n async get() {\n if (!this.loaded) {\n this.loaded = true;\n\n this.navigatorService.add(\n new NavigatorNode({\n label: gettext('Reports'),\n path: 'reports',\n icon: 'c8y-reports',\n featureId: 'reports',\n priority: REPORTS_NAVIGATOR_NODE_PRIORITY\n })\n );\n\n const reports: IManagedObject[] = (\n await this.reportDashboardService.listReports({\n filter: { __has: 'c8y_IsNavigatorNode' },\n pageSize: 2000\n })\n ).data;\n reports.forEach(report => {\n const node = new NavigatorNode({\n label: report.name,\n path: `reports/${report.id}`,\n icon: report.icon,\n priority: report.priority,\n routerLinkExact: false,\n skipLabelTranslation: !report.translateDashboardTitle\n });\n this.navigatorService.add(node);\n });\n }\n }\n}\n","import { Component, OnInit, ViewChild, ChangeDetectionStrategy } from '@angular/core';\nimport { BehaviorSubject, combineLatest, Observable } from 'rxjs';\nimport { IManagedObject, InventoryService, IResultList } from '@c8y/client';\nimport { debounceTime, distinctUntilChanged, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AlertService,\n FilterInputComponent,\n GainsightService,\n ModalService,\n Permissions,\n Status,\n TitleComponent,\n ActionBarItemComponent,\n IconDirective,\n HelpComponent,\n ListGroupComponent,\n ListItemComponent,\n ListItemIconComponent,\n ListItemBodyComponent,\n ForOfDirective,\n EmptyStateComponent,\n ProductExperienceDirective,\n GuideDocsComponent,\n C8yTranslateDirective,\n GuideHrefDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport {\n ContextDashboardType,\n ContextDashboardService,\n PRODUCT_EXPERIENCE\n} from '@c8y/ngx-components/context-dashboard';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ReportDashboardService } from './report-dashboard.service';\nimport { FormsModule } from '@angular/forms';\nimport { NgClass, AsyncPipe } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { TooltipDirective } from 'ngx-bootstrap/tooltip';\n\n@Component({\n selector: 'c8y-report-dashboard-list',\n templateUrl: './report-dashboard-list.component.html',\n imports: [\n TitleComponent,\n ActionBarItemComponent,\n FormsModule,\n IconDirective,\n RouterLink,\n PopoverDirective,\n NgClass,\n HelpComponent,\n ListGroupComponent,\n ListItemComponent,\n ListItemIconComponent,\n ListItemBodyComponent,\n ForOfDirective,\n TooltipDirective,\n EmptyStateComponent,\n ProductExperienceDirective,\n GuideDocsComponent,\n C8yTranslateDirective,\n GuideHrefDirective,\n C8yTranslatePipe,\n AsyncPipe\n ],\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class ReportDashboardListComponent implements OnInit {\n PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE;\n\n @ViewChild(FilterInputComponent, { static: false }) filter: FilterInputComponent;\n textFilter$: BehaviorSubject<string> = new BehaviorSubject('');\n reload$: BehaviorSubject<void> = new BehaviorSubject(null);\n reloading = false;\n reports$: Observable<IResultList<IManagedObject>> = combineLatest(\n this.textFilter$.pipe(debounceTime(400), distinctUntilChanged()),\n this.reload$\n ).pipe(\n tap(() => {\n this.reloading = true;\n }),\n switchMap(([text]) => this.loadReports(text)),\n tap(() => {\n this.reloading = false;\n }),\n shareReplay(1)\n );\n canAddReport = false;\n private readonly DELETED_SUCCESS_MSG = gettext('Report deleted.');\n\n constructor(\n private inventoryService: InventoryService,\n private contextDashboardService: ContextDashboardService,\n private translateService: TranslateService,\n private modal: ModalService,\n private alertService: AlertService,\n private reportDashboardService: ReportDashboardService,\n private permissions: Permissions,\n private gainsightService: GainsightService\n ) {}\n\n ngOnInit() {\n this.canAddReport = this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n\n async loadReports(partialName?: string) {\n return partialName\n ? this.reportDashboardService.listReports({ filter: { name: `*${partialName}*` } })\n : this.reportDashboardService.listReports();\n }\n\n async delete(report: IManagedObject) {\n try {\n const dashboard = await this.contextDashboardService\n .getDashboard$(`report_${report.id}`, [ContextDashboardType.Named])\n .toPromise();\n const isDashboardFrozen = !!dashboard?.c8y_Dashboard?.isFrozen;\n\n const msg = isDashboardFrozen\n ? gettext(\n `You are about to delete the report \"{{ reportName }}\". Be aware that the report has a locked dashboard assigned. Do you want to proceed?`\n )\n : gettext(`You are about to delete the report \"{{ reportName }}\". Do you want to proceed?`);\n\n await this.modal.confirm(\n gettext('Delete report'),\n this.translateService.instant(msg, {\n reportName: report.name\n }),\n Status.DANGER,\n {\n ok: gettext('Delete'),\n cancel: gettext('Cancel')\n }\n );\n\n await this.contextDashboardService.delete(dashboard, false);\n await this.inventoryService.delete(report.id);\n this.alertService.success(this.DELETED_SUCCESS_MSG);\n if (report.c8y_IsNavigatorNode) {\n this.reportDashboardService.removeNavigatorNode(report);\n }\n this.reload$.next();\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.REPORTS_LIST,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,\n name: report.name,\n id: report.id,\n context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n });\n } catch (ex) {\n if (ex) {\n throw new Error(`Something went wrong: ${ex}`);\n }\n }\n }\n\n async update(report: IManagedObject) {\n report.c8y_IsNavigatorNode = report.c8y_IsNavigatorNode ? {} : null;\n await this.inventoryService.update(report);\n report.c8y_IsNavigatorNode\n ? this.contextDashboardService.addReportNavigatorNode(report)\n : this.reportDashboardService.removeNavigatorNode(report);\n }\n}\n","<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter…' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n @if ((textFilter$ | async).length === 0) {\n <i c8yIcon=\"search\"></i>\n }\n @if ((textFilter$ | async).length > 0) {\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n }\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n routerLink=\"/report/new-report\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n @if (!canAddReport) {\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n }\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/docs/cockpit/working-with-reports/#working-with-reports\"></c8y-help>\n\n<c8y-list-group>\n @if ((reports$ | async)?.data.length > 0) {\n <c8y-li class=\"page-sticky-header hidden-xs hidden-sm\">\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n @let reportName = report.translateDashboardTitle ? (report.name | translate) : report.name;\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ reportName }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ reportName }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n @if (!report.description) {\n <em class=\"text-muted\">\n {{ 'No description available' | translate }}\n </em>\n } @else {\n {{ report.description }}\n }\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [ngModel]=\"!!report.c8y_IsNavigatorNode\"\n (ngModelChange)=\"report.c8y_IsNavigatorNode = $event\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n@if ((reports$ | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n >\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n routerLink=\"/report/new-report\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\"\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.ADD_REPORT }\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-reports\">user documentation</a>.\n </small>\n </p>\n </c8y-ui-empty-state>\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport {\n CoreModule,\n hookNavigator,\n hookRoute,\n runGuardsOnParamsOrReloadChange,\n ViewContext\n} from '@c8y/ngx-components';\nimport {\n ContextDashboardComponent,\n ContextDashboardModule,\n CanDeactivateComponent,\n ContextDashboardManagedObject\n} from '@c8y/ngx-components/context-dashboard';\nimport { ReportDashboardGuard } from './report-dashboard.guard';\nimport { ReportDashboardNavigationFactory } from './report-dashboard-navigation.factory';\nimport { ReportDashboardListComponent } from './report-dashboard-list.component';\nimport { ReportDashboardService } from './report-dashboard.service';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\n\n@NgModule({\n imports: [\n CoreModule,\n ContextDashboardModule,\n TooltipModule.forRoot(),\n RouterModule,\n PopoverModule,\n ReportDashboardListComponent\n ],\n providers: [\n ReportDashboardGuard,\n ReportDashboardService,\n hookRoute([\n {\n path: 'reports',\n component: ReportDashboardListComponent\n },\n {\n path: 'report/new-report',\n component: ContextDashboardComponent,\n canDeactivate: [(component: CanDeactivateComponent) => component?.canDeactivate() ?? true],\n data: {\n dashboard: {\n c8y_Dashboard: null\n } as ContextDashboardManagedObject,\n isReport: true\n },\n rootContext: ViewContext.Dashboard\n },\n {\n path: 'dashboard/:dashboardId',\n component: ContextDashboardComponent,\n canActivate: [ReportDashboardGuard],\n canDeactivate: [(component: CanDeactivateComponent) => component?.canDeactivate() ?? true],\n context: ViewContext.Report,\n rootContext: ViewContext.Dashboard,\n runGuardsAndResolvers: runGuardsOnParamsOrReloadChange\n }\n ]),\n hookNavigator(ReportDashboardNavigationFactory)\n ]\n})\nexport class ReportDashboardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i2.ReportDashboardService","i5.ReportDashboardService"],"mappings":";;;;;;;;;;;;;;;;;;;;MAWa,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CAAoB,uBAAgD,EAAA;QAAhD,IAAA,CAAA,uBAAuB,GAAvB,uBAAuB;IAA4B;AAEvE,IAAA,WAAW,CAAC,KAA6B,EAAA;AACvC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QACpE,OAAO,IAAI,CACT,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CACrF,CAAC,IAAI,CACJ,GAAG,CAAC,GAAG,IAAG;YACR,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK;AAC1C,kBAAE,IAAI,CAAC,yBAAyB,CAAC,QAAQ;AACzC,kBAAE,EAAE,CAAC,IAAI,CAAC;QACd,CAAC,CAAC,CACH;IACH;AAEA,IAAA,yBAAyB,CAAC,QAAQ,EAAA;QAChC,MAAM,YAAY,GAAG,EAAE;QACvB,OAAO,IAAI,CAAC;aACT,MAAM,CAAC,YAAY,EAAE,SAAS,EAAE,CAAA,OAAA,EAAU,QAAQ,EAAE;AACpD,aAAA,IAAI,CAAC,MAAM,IAAI,CAAC;IACrB;+GArBW,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAA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,EAAE,yBAAyB;gCACpC,WAAW,EAAE,CAAC,oBAAoB,CAAC;AACnC,gCAAA,aAAa,EAAE,CAAC,CAAC,SAAiC,KAAK,SAAS,EAAE,aAAa,EAAE,IAAI,IAAI,CAAC;gCAC1F,OAAO,EAAE,WAAW,CAAC,MAAM;gCAC3B,WAAW,EAAE,WAAW,CAAC,SAAS;AAClC,gCAAA,qBAAqB,EAAE;AACxB;yBACF,CAAC;wBACF,aAAa,CAAC,gCAAgC;AAC/C;AACF,iBAAA;;;AC/DD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-report-dashboard.mjs","sources":["../../report-dashboard/report-dashboard.guard.ts","../../report-dashboard/report-dashboard.service.ts","../../report-dashboard/report-dashboard-navigation.factory.ts","../../report-dashboard/report-dashboard-list.component.ts","../../report-dashboard/report-dashboard-list.component.html","../../report-dashboard/report-dashboard.module.ts","../../report-dashboard/c8y-ngx-components-report-dashboard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\nimport {\n ContextDashboardService,\n ContextDashboardType\n} from '@c8y/ngx-components/context-dashboard';\nimport { tap } from 'rxjs/operators';\nimport { from, Observable, of } from 'rxjs';\nimport { Tab } from '@c8y/ngx-components';\n\n@Injectable({ providedIn: 'root' })\nexport class ReportDashboardGuard {\n constructor(private contextDashboardService: ContextDashboardService) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean | Tab[]> {\n const reportId = route.data.contextData && route.data.contextData.id;\n return from(\n this.contextDashboardService.activateDashboards(route, [ContextDashboardType.Named])\n ).pipe(\n tap(res => {\n return Array.isArray(res) && res.length === 0\n ? this.createDashboardIfNotExist(reportId)\n : of(true);\n })\n );\n }\n\n createDashboardIfNotExist(reportId) {\n const dashboardCfg = {};\n return this.contextDashboardService\n .create(dashboardCfg, undefined, `report_${reportId}`)\n .then(() => true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n InventoryService,\n QueriesUtil,\n QueryObjectFilterComparison,\n QueryObjectRoot,\n QueryObjectWithDedicatedFilter\n} from '@c8y/client';\nimport { NavigatorService } from '@c8y/ngx-components';\n\n@Injectable()\nexport class ReportDashboardService {\n private queriesUtil: QueriesUtil;\n constructor(\n private inventoryService: InventoryService,\n private navigatorService: NavigatorService\n ) {\n this.queriesUtil = new QueriesUtil();\n }\n\n listReports(options: { filter?: QueryObjectRoot; pageSize?: number } = {}) {\n let query: QueryObjectFilterComparison | QueryObjectWithDedicatedFilter = {\n __has: 'c8y_Report'\n };\n if (options.filter) {\n query = this.queriesUtil.addAndFilter(query, options.filter);\n }\n const filters = {\n query: this.queriesUtil.buildQuery(query),\n pageSize: options.pageSize || 50,\n withTotalPages: true,\n withChildren: false\n };\n return this.inventoryService.list(filters);\n }\n\n removeNavigatorNode(report: IManagedObject) {\n this.navigatorService.state.forEach(node => {\n if (node.path === `reports/${report.id}`) {\n this.navigatorService.remove(node);\n return;\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { NavigatorNode, NavigatorService } from '@c8y/ngx-components';\nimport { ReportDashboardService } from './report-dashboard.service';\n\nconst REPORTS_NAVIGATOR_NODE_PRIORITY = 40;\n\n@Injectable({ providedIn: 'root' })\nexport class ReportDashboardNavigationFactory {\n loaded = false;\n\n constructor(\n private navigatorService: NavigatorService,\n private reportDashboardService: ReportDashboardService\n ) {}\n\n async get() {\n if (!this.loaded) {\n this.loaded = true;\n\n this.navigatorService.add(\n new NavigatorNode({\n label: gettext('Reports'),\n path: 'reports',\n icon: 'c8y-reports',\n featureId: 'reports',\n priority: REPORTS_NAVIGATOR_NODE_PRIORITY\n })\n );\n\n const reports: IManagedObject[] = (\n await this.reportDashboardService.listReports({\n filter: { __has: 'c8y_IsNavigatorNode' },\n pageSize: 2000\n })\n ).data;\n reports.forEach(report => {\n const node = new NavigatorNode({\n label: report.name,\n path: `reports/${report.id}`,\n icon: report.icon,\n priority: report.priority,\n routerLinkExact: false,\n skipLabelTranslation: !report.translateDashboardTitle\n });\n this.navigatorService.add(node);\n });\n }\n }\n}\n","import { Component, OnInit, ViewChild, ChangeDetectionStrategy } from '@angular/core';\nimport { BehaviorSubject, combineLatest, Observable } from 'rxjs';\nimport { IManagedObject, InventoryService, IResultList } from '@c8y/client';\nimport { debounceTime, distinctUntilChanged, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AlertService,\n FilterInputComponent,\n GainsightService,\n ModalService,\n Permissions,\n Status,\n TitleComponent,\n ActionBarItemComponent,\n IconDirective,\n HelpComponent,\n ListGroupComponent,\n ListItemComponent,\n ListItemIconComponent,\n ListItemBodyComponent,\n ForOfDirective,\n EmptyStateComponent,\n ProductExperienceDirective,\n GuideDocsComponent,\n C8yTranslateDirective,\n GuideHrefDirective,\n C8yTranslatePipe\n} from '@c8y/ngx-components';\nimport {\n ContextDashboardType,\n ContextDashboardService,\n PRODUCT_EXPERIENCE\n} from '@c8y/ngx-components/context-dashboard';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ReportDashboardService } from './report-dashboard.service';\nimport { FormsModule } from '@angular/forms';\nimport { NgClass, AsyncPipe } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { TooltipDirective } from 'ngx-bootstrap/tooltip';\n\n@Component({\n selector: 'c8y-report-dashboard-list',\n templateUrl: './report-dashboard-list.component.html',\n imports: [\n TitleComponent,\n ActionBarItemComponent,\n FormsModule,\n IconDirective,\n RouterLink,\n PopoverDirective,\n NgClass,\n HelpComponent,\n ListGroupComponent,\n ListItemComponent,\n ListItemIconComponent,\n ListItemBodyComponent,\n ForOfDirective,\n TooltipDirective,\n EmptyStateComponent,\n ProductExperienceDirective,\n GuideDocsComponent,\n C8yTranslateDirective,\n GuideHrefDirective,\n C8yTranslatePipe,\n AsyncPipe\n ],\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class ReportDashboardListComponent implements OnInit {\n PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE;\n\n @ViewChild(FilterInputComponent, { static: false }) filter: FilterInputComponent;\n textFilter$: BehaviorSubject<string> = new BehaviorSubject('');\n reload$: BehaviorSubject<void> = new BehaviorSubject(null);\n reloading = false;\n reports$: Observable<IResultList<IManagedObject>> = combineLatest(\n this.textFilter$.pipe(debounceTime(400), distinctUntilChanged()),\n this.reload$\n ).pipe(\n tap(() => {\n this.reloading = true;\n }),\n switchMap(([text]) => this.loadReports(text)),\n tap(() => {\n this.reloading = false;\n }),\n shareReplay(1)\n );\n canAddReport = false;\n private readonly DELETED_SUCCESS_MSG = gettext('Report deleted.');\n\n constructor(\n private inventoryService: InventoryService,\n private contextDashboardService: ContextDashboardService,\n private translateService: TranslateService,\n private modal: ModalService,\n private alertService: AlertService,\n private reportDashboardService: ReportDashboardService,\n private permissions: Permissions,\n private gainsightService: GainsightService\n ) {}\n\n ngOnInit() {\n this.canAddReport = this.permissions.hasAnyRole([\n Permissions.ROLE_INVENTORY_CREATE,\n Permissions.ROLE_INVENTORY_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_ADMIN,\n Permissions.ROLE_MANAGED_OBJECT_CREATE\n ]);\n }\n\n async loadReports(partialName?: string) {\n return partialName\n ? this.reportDashboardService.listReports({ filter: { name: `*${partialName}*` } })\n : this.reportDashboardService.listReports();\n }\n\n async delete(report: IManagedObject) {\n try {\n const dashboard = await this.contextDashboardService\n .getDashboard$(`report_${report.id}`, [ContextDashboardType.Named])\n .toPromise();\n const isDashboardFrozen = !!dashboard?.c8y_Dashboard?.isFrozen;\n\n const msg = isDashboardFrozen\n ? gettext(\n `You are about to delete the report \"{{ reportName }}\". Be aware that the report has a locked dashboard assigned. Do you want to proceed?`\n )\n : gettext(`You are about to delete the report \"{{ reportName }}\". Do you want to proceed?`);\n\n await this.modal.confirm(\n gettext('Delete report'),\n this.translateService.instant(msg, {\n reportName: report.name\n }),\n Status.DANGER,\n {\n ok: gettext('Delete'),\n cancel: gettext('Cancel')\n }\n );\n\n await this.contextDashboardService.delete(dashboard, false);\n await this.inventoryService.delete(report.id);\n this.alertService.success(this.DELETED_SUCCESS_MSG);\n if (report.c8y_IsNavigatorNode) {\n this.reportDashboardService.removeNavigatorNode(report);\n }\n this.reload$.next();\n this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {\n component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.REPORTS_LIST,\n action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,\n name: report.name,\n id: report.id,\n context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT\n });\n } catch (ex) {\n if (ex) {\n throw new Error(`Something went wrong: ${ex}`);\n }\n }\n }\n\n async update(report: IManagedObject) {\n report.c8y_IsNavigatorNode = report.c8y_IsNavigatorNode ? {} : null;\n await this.inventoryService.update(report);\n report.c8y_IsNavigatorNode\n ? this.contextDashboardService.addReportNavigatorNode(report)\n : this.reportDashboardService.removeNavigatorNode(report);\n }\n}\n","<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter…' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n @if ((textFilter$ | async).length === 0) {\n <i c8yIcon=\"search\"></i>\n }\n @if ((textFilter$ | async).length > 0) {\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n }\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n routerLink=\"/report/new-report\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n @if (!canAddReport) {\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n }\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/docs/cockpit/working-with-reports/#working-with-reports\"></c8y-help>\n\n<c8y-list-group>\n @if ((reports$ | async)?.data.length > 0) {\n <c8y-li class=\"page-sticky-header hidden-xs hidden-sm\">\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n @let reportName = report.translateDashboardTitle ? (report.name | translate) : report.name;\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ reportName }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ reportName }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n @if (!report.description) {\n <em class=\"text-muted\">\n {{ 'No description available' | translate }}\n </em>\n } @else {\n {{ report.description }}\n }\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [ngModel]=\"!!report.c8y_IsNavigatorNode\"\n (ngModelChange)=\"report.c8y_IsNavigatorNode = $event\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n@if ((reports$ | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n >\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n routerLink=\"/report/new-report\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS\"\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.ADD_REPORT }\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/working-with-reports\">user documentation</a>.\n </small>\n </p>\n </c8y-ui-empty-state>\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport {\n CoreModule,\n hookNavigator,\n hookRoute,\n runGuardsOnParamsOrReloadChange,\n ViewContext\n} from '@c8y/ngx-components';\nimport {\n ContextDashboardComponent,\n ContextDashboardModule,\n CanDeactivateComponent,\n ContextDashboardManagedObject\n} from '@c8y/ngx-components/context-dashboard';\nimport { ReportDashboardGuard } from './report-dashboard.guard';\nimport { ReportDashboardNavigationFactory } from './report-dashboard-navigation.factory';\nimport { ReportDashboardListComponent } from './report-dashboard-list.component';\nimport { ReportDashboardService } from './report-dashboard.service';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\n\n@NgModule({\n imports: [\n CoreModule,\n ContextDashboardModule,\n TooltipModule.forRoot(),\n RouterModule,\n PopoverModule,\n ReportDashboardListComponent\n ],\n providers: [\n ReportDashboardGuard,\n ReportDashboardService,\n hookRoute([\n {\n path: 'reports',\n component: ReportDashboardListComponent\n },\n {\n path: 'report/new-report',\n component: ContextDashboardComponent,\n canDeactivate: [(component: CanDeactivateComponent) => component?.canDeactivate() ?? true],\n data: {\n dashboard: {\n c8y_Dashboard: null\n } as ContextDashboardManagedObject,\n isReport: true\n },\n rootContext: ViewContext.Dashboard\n },\n {\n path: 'dashboard/:dashboardId',\n component: ContextDashboardComponent,\n canActivate: [ReportDashboardGuard],\n canDeactivate: [(component: CanDeactivateComponent) => component?.canDeactivate() ?? true],\n context: ViewContext.Report,\n rootContext: ViewContext.Dashboard,\n runGuardsAndResolvers: runGuardsOnParamsOrReloadChange\n }\n ]),\n hookNavigator(ReportDashboardNavigationFactory)\n ]\n})\nexport class ReportDashboardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i2.ReportDashboardService","i5.ReportDashboardService"],"mappings":";;;;;;;;;;;;;;;;;;;;MAWa,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CAAoB,uBAAgD,EAAA;QAAhD,IAAA,CAAA,uBAAuB,GAAvB,uBAAuB;IAA4B;AAEvE,IAAA,WAAW,CAAC,KAA6B,EAAA;AACvC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QACpE,OAAO,IAAI,CACT,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CACrF,CAAC,IAAI,CACJ,GAAG,CAAC,GAAG,IAAG;YACR,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK;AAC1C,kBAAE,IAAI,CAAC,yBAAyB,CAAC,QAAQ;AACzC,kBAAE,EAAE,CAAC,IAAI,CAAC;QACd,CAAC,CAAC,CACH;IACH;AAEA,IAAA,yBAAyB,CAAC,QAAQ,EAAA;QAChC,MAAM,YAAY,GAAG,EAAE;QACvB,OAAO,IAAI,CAAC;aACT,MAAM,CAAC,YAAY,EAAE,SAAS,EAAE,CAAA,OAAA,EAAU,QAAQ,EAAE;AACpD,aAAA,IAAI,CAAC,MAAM,IAAI,CAAC;IACrB;+GArBW,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,uBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAA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,WAAW,EAAE,WAAW,CAAC;AAC1B,6BAAA;AACD,4BAAA;AACE,gCAAA,IAAI,EAAE,wBAAwB;AAC9B,gCAAA,SAAS,EAAE,yBAAyB;gCACpC,WAAW,EAAE,CAAC,oBAAoB,CAAC;AACnC,gCAAA,aAAa,EAAE,CAAC,CAAC,SAAiC,KAAK,SAAS,EAAE,aAAa,EAAE,IAAI,IAAI,CAAC;gCAC1F,OAAO,EAAE,WAAW,CAAC,MAAM;gCAC3B,WAAW,EAAE,WAAW,CAAC,SAAS;AAClC,gCAAA,qBAAqB,EAAE;AACxB;yBACF,CAAC;wBACF,aAAa,CAAC,gCAAgC;AAC/C;AACF,iBAAA;;;AC/DD;;AAEG;;;;"}
|
|
@@ -213,7 +213,7 @@ class TextBasedConfigurationComponent {
|
|
|
213
213
|
})).data;
|
|
214
214
|
}
|
|
215
215
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TextBasedConfigurationComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.AlertService }, { token: i3.RepositoryService }, { token: DeviceConfigurationService }, { token: i3$1.InventoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
216
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TextBasedConfigurationComponent, isStandalone: true, selector: "c8y-text-based-configuration", ngImport: i0, template: "<div\n class=\"d-flex d-col fit-h min-height-0\"\n [formGroup]=\"form\"\n>\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50 d-flex a-i-center\">\n <label\n class=\"m-r-8 flex-no-shrink\"\n for=\"textCfgEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n
|
|
216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TextBasedConfigurationComponent, isStandalone: true, selector: "c8y-text-based-configuration", ngImport: i0, template: "<div\n class=\"d-flex d-col fit-h min-height-0\"\n [formGroup]=\"form\"\n>\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50 d-flex a-i-center\">\n <label\n class=\"m-r-8 flex-no-shrink\"\n for=\"textCfgEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n id=\"textCfgEditorLanguage\"\n [ariaLabel]=\"'Editor language' | translate\"\n [items]=\"editorLanguages\"\n formControlName=\"language\"\n ></c8y-select>\n <div class=\"m-l-auto d-flex\">\n @if (showTextBasedConfigReload) {\n <button\n class=\"btn btn-default btn-sm a-s-center m-t-8 m-b-8\"\n title=\"{{ 'Get configuration from device' | translate }}\"\n type=\"button\"\n (click)=\"reloadConfiguration()\"\n [disabled]=\"reloadingConfig() || savingConfig()\"\n >\n @if (reloadingConfig()) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloadingConfig() }\"\n ></i>\n }\n @if (!reloadingConfig()) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"arrow-down\"\n ></i>\n }\n\n {{ 'Get configuration from device' | translate }}\n </button>\n }\n </div>\n </div>\n </fieldset>\n <div class=\"p-relative flex-grow min-height-0\">\n <c8y-editor\n class=\"p-absolute top-0 left-0 fit-w fit-h\"\n formControlName=\"config\"\n [editorOptions]=\"editorOptions()\"\n ></c8y-editor>\n </div>\n @if (latestOperation() !== undefined) {\n <c8y-operation-details\n class=\"bg-level-2 p-0\"\n [operation]=\"latestOperation()\"\n ></c8y-operation-details>\n }\n @if (showTextBasedConfigSave) {\n <div class=\"card-footer flex-no-shrink fit-w separator\">\n <button\n class=\"btn btn-primary\"\n id=\"send-config-btn\"\n type=\"button\"\n (click)=\"updateConfiguration(configControl.value)\"\n [disabled]=\"reloadingConfig() || savingConfig() || !configControl.value\"\n [ngClass]=\"{ 'btn-pending': savingConfig() }\"\n >\n @if (!savingConfig()) {\n <span title=\"{{ 'Send' | translate }}\">\n {{ 'Send configuration to device' | translate }}\n </span>\n }\n @if (savingConfig()) {\n <span title=\"{{ 'Sending\u2026' | translate }}\">\n {{ 'Sending\u2026' | translate }}\n </span>\n }\n </button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: EditorComponent, selector: "c8y-editor", inputs: ["editorOptions", "theme"], outputs: ["editorInit"] }, { kind: "component", type: OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "component", type: SelectComponent, selector: "c8y-select", inputs: ["placeholder", "items", "selected", "container", "multi", "canSelectWithSpace", "disabled", "autoClose", "insideClick", "required", "canDeselect", "name", "ariaLabel", "ariaLabelledby", "icon", "filterItems"], outputs: ["onSelect", "onDeselect", "onIconClick"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
217
217
|
}
|
|
218
218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TextBasedConfigurationComponent, decorators: [{
|
|
219
219
|
type: Component,
|
|
@@ -225,7 +225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
225
225
|
OperationDetailsComponent,
|
|
226
226
|
C8yTranslatePipe,
|
|
227
227
|
SelectComponent
|
|
228
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div\n class=\"d-flex d-col fit-h min-height-0\"\n [formGroup]=\"form\"\n>\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50 d-flex a-i-center\">\n <label\n class=\"m-r-8 flex-no-shrink\"\n for=\"textCfgEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n
|
|
228
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div\n class=\"d-flex d-col fit-h min-height-0\"\n [formGroup]=\"form\"\n>\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50 d-flex a-i-center\">\n <label\n class=\"m-r-8 flex-no-shrink\"\n for=\"textCfgEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n id=\"textCfgEditorLanguage\"\n [ariaLabel]=\"'Editor language' | translate\"\n [items]=\"editorLanguages\"\n formControlName=\"language\"\n ></c8y-select>\n <div class=\"m-l-auto d-flex\">\n @if (showTextBasedConfigReload) {\n <button\n class=\"btn btn-default btn-sm a-s-center m-t-8 m-b-8\"\n title=\"{{ 'Get configuration from device' | translate }}\"\n type=\"button\"\n (click)=\"reloadConfiguration()\"\n [disabled]=\"reloadingConfig() || savingConfig()\"\n >\n @if (reloadingConfig()) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloadingConfig() }\"\n ></i>\n }\n @if (!reloadingConfig()) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"arrow-down\"\n ></i>\n }\n\n {{ 'Get configuration from device' | translate }}\n </button>\n }\n </div>\n </div>\n </fieldset>\n <div class=\"p-relative flex-grow min-height-0\">\n <c8y-editor\n class=\"p-absolute top-0 left-0 fit-w fit-h\"\n formControlName=\"config\"\n [editorOptions]=\"editorOptions()\"\n ></c8y-editor>\n </div>\n @if (latestOperation() !== undefined) {\n <c8y-operation-details\n class=\"bg-level-2 p-0\"\n [operation]=\"latestOperation()\"\n ></c8y-operation-details>\n }\n @if (showTextBasedConfigSave) {\n <div class=\"card-footer flex-no-shrink fit-w separator\">\n <button\n class=\"btn btn-primary\"\n id=\"send-config-btn\"\n type=\"button\"\n (click)=\"updateConfiguration(configControl.value)\"\n [disabled]=\"reloadingConfig() || savingConfig() || !configControl.value\"\n [ngClass]=\"{ 'btn-pending': savingConfig() }\"\n >\n @if (!savingConfig()) {\n <span title=\"{{ 'Send' | translate }}\">\n {{ 'Send configuration to device' | translate }}\n </span>\n }\n @if (savingConfig()) {\n <span title=\"{{ 'Sending\u2026' | translate }}\">\n {{ 'Sending\u2026' | translate }}\n </span>\n }\n </button>\n </div>\n }\n</div>\n" }]
|
|
229
229
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2.AlertService }, { type: i3.RepositoryService }, { type: DeviceConfigurationService }, { type: i3$1.InventoryService }] });
|
|
230
230
|
|
|
231
231
|
class DeviceConfigurationGuard {
|
|
@@ -546,7 +546,7 @@ class ConfigurationDetailComponent {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ConfigurationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
549
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ConfigurationDetailComponent, isStandalone: true, selector: "c8y-configuration-detail", inputs: { version: "version", description: "description", binary: "binary", deviceType: "deviceType", mo: "mo", isDeviceContext: "isDeviceContext" }, host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div class=\"card-header j-c-center separator flex-no-shrink p-24\">\n <i\n class=\"m-r-8\"\n [c8yIcon]=\"'gears'\"\n aria-hidden=\"true\"\n ></i>\n <h4 id=\"drawerTitle\">\n {{ drawerTitle() | translate }}\n </h4>\n</div>\n\n<form\n class=\"d-contents\"\n [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n>\n <div\n class=\"card-body inner-scroll p-24\"\n [class.d-col]=\"form.value.uploadChoice === 'editInline'\"\n >\n @if (isDeviceContext) {\n <div\n class=\"alert alert-warning fit-w max-width-100\"\n translate\n >\n Changes apply to the configuration repository and affect ongoing updates and future device\n deployments.\n </div>\n }\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confVersion\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"confVersion\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDescription\"\n translate\n >\n Description\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"confDescription\"\n placeholder=\"{{ 'e.g.' | translate }} Host configuration\"\n rows=\"1\"\n autocomplete=\"off\"\n formControlName=\"description\"\n c8y-textarea-autoresize\n ></textarea>\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDeviceType\"\n translate\n >\n Device type\n </label>\n <input\n class=\"form-control\"\n id=\"confDeviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n data-cy=\"conf-detail--configuration-type\"\n [ngModel]=\"configurationTypeMO\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"configurationTypeMO = $event\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n @let patternStr = pattern();\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"patternStr\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n @if (patternStr.length > 0) {\n <c8y-li class=\"bg-level-2 p-8\">\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n }\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n </div>\n\n <fieldset\n class=\"d-col\"\n [class.flex-grow]=\"form.value.uploadChoice === 'editInline'\"\n [class.min-height-0]=\"form.value.uploadChoice === 'editInline'\"\n >\n <legend\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </legend>\n\n @if (isExternalUrl()) {\n <p\n class=\"text-muted m-b-8\"\n translate\n >\n Content is sourced from a remote URL and cannot be edited inline.\n </p>\n <c8y-form-group>\n <label\n for=\"confFileUrl\"\n translate\n >\n File URL\n </label>\n <input\n class=\"form-control\"\n id=\"confFileUrl\"\n placeholder=\"https://...\"\n type=\"url\"\n autocomplete=\"off\"\n [ngModel]=\"binary.url\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"binary = { url: $event }; form.markAsDirty()\"\n />\n </c8y-form-group>\n } @else {\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n [allowedUploadChoices]=\"['uploadBinary', 'uploadUrl', 'editInline']\"\n [uploadChoice]=\"form.controls.uploadChoice.value\"\n (uploadChoiceChange)=\"onUploadChoiceChange($event)\"\n [fileUrl]=\"binary.url\"\n (fileUrlChange)=\"onFileUrlChange($event)\"\n [fileBinary]=\"binary.file\"\n (fileBinaryChange)=\"onFileBinaryChange($event)\"\n (textFilePicked)=\"onTextFilePicked($event)\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n <ng-container c8yInlineEditor>\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-9\">\n <label\n for=\"confEditorFilename\"\n translate\n >\n Filename\n </label>\n <input\n class=\"form-control\"\n id=\"confEditorFilename\"\n placeholder=\"config.json\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"editorFilename\"\n />\n </c8y-form-group>\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n aria-label=\"{{ 'Editor language' | translate }}\"\n id=\"confEditorLanguage\"\n [items]=\"editorLanguages\"\n formControlName=\"editorLanguage\"\n ></c8y-select>\n </c8y-form-group>\n </div>\n <c8y-form-group class=\"d-col flex-grow min-height-0 m-b-0\">\n <label\n for=\"confEditorContent\"\n translate\n >\n Content\n </label>\n <c8y-editor\n class=\"flex-grow\"\n style=\"min-height: 95px\"\n id=\"confEditorContent\"\n formControlName=\"editorContent\"\n monacoEditorMarkerValidator\n [editorOptions]=\"{ language: editorLanguage() }\"\n ></c8y-editor>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </ng-container>\n </c8y-file-picker>\n }\n </fieldset>\n </div>\n\n <div class=\"card-footer j-c-between separator flex-no-shrink p-24\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving()\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [class.btn-pending]=\"saving()\"\n [title]=\"drawerTitle() | translate\"\n type=\"submit\"\n [disabled]=\"isSaveDisabled\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected", "title", "highlightFirstItem"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "allowedUploadChoices", "fileUrl", "fileBinary", "config", "filePickerIndex", "fileUrlPopover", "editInlineConfirmTitle", "editInlineConfirmMessage"], outputs: ["onFilesPicked", "uploadChoiceChange", "fileBinaryChange", "fileUrlChange", "textFilePicked"] }, { kind: "component", type: EditorComponent, selector: "c8y-editor", inputs: ["editorOptions", "theme"], outputs: ["editorInit"] }, { kind: "directive", type: MonacoEditorMarkerValidatorDirective, selector: "c8y-editor [monacoEditorMarkerValidator]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: SelectComponent, selector: "c8y-select", inputs: ["placeholder", "items", "selected", "container", "multi", "canSelectWithSpace", "disabled", "autoClose", "insideClick", "required", "canDeselect", "name", "icon", "filterItems"], outputs: ["onSelect", "onDeselect", "onIconClick"] }, { kind: "directive", type: TextareaAutoresizeDirective, selector: "[c8y-textarea-autoresize]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
549
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ConfigurationDetailComponent, isStandalone: true, selector: "c8y-configuration-detail", inputs: { version: "version", description: "description", binary: "binary", deviceType: "deviceType", mo: "mo", isDeviceContext: "isDeviceContext" }, host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div class=\"card-header j-c-center separator flex-no-shrink p-24\">\n <i\n class=\"m-r-8\"\n [c8yIcon]=\"'gears'\"\n aria-hidden=\"true\"\n ></i>\n <h4 id=\"drawerTitle\">\n {{ drawerTitle() | translate }}\n </h4>\n</div>\n\n<form\n class=\"d-contents\"\n [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n>\n <div\n class=\"card-body inner-scroll p-24\"\n [class.d-col]=\"form.value.uploadChoice === 'editInline'\"\n >\n @if (isDeviceContext) {\n <div\n class=\"alert alert-warning fit-w max-width-100\"\n translate\n >\n Changes apply to the configuration repository and affect ongoing updates and future device\n deployments.\n </div>\n }\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confVersion\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"confVersion\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDescription\"\n translate\n >\n Description\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"confDescription\"\n placeholder=\"{{ 'e.g.' | translate }} Host configuration\"\n rows=\"1\"\n autocomplete=\"off\"\n formControlName=\"description\"\n c8y-textarea-autoresize\n ></textarea>\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDeviceType\"\n translate\n >\n Device type\n </label>\n <input\n class=\"form-control\"\n id=\"confDeviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n data-cy=\"conf-detail--configuration-type\"\n [ngModel]=\"configurationTypeMO\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"configurationTypeMO = $event\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n @let patternStr = pattern();\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"patternStr\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n @if (patternStr.length > 0) {\n <c8y-li class=\"bg-level-2 p-8\">\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n }\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n </div>\n\n <fieldset\n class=\"d-col\"\n [class.flex-grow]=\"form.value.uploadChoice === 'editInline'\"\n [class.min-height-0]=\"form.value.uploadChoice === 'editInline'\"\n >\n <legend\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </legend>\n\n @if (isExternalUrl()) {\n <p\n class=\"text-muted m-b-8\"\n translate\n >\n Content is sourced from a remote URL and cannot be edited inline.\n </p>\n <c8y-form-group>\n <label\n for=\"confFileUrl\"\n translate\n >\n File URL\n </label>\n <input\n class=\"form-control\"\n id=\"confFileUrl\"\n placeholder=\"https://...\"\n type=\"url\"\n autocomplete=\"off\"\n [ngModel]=\"binary.url\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"binary = { url: $event }; form.markAsDirty()\"\n />\n </c8y-form-group>\n } @else {\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n [allowedUploadChoices]=\"['uploadBinary', 'uploadUrl', 'editInline']\"\n [uploadChoice]=\"form.controls.uploadChoice.value\"\n (uploadChoiceChange)=\"onUploadChoiceChange($event)\"\n [fileUrl]=\"binary.url\"\n (fileUrlChange)=\"onFileUrlChange($event)\"\n [fileBinary]=\"binary.file\"\n (fileBinaryChange)=\"onFileBinaryChange($event)\"\n (textFilePicked)=\"onTextFilePicked($event)\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n <ng-container c8yInlineEditor>\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-9\">\n <label\n for=\"confEditorFilename\"\n translate\n >\n Filename\n </label>\n <input\n class=\"form-control\"\n id=\"confEditorFilename\"\n placeholder=\"config.json\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"editorFilename\"\n />\n </c8y-form-group>\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n id=\"confEditorLanguage\"\n [ariaLabel]=\"'Editor language' | translate\"\n [items]=\"editorLanguages\"\n formControlName=\"editorLanguage\"\n ></c8y-select>\n </c8y-form-group>\n </div>\n <c8y-form-group class=\"d-col flex-grow min-height-0 m-b-0\">\n <label\n for=\"confEditorContent\"\n translate\n >\n Content\n </label>\n <c8y-editor\n class=\"flex-grow\"\n style=\"min-height: 95px\"\n id=\"confEditorContent\"\n formControlName=\"editorContent\"\n monacoEditorMarkerValidator\n [editorOptions]=\"{ language: editorLanguage() }\"\n ></c8y-editor>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </ng-container>\n </c8y-file-picker>\n }\n </fieldset>\n </div>\n\n <div class=\"card-footer j-c-between separator flex-no-shrink p-24\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving()\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [class.btn-pending]=\"saving()\"\n [title]=\"drawerTitle() | translate\"\n type=\"submit\"\n [disabled]=\"isSaveDisabled\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected", "title", "ariaLabel", "ariaLabelledby", "highlightFirstItem"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable", "selectOnClick"], outputs: ["collapsedChange"] }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "allowedUploadChoices", "fileUrl", "fileBinary", "config", "filePickerIndex", "fileUrlPopover", "editInlineConfirmTitle", "editInlineConfirmMessage"], outputs: ["onFilesPicked", "uploadChoiceChange", "fileBinaryChange", "fileUrlChange", "textFilePicked"] }, { kind: "component", type: EditorComponent, selector: "c8y-editor", inputs: ["editorOptions", "theme"], outputs: ["editorInit"] }, { kind: "directive", type: MonacoEditorMarkerValidatorDirective, selector: "c8y-editor [monacoEditorMarkerValidator]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: SelectComponent, selector: "c8y-select", inputs: ["placeholder", "items", "selected", "container", "multi", "canSelectWithSpace", "disabled", "autoClose", "insideClick", "required", "canDeselect", "name", "ariaLabel", "ariaLabelledby", "icon", "filterItems"], outputs: ["onSelect", "onDeselect", "onIconClick"] }, { kind: "directive", type: TextareaAutoresizeDirective, selector: "[c8y-textarea-autoresize]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
550
550
|
}
|
|
551
551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ConfigurationDetailComponent, decorators: [{
|
|
552
552
|
type: Component,
|
|
@@ -569,7 +569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
569
569
|
RequiredInputPlaceholderDirective,
|
|
570
570
|
SelectComponent,
|
|
571
571
|
TextareaAutoresizeDirective
|
|
572
|
-
], template: "<div class=\"card-header j-c-center separator flex-no-shrink p-24\">\n <i\n class=\"m-r-8\"\n [c8yIcon]=\"'gears'\"\n aria-hidden=\"true\"\n ></i>\n <h4 id=\"drawerTitle\">\n {{ drawerTitle() | translate }}\n </h4>\n</div>\n\n<form\n class=\"d-contents\"\n [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n>\n <div\n class=\"card-body inner-scroll p-24\"\n [class.d-col]=\"form.value.uploadChoice === 'editInline'\"\n >\n @if (isDeviceContext) {\n <div\n class=\"alert alert-warning fit-w max-width-100\"\n translate\n >\n Changes apply to the configuration repository and affect ongoing updates and future device\n deployments.\n </div>\n }\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confVersion\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"confVersion\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDescription\"\n translate\n >\n Description\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"confDescription\"\n placeholder=\"{{ 'e.g.' | translate }} Host configuration\"\n rows=\"1\"\n autocomplete=\"off\"\n formControlName=\"description\"\n c8y-textarea-autoresize\n ></textarea>\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDeviceType\"\n translate\n >\n Device type\n </label>\n <input\n class=\"form-control\"\n id=\"confDeviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n data-cy=\"conf-detail--configuration-type\"\n [ngModel]=\"configurationTypeMO\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"configurationTypeMO = $event\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n @let patternStr = pattern();\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"patternStr\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n @if (patternStr.length > 0) {\n <c8y-li class=\"bg-level-2 p-8\">\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n }\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n </div>\n\n <fieldset\n class=\"d-col\"\n [class.flex-grow]=\"form.value.uploadChoice === 'editInline'\"\n [class.min-height-0]=\"form.value.uploadChoice === 'editInline'\"\n >\n <legend\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </legend>\n\n @if (isExternalUrl()) {\n <p\n class=\"text-muted m-b-8\"\n translate\n >\n Content is sourced from a remote URL and cannot be edited inline.\n </p>\n <c8y-form-group>\n <label\n for=\"confFileUrl\"\n translate\n >\n File URL\n </label>\n <input\n class=\"form-control\"\n id=\"confFileUrl\"\n placeholder=\"https://...\"\n type=\"url\"\n autocomplete=\"off\"\n [ngModel]=\"binary.url\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"binary = { url: $event }; form.markAsDirty()\"\n />\n </c8y-form-group>\n } @else {\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n [allowedUploadChoices]=\"['uploadBinary', 'uploadUrl', 'editInline']\"\n [uploadChoice]=\"form.controls.uploadChoice.value\"\n (uploadChoiceChange)=\"onUploadChoiceChange($event)\"\n [fileUrl]=\"binary.url\"\n (fileUrlChange)=\"onFileUrlChange($event)\"\n [fileBinary]=\"binary.file\"\n (fileBinaryChange)=\"onFileBinaryChange($event)\"\n (textFilePicked)=\"onTextFilePicked($event)\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n <ng-container c8yInlineEditor>\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-9\">\n <label\n for=\"confEditorFilename\"\n translate\n >\n Filename\n </label>\n <input\n class=\"form-control\"\n id=\"confEditorFilename\"\n placeholder=\"config.json\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"editorFilename\"\n />\n </c8y-form-group>\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n
|
|
572
|
+
], template: "<div class=\"card-header j-c-center separator flex-no-shrink p-24\">\n <i\n class=\"m-r-8\"\n [c8yIcon]=\"'gears'\"\n aria-hidden=\"true\"\n ></i>\n <h4 id=\"drawerTitle\">\n {{ drawerTitle() | translate }}\n </h4>\n</div>\n\n<form\n class=\"d-contents\"\n [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n>\n <div\n class=\"card-body inner-scroll p-24\"\n [class.d-col]=\"form.value.uploadChoice === 'editInline'\"\n >\n @if (isDeviceContext) {\n <div\n class=\"alert alert-warning fit-w max-width-100\"\n translate\n >\n Changes apply to the configuration repository and affect ongoing updates and future device\n deployments.\n </div>\n }\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confVersion\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"confVersion\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDescription\"\n translate\n >\n Description\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"confDescription\"\n placeholder=\"{{ 'e.g.' | translate }} Host configuration\"\n rows=\"1\"\n autocomplete=\"off\"\n formControlName=\"description\"\n c8y-textarea-autoresize\n ></textarea>\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confDeviceType\"\n translate\n >\n Device type\n </label>\n <input\n class=\"form-control\"\n id=\"confDeviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group class=\"col-sm-3\">\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n data-cy=\"conf-detail--configuration-type\"\n [ngModel]=\"configurationTypeMO\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"configurationTypeMO = $event\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n @let patternStr = pattern();\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"patternStr\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n @if (patternStr.length > 0) {\n <c8y-li class=\"bg-level-2 p-8\">\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n }\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n </div>\n\n <fieldset\n class=\"d-col\"\n [class.flex-grow]=\"form.value.uploadChoice === 'editInline'\"\n [class.min-height-0]=\"form.value.uploadChoice === 'editInline'\"\n >\n <legend\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </legend>\n\n @if (isExternalUrl()) {\n <p\n class=\"text-muted m-b-8\"\n translate\n >\n Content is sourced from a remote URL and cannot be edited inline.\n </p>\n <c8y-form-group>\n <label\n for=\"confFileUrl\"\n translate\n >\n File URL\n </label>\n <input\n class=\"form-control\"\n id=\"confFileUrl\"\n placeholder=\"https://...\"\n type=\"url\"\n autocomplete=\"off\"\n [ngModel]=\"binary.url\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"binary = { url: $event }; form.markAsDirty()\"\n />\n </c8y-form-group>\n } @else {\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n [allowedUploadChoices]=\"['uploadBinary', 'uploadUrl', 'editInline']\"\n [uploadChoice]=\"form.controls.uploadChoice.value\"\n (uploadChoiceChange)=\"onUploadChoiceChange($event)\"\n [fileUrl]=\"binary.url\"\n (fileUrlChange)=\"onFileUrlChange($event)\"\n [fileBinary]=\"binary.file\"\n (fileBinaryChange)=\"onFileBinaryChange($event)\"\n (textFilePicked)=\"onTextFilePicked($event)\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n >\n <ng-container c8yInlineEditor>\n <div class=\"row\">\n <c8y-form-group class=\"col-sm-9\">\n <label\n for=\"confEditorFilename\"\n translate\n >\n Filename\n </label>\n <input\n class=\"form-control\"\n id=\"confEditorFilename\"\n placeholder=\"config.json\"\n aria-required=\"true\"\n type=\"text\"\n autocomplete=\"off\"\n formControlName=\"editorFilename\"\n />\n </c8y-form-group>\n <c8y-form-group class=\"col-sm-3\">\n <label\n for=\"confEditorLanguage\"\n translate\n >\n Language\n </label>\n <c8y-select\n id=\"confEditorLanguage\"\n [ariaLabel]=\"'Editor language' | translate\"\n [items]=\"editorLanguages\"\n formControlName=\"editorLanguage\"\n ></c8y-select>\n </c8y-form-group>\n </div>\n <c8y-form-group class=\"d-col flex-grow min-height-0 m-b-0\">\n <label\n for=\"confEditorContent\"\n translate\n >\n Content\n </label>\n <c8y-editor\n class=\"flex-grow\"\n style=\"min-height: 95px\"\n id=\"confEditorContent\"\n formControlName=\"editorContent\"\n monacoEditorMarkerValidator\n [editorOptions]=\"{ language: editorLanguage() }\"\n ></c8y-editor>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </ng-container>\n </c8y-file-picker>\n }\n </fieldset>\n </div>\n\n <div class=\"card-footer j-c-between separator flex-no-shrink p-24\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving()\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [class.btn-pending]=\"saving()\"\n [title]=\"drawerTitle() | translate\"\n type=\"submit\"\n [disabled]=\"isSaveDisabled\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</form>\n" }]
|
|
573
573
|
}], ctorParameters: () => [], propDecorators: { version: [{
|
|
574
574
|
type: Input
|
|
575
575
|
}], description: [{
|