@c8y/ngx-components 1021.62.2 → 1021.62.8

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.
Files changed (73) hide show
  1. package/core/data-grid/data-grid.component.d.ts +7 -1
  2. package/core/data-grid/data-grid.component.d.ts.map +1 -1
  3. package/core/login/totp-auth.component.d.ts +1 -5
  4. package/core/login/totp-auth.component.d.ts.map +1 -1
  5. package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts +9 -3
  6. package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts.map +1 -1
  7. package/esm2022/branding/shared/lazy/branding/branding.component.mjs +2 -2
  8. package/esm2022/context-dashboard/dashboard-manager/type-dashboard-target-assets-grid/type-dashboard-target-assets-grid.component.mjs +1 -1
  9. package/esm2022/context-dashboard/dashboard-manager/type-dashboards-list/type-dashboards-list.component.mjs +1 -1
  10. package/esm2022/core/data-grid/data-grid.component.mjs +35 -16
  11. package/esm2022/core/login/totp-auth.component.mjs +2 -7
  12. package/esm2022/device-grid/device-grid.component.mjs +1 -1
  13. package/esm2022/device-profile/device-profile-list.component.mjs +1 -1
  14. package/esm2022/device-provisioned-certificates/device-tab-provisioned-certificates.component.mjs +48 -8
  15. package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +1 -1
  16. package/esm2022/files-repository/files-repository.component.mjs +1 -1
  17. package/esm2022/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.mjs +2 -2
  18. package/esm2022/repository/configuration/list/configuration-list.component.mjs +1 -1
  19. package/esm2022/repository/firmware/list/firmware-list.component.mjs +1 -1
  20. package/esm2022/repository/software/list/software-list.component.mjs +1 -1
  21. package/esm2022/search/search-grid.component.mjs +1 -1
  22. package/esm2022/services/services-device-tab/services-device-tab.component.mjs +1 -1
  23. package/esm2022/sub-assets/sub-assets-grid.component.mjs +1 -1
  24. package/esm2022/tenants/tenant-list/tenant-list.component.mjs +1 -1
  25. package/esm2022/translation-editor/lazy/translation-editor/translation-editor.component.mjs +2 -2
  26. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +1 -1
  27. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  28. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -2
  29. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  30. package/fesm2022/c8y-ngx-components-device-grid.mjs +1 -1
  31. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  32. package/fesm2022/c8y-ngx-components-device-profile.mjs +1 -1
  33. package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
  34. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +48 -8
  35. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
  36. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +1 -1
  37. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  38. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1 -1
  39. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-files-repository.mjs +1 -1
  41. package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +1 -1
  43. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
  44. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
  45. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  46. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +1 -1
  47. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  48. package/fesm2022/c8y-ngx-components-repository-software.mjs +1 -1
  49. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-search.mjs +1 -1
  51. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-services.mjs +1 -1
  53. package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-sub-assets.mjs +1 -1
  55. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-tenants.mjs +1 -1
  57. package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +1 -1
  59. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
  60. package/fesm2022/c8y-ngx-components.mjs +35 -21
  61. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  62. package/locales/de.po +0 -3
  63. package/locales/es.po +2 -4
  64. package/locales/fr.po +0 -3
  65. package/locales/ja_JP.po +0 -3
  66. package/locales/ko.po +0 -3
  67. package/locales/locales.pot +0 -3
  68. package/locales/nl.po +0 -3
  69. package/locales/pl.po +0 -3
  70. package/locales/pt_BR.po +0 -3
  71. package/locales/zh_CN.po +0 -3
  72. package/locales/zh_TW.po +0 -3
  73. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, NgModule } from '@angular/core';
3
3
  import * as i1$1 from '@c8y/ngx-components';
4
- import { PX_ACTIONS, gettext, Status, CoreModule, hookRoute, ViewContext } from '@c8y/ngx-components';
4
+ import { gettext, PX_ACTIONS, Status, CoreModule, hookRoute, ViewContext } from '@c8y/ngx-components';
5
5
  import { PopoverModule } from 'ngx-bootstrap/popover';
6
6
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
7
7
  import { ButtonsModule } from 'ngx-bootstrap/buttons';
@@ -78,18 +78,58 @@ class DeviceTabProvisionedCertificatesComponent {
78
78
  this.route = route;
79
79
  this.translateService = translateService;
80
80
  this.reloading = false;
81
- this.reload = new BehaviorSubject(null);
82
- this.provisionedCertificates = this.reload.pipe(tap(() => {
81
+ this.reload$ = new BehaviorSubject(null);
82
+ this.tableTitle = gettext('Provisioned certificates');
83
+ this.columns = [
84
+ {
85
+ name: 'serialNumber',
86
+ path: 'serialNumber',
87
+ header: gettext('Serial number')
88
+ },
89
+ {
90
+ name: 'validTill',
91
+ path: 'validTill',
92
+ header: gettext('Expiration date')
93
+ }
94
+ ];
95
+ this.rows$ = this.reload$.pipe(tap(() => {
83
96
  this.reloading = true;
84
- }), map(() => this.route.snapshot.parent.data.contextData), switchMap(device => this.deviceSerialsService.getDeviceProvisionedCertificates(device)), tap(() => {
97
+ }), map(() => this.route.snapshot.parent.data.contextData), switchMap(device => this.deviceSerialsService.getDeviceProvisionedCertificates(device)), map(provisionedCertificates => provisionedCertificates.map(cert => ({
98
+ ...cert,
99
+ id: cert.serialNumber
100
+ }))), tap(() => {
85
101
  this.reloading = false;
86
102
  }), shareReplay(1), finalize(() => {
87
103
  this.reloading = false;
88
104
  }));
105
+ this.pagination = {
106
+ pageSize: 20,
107
+ currentPage: 1
108
+ };
109
+ this.actionControls = [
110
+ {
111
+ type: 'REVOKE',
112
+ text: gettext('Revoke'),
113
+ icon: 'trash',
114
+ iconClasses: 'text-danger',
115
+ showOnHover: false,
116
+ callback: (item) => this.revokeProvisionedCertificate(item)
117
+ }
118
+ ];
119
+ this.displayOptions = {
120
+ filter: false,
121
+ striped: true,
122
+ hover: true,
123
+ bordered: false,
124
+ gridHeader: true
125
+ };
89
126
  this.PX_ACTIONS = PX_ACTIONS;
90
127
  }
91
128
  ngOnInit() {
92
- this.reload.next();
129
+ this.reload();
130
+ }
131
+ reload() {
132
+ this.reload$.next();
93
133
  }
94
134
  highlightDependingOnExpirationStatus(item) {
95
135
  const warningOffset = 24 * 60 * 60 * 1000 * 90; // 90 days
@@ -117,7 +157,7 @@ class DeviceTabProvisionedCertificatesComponent {
117
157
  this.alertService.addServerFailure(error);
118
158
  }
119
159
  finally {
120
- this.reload.next();
160
+ this.reload();
121
161
  }
122
162
  }
123
163
  }
@@ -125,11 +165,11 @@ class DeviceTabProvisionedCertificatesComponent {
125
165
  return await this.modalService.confirm(gettext('Revoke provisioned certificate'), this.translateService.instant(gettext(`You are about to revoke provisioned certificate {{ serialNumber }}. Do you want to proceed?`), { serialNumber }), Status.DANGER, { ok: gettext('Revoke'), cancel: gettext('Cancel') });
126
166
  }
127
167
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeviceTabProvisionedCertificatesComponent, deps: [{ token: i1$1.AlertService }, { token: i1$1.ModalService }, { token: DeviceProvisionedCertificatesService }, { token: i1.CrlService }, { token: i4.ActivatedRoute }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
128
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DeviceTabProvisionedCertificatesComponent, selector: "device-tab-serials-component", ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload.next()\"\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<!-- TODO: Add link to the mentioned documentation when it's available -->\n<c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(provisionedCertificates | async)?.length === 0\"\n></c8y-ui-empty-state>\n\n<div\n [ngStyle]=\"{ width: '50%' }\"\n *ngIf=\"(provisionedCertificates | async)?.length > 0\"\n>\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Provisioned certificates\n </div>\n </div>\n <div class=\"p-16\">\n <c8y-list-group class=\"m-b-24\">\n <div\n class=\"page-sticky-header hidden-xs c8y-list__item\"\n style=\"display: block !important\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-5\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Serial No.' | translate }} \"\n >\n {{ 'Serial No.' | translate }}\n </span>\n </div>\n <div class=\"col-6\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-1\"></div>\n </div>\n </div>\n </div>\n </div>\n\n <c8y-li\n *ngFor=\"let provisionedCertificate of provisionedCertificates | async; let i = index\"\n >\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-5\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Serial No.' | translate }}: {{ provisionedCertificate.serialNumber }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Serial No.\n </span>\n {{ provisionedCertificate.serialNumber }}\n </div>\n </div>\n\n <div class=\"col-6\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{\n provisionedCertificate.validTill | c8yDate\n }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Expiration date\n </span>\n <small\n *ngIf=\"provisionedCertificate.validTill\"\n [ngClass]=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <span>{{ provisionedCertificate.validTill | c8yDate }}</span>\n </small>\n </div>\n </div>\n <div class=\"col-1\">\n <button\n class=\"btn btn-dot btn-dot--danger\"\n title=\"{{ 'Revoke' | translate }}\"\n type=\"button\"\n (click)=\"revokeProvisionedCertificate(provisionedCertificate)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i1$1.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i1$1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i1$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1$1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1$1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1$1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "c8yDate" }] }); }
168
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DeviceTabProvisionedCertificatesComponent, selector: "device-tab-serials-component", ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload()\"\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-data-grid\n [title]=\"tableTitle | translate\"\n [columns]=\"columns\"\n [rows]=\"rows$ | async\"\n [pagination]=\"pagination\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n [hideReload]=\"true\"\n>\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(rows$ | async)?.length === 0\"\n ></c8y-ui-empty-state>\n\n <c8y-column name=\"serialNumber\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value }}\"\n >\n {{ context.value }}\n </span>\n </ng-container>\n </c8y-column>\n\n <c8y-column name=\"validTill\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value | c8yDate }}\"\n >\n <span\n *ngIf=\"context.value\"\n [ngClass]=\"highlightDependingOnExpirationStatus(context.item)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <span>{{ context.value | c8yDate }}</span>\n </span>\n </span>\n </ng-container>\n </c8y-column>\n</c8y-data-grid>\n", dependencies: [{ kind: "component", type: i1$1.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i1$1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CellRendererDefDirective, selector: "[c8yCellRendererDef]" }, { kind: "directive", type: i1$1.ColumnDirective, selector: "c8y-column", inputs: ["name"] }, { kind: "component", type: i1$1.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "hideReload"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "c8yDate" }] }); }
129
169
  }
130
170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeviceTabProvisionedCertificatesComponent, decorators: [{
131
171
  type: Component,
132
- args: [{ selector: 'device-tab-serials-component', template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload.next()\"\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<!-- TODO: Add link to the mentioned documentation when it's available -->\n<c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(provisionedCertificates | async)?.length === 0\"\n></c8y-ui-empty-state>\n\n<div\n [ngStyle]=\"{ width: '50%' }\"\n *ngIf=\"(provisionedCertificates | async)?.length > 0\"\n>\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Provisioned certificates\n </div>\n </div>\n <div class=\"p-16\">\n <c8y-list-group class=\"m-b-24\">\n <div\n class=\"page-sticky-header hidden-xs c8y-list__item\"\n style=\"display: block !important\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-5\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Serial No.' | translate }} \"\n >\n {{ 'Serial No.' | translate }}\n </span>\n </div>\n <div class=\"col-6\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-1\"></div>\n </div>\n </div>\n </div>\n </div>\n\n <c8y-li\n *ngFor=\"let provisionedCertificate of provisionedCertificates | async; let i = index\"\n >\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-5\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Serial No.' | translate }}: {{ provisionedCertificate.serialNumber }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Serial No.\n </span>\n {{ provisionedCertificate.serialNumber }}\n </div>\n </div>\n\n <div class=\"col-6\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{\n provisionedCertificate.validTill | c8yDate\n }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Expiration date\n </span>\n <small\n *ngIf=\"provisionedCertificate.validTill\"\n [ngClass]=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <span>{{ provisionedCertificate.validTill | c8yDate }}</span>\n </small>\n </div>\n </div>\n <div class=\"col-1\">\n <button\n class=\"btn btn-dot btn-dot--danger\"\n title=\"{{ 'Revoke' | translate }}\"\n type=\"button\"\n (click)=\"revokeProvisionedCertificate(provisionedCertificate)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n </div>\n</div>\n" }]
172
+ args: [{ selector: 'device-tab-serials-component', template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload()\"\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-data-grid\n [title]=\"tableTitle | translate\"\n [columns]=\"columns\"\n [rows]=\"rows$ | async\"\n [pagination]=\"pagination\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n [hideReload]=\"true\"\n>\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(rows$ | async)?.length === 0\"\n ></c8y-ui-empty-state>\n\n <c8y-column name=\"serialNumber\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value }}\"\n >\n {{ context.value }}\n </span>\n </ng-container>\n </c8y-column>\n\n <c8y-column name=\"validTill\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value | c8yDate }}\"\n >\n <span\n *ngIf=\"context.value\"\n [ngClass]=\"highlightDependingOnExpirationStatus(context.item)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <span>{{ context.value | c8yDate }}</span>\n </span>\n </span>\n </ng-container>\n </c8y-column>\n</c8y-data-grid>\n" }]
133
173
  }], ctorParameters: () => [{ type: i1$1.AlertService }, { type: i1$1.ModalService }, { type: DeviceProvisionedCertificatesService }, { type: i1.CrlService }, { type: i4.ActivatedRoute }, { type: i5.TranslateService }] });
134
174
 
135
175
  class DeviceProvisionedCertificatesModule {
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-device-provisioned-certificates.mjs","sources":["../../device-provisioned-certificates/device-provisioned-certificates.service.ts","../../device-provisioned-certificates/device-provisioned-certificates.guard.ts","../../device-provisioned-certificates/device-tab-provisioned-certificates.component.ts","../../device-provisioned-certificates/device-tab-provisioned-certificates.component.html","../../device-provisioned-certificates/device-provisioned-certificates.module.ts","../../device-provisioned-certificates/c8y-ngx-components-device-provisioned-certificates.ts"],"sourcesContent":["import { FetchClient, IManagedObject, UserService } from '@c8y/client';\nimport { Injectable } from '@angular/core';\nimport { ProvisionedCertificate } from './device-tab-provisioned-certificates.component';\n\n@Injectable()\nexport class DeviceProvisionedCertificatesService {\n constructor(\n private userService: UserService,\n private client: FetchClient\n ) {}\n\n async getDeviceProvisionedCertificates(\n device: IManagedObject\n ): Promise<ProvisionedCertificate[] | undefined> {\n const deviceUserName = await this.getDeviceUserName(device);\n\n // Avoid additional requests if the device does not have a user.\n // This case does not really occur in real-life scenarios, but e.g. in cypress tests only\n if (!deviceUserName) {\n return undefined;\n }\n\n const { data } = await this.userService.detail(deviceUserName, { withCertificates: true });\n return data.provisionedCertificates;\n }\n\n private async getDeviceUserName(device): Promise<string> {\n const method = 'GET';\n const url = `/inventory/managedObjects/${device.id}/user`;\n const res = await this.client.fetch(url, { method });\n const data = await res.json();\n if (res.status >= 400) {\n throw new Error(data.message);\n }\n return data.userName;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\nimport { ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class DeviceProvisionedCertificatesGuard {\n constructor(private deviceProvisionedCertificatesService: DeviceProvisionedCertificatesService) {}\n\n async canActivate(route: ActivatedRouteSnapshot) {\n const contextData = route.data.contextData || route.parent.data.contextData;\n if (!contextData) {\n return false;\n }\n try {\n const provisionedCertificates =\n await this.deviceProvisionedCertificatesService.getDeviceProvisionedCertificates(\n contextData\n );\n return provisionedCertificates?.length > 0;\n } catch (error) {\n return false;\n }\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { AlertService, gettext, ModalService, PX_ACTIONS, Status } from '@c8y/ngx-components';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { CrlService, IManagedObject } from '@c8y/client';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { switchMap, map, tap, finalize, shareReplay } from 'rxjs/operators';\nimport { TranslateService } from '@ngx-translate/core';\n\nexport type ProvisionedCertificate = { serialNumber: string; validTill: string };\n\n@Component({\n selector: 'device-tab-serials-component',\n templateUrl: './device-tab-provisioned-certificates.component.html'\n})\nexport class DeviceTabProvisionedCertificatesComponent implements OnInit {\n reloading = false;\n reload: BehaviorSubject<void> = new BehaviorSubject(null);\n provisionedCertificates: Observable<ProvisionedCertificate[]> = this.reload.pipe(\n tap(() => {\n this.reloading = true;\n }),\n map(() => this.route.snapshot.parent.data.contextData as IManagedObject),\n switchMap(device => this.deviceSerialsService.getDeviceProvisionedCertificates(device)),\n tap(() => {\n this.reloading = false;\n }),\n shareReplay(1),\n finalize(() => {\n this.reloading = false;\n })\n );\n\n protected readonly PX_ACTIONS = PX_ACTIONS;\n\n constructor(\n private alertService: AlertService,\n private modalService: ModalService,\n private deviceSerialsService: DeviceProvisionedCertificatesService,\n private crlService: CrlService,\n private route: ActivatedRoute,\n private translateService: TranslateService\n ) {}\n\n ngOnInit(): void {\n this.reload.next();\n }\n\n highlightDependingOnExpirationStatus(item: ProvisionedCertificate) {\n const warningOffset = 24 * 60 * 60 * 1000 * 90; // 90 days\n const todayTimestamp = new Date().getTime();\n const warningTimestamp = new Date().getTime() + warningOffset;\n const notAfterTimestamp = new Date(item.validTill).getTime();\n const expired = notAfterTimestamp < todayTimestamp;\n const expiresInLessThan90Days = notAfterTimestamp < warningTimestamp;\n if (expired) {\n return 'text-danger';\n }\n if (expiresInLessThan90Days) {\n return 'text-warning';\n }\n return '';\n }\n\n async revokeProvisionedCertificate(provisionedCertificate: ProvisionedCertificate) {\n if (provisionedCertificate) {\n try {\n const serialNumberInHex = provisionedCertificate.serialNumber;\n await this.confirmRevocation(serialNumberInHex);\n await this.crlService.uploadCrls([{ serialNumberInHex }]);\n } catch (error) {\n this.alertService.addServerFailure(error);\n } finally {\n this.reload.next();\n }\n }\n }\n\n private async confirmRevocation(serialNumber: string) {\n return await this.modalService.confirm(\n gettext('Revoke provisioned certificate'),\n this.translateService.instant(\n gettext(\n `You are about to revoke provisioned certificate {{ serialNumber }}. Do you want to proceed?`\n ),\n { serialNumber }\n ),\n Status.DANGER,\n { ok: gettext('Revoke'), cancel: gettext('Cancel') }\n );\n }\n}\n","<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload.next()\"\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<!-- TODO: Add link to the mentioned documentation when it's available -->\n<c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(provisionedCertificates | async)?.length === 0\"\n></c8y-ui-empty-state>\n\n<div\n [ngStyle]=\"{ width: '50%' }\"\n *ngIf=\"(provisionedCertificates | async)?.length > 0\"\n>\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Provisioned certificates\n </div>\n </div>\n <div class=\"p-16\">\n <c8y-list-group class=\"m-b-24\">\n <div\n class=\"page-sticky-header hidden-xs c8y-list__item\"\n style=\"display: block !important\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-5\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Serial No.' | translate }} \"\n >\n {{ 'Serial No.' | translate }}\n </span>\n </div>\n <div class=\"col-6\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-1\"></div>\n </div>\n </div>\n </div>\n </div>\n\n <c8y-li\n *ngFor=\"let provisionedCertificate of provisionedCertificates | async; let i = index\"\n >\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-5\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Serial No.' | translate }}: {{ provisionedCertificate.serialNumber }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Serial No.\n </span>\n {{ provisionedCertificate.serialNumber }}\n </div>\n </div>\n\n <div class=\"col-6\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{\n provisionedCertificate.validTill | c8yDate\n }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Expiration date\n </span>\n <small\n *ngIf=\"provisionedCertificate.validTill\"\n [ngClass]=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(provisionedCertificate)\"\n ></i>\n <span>{{ provisionedCertificate.validTill | c8yDate }}</span>\n </small>\n </div>\n </div>\n <div class=\"col-1\">\n <button\n class=\"btn btn-dot btn-dot--danger\"\n title=\"{{ 'Revoke' | translate }}\"\n type=\"button\"\n (click)=\"revokeProvisionedCertificate(provisionedCertificate)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule, hookRoute, gettext, ViewContext } from '@c8y/ngx-components';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { ButtonsModule } from 'ngx-bootstrap/buttons';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DeviceProvisionedCertificatesGuard } from './device-provisioned-certificates.guard';\nimport { DeviceTabProvisionedCertificatesComponent } from './device-tab-provisioned-certificates.component';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\n\n@NgModule({\n declarations: [DeviceTabProvisionedCertificatesComponent],\n exports: [],\n imports: [CoreModule, TooltipModule, ReactiveFormsModule, ButtonsModule, PopoverModule],\n providers: [\n hookRoute([\n {\n context: ViewContext.Device,\n path: 'device-provisioned-certificates',\n component: DeviceTabProvisionedCertificatesComponent,\n label: gettext('x509'),\n icon: 'c8y-device-profile',\n canActivate: [DeviceProvisionedCertificatesGuard]\n }\n ]),\n DeviceProvisionedCertificatesService,\n DeviceProvisionedCertificatesGuard\n ]\n})\nexport class DeviceProvisionedCertificatesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DeviceProvisionedCertificatesService","i1","i2.DeviceProvisionedCertificatesService","i3"],"mappings":";;;;;;;;;;;;;;;MAKa,oCAAoC,CAAA;IAC/C,WACU,CAAA,WAAwB,EACxB,MAAmB,EAAA;QADnB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;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A,SAAS,EAAE;AACT,wBAAA,SAAS,CAAC;AACR,4BAAA;gCACE,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,gCAAA,IAAI,EAAE,iCAAiC;AACvC,gCAAA,SAAS,EAAE,yCAAyC;AACpD,gCAAA,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC;AACtB,gCAAA,IAAI,EAAE,oBAAoB;gCAC1B,WAAW,EAAE,CAAC,kCAAkC,CAAC;AAClD,6BAAA;yBACF,CAAC;wBACF,oCAAoC;wBACpC,kCAAkC;AACnC,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-device-provisioned-certificates.mjs","sources":["../../device-provisioned-certificates/device-provisioned-certificates.service.ts","../../device-provisioned-certificates/device-provisioned-certificates.guard.ts","../../device-provisioned-certificates/device-tab-provisioned-certificates.component.ts","../../device-provisioned-certificates/device-tab-provisioned-certificates.component.html","../../device-provisioned-certificates/device-provisioned-certificates.module.ts","../../device-provisioned-certificates/c8y-ngx-components-device-provisioned-certificates.ts"],"sourcesContent":["import { FetchClient, IManagedObject, UserService } from '@c8y/client';\nimport { Injectable } from '@angular/core';\nimport { ProvisionedCertificate } from './device-tab-provisioned-certificates.component';\n\n@Injectable()\nexport class DeviceProvisionedCertificatesService {\n constructor(\n private userService: UserService,\n private client: FetchClient\n ) {}\n\n async getDeviceProvisionedCertificates(\n device: IManagedObject\n ): Promise<ProvisionedCertificate[] | undefined> {\n const deviceUserName = await this.getDeviceUserName(device);\n\n // Avoid additional requests if the device does not have a user.\n // This case does not really occur in real-life scenarios, but e.g. in cypress tests only\n if (!deviceUserName) {\n return undefined;\n }\n\n const { data } = await this.userService.detail(deviceUserName, { withCertificates: true });\n return data.provisionedCertificates;\n }\n\n private async getDeviceUserName(device): Promise<string> {\n const method = 'GET';\n const url = `/inventory/managedObjects/${device.id}/user`;\n const res = await this.client.fetch(url, { method });\n const data = await res.json();\n if (res.status >= 400) {\n throw new Error(data.message);\n }\n return data.userName;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\nimport { ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class DeviceProvisionedCertificatesGuard {\n constructor(private deviceProvisionedCertificatesService: DeviceProvisionedCertificatesService) {}\n\n async canActivate(route: ActivatedRouteSnapshot) {\n const contextData = route.data.contextData || route.parent.data.contextData;\n if (!contextData) {\n return false;\n }\n try {\n const provisionedCertificates =\n await this.deviceProvisionedCertificatesService.getDeviceProvisionedCertificates(\n contextData\n );\n return provisionedCertificates?.length > 0;\n } catch (error) {\n return false;\n }\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport {\n ActionControl,\n AlertService,\n Column,\n DisplayOptions,\n gettext,\n ModalService,\n Pagination,\n PX_ACTIONS,\n Row,\n Status\n} from '@c8y/ngx-components';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { CrlService, IManagedObject } from '@c8y/client';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { switchMap, map, tap, finalize, shareReplay } from 'rxjs/operators';\nimport { TranslateService } from '@ngx-translate/core';\n\nexport type ProvisionedCertificate = { serialNumber: string; validTill: string };\n\n@Component({\n selector: 'device-tab-serials-component',\n templateUrl: './device-tab-provisioned-certificates.component.html'\n})\nexport class DeviceTabProvisionedCertificatesComponent implements OnInit {\n reloading = false;\n reload$: BehaviorSubject<void> = new BehaviorSubject(null);\n\n tableTitle = gettext('Provisioned certificates');\n columns: Column[] = [\n {\n name: 'serialNumber',\n path: 'serialNumber',\n header: gettext('Serial number')\n },\n {\n name: 'validTill',\n path: 'validTill',\n header: gettext('Expiration date')\n }\n ];\n rows$: Observable<Array<Row & ProvisionedCertificate>> = this.reload$.pipe(\n tap(() => {\n this.reloading = true;\n }),\n map(() => this.route.snapshot.parent.data.contextData as IManagedObject),\n switchMap(device => this.deviceSerialsService.getDeviceProvisionedCertificates(device)),\n map(provisionedCertificates =>\n provisionedCertificates.map(cert => ({\n ...cert,\n id: cert.serialNumber\n }))\n ),\n tap(() => {\n this.reloading = false;\n }),\n shareReplay(1),\n finalize(() => {\n this.reloading = false;\n })\n );\n pagination: Pagination = {\n pageSize: 20,\n currentPage: 1\n };\n actionControls: ActionControl[] = [\n {\n type: 'REVOKE',\n text: gettext('Revoke'),\n icon: 'trash',\n iconClasses: 'text-danger',\n showOnHover: false,\n callback: (item: Row & ProvisionedCertificate) => this.revokeProvisionedCertificate(item)\n }\n ];\n displayOptions: DisplayOptions = {\n filter: false,\n striped: true,\n hover: true,\n bordered: false,\n gridHeader: true\n };\n\n protected readonly PX_ACTIONS = PX_ACTIONS;\n\n constructor(\n private alertService: AlertService,\n private modalService: ModalService,\n private deviceSerialsService: DeviceProvisionedCertificatesService,\n private crlService: CrlService,\n private route: ActivatedRoute,\n private translateService: TranslateService\n ) {}\n\n ngOnInit(): void {\n this.reload();\n }\n\n reload() {\n this.reload$.next();\n }\n\n highlightDependingOnExpirationStatus(item: ProvisionedCertificate) {\n const warningOffset = 24 * 60 * 60 * 1000 * 90; // 90 days\n const todayTimestamp = new Date().getTime();\n const warningTimestamp = new Date().getTime() + warningOffset;\n const notAfterTimestamp = new Date(item.validTill).getTime();\n const expired = notAfterTimestamp < todayTimestamp;\n const expiresInLessThan90Days = notAfterTimestamp < warningTimestamp;\n if (expired) {\n return 'text-danger';\n }\n if (expiresInLessThan90Days) {\n return 'text-warning';\n }\n return '';\n }\n\n async revokeProvisionedCertificate(provisionedCertificate: ProvisionedCertificate) {\n if (provisionedCertificate) {\n try {\n const serialNumberInHex = provisionedCertificate.serialNumber;\n await this.confirmRevocation(serialNumberInHex);\n await this.crlService.uploadCrls([{ serialNumberInHex }]);\n } catch (error) {\n this.alertService.addServerFailure(error);\n } finally {\n this.reload();\n }\n }\n }\n\n private async confirmRevocation(serialNumber: string) {\n return await this.modalService.confirm(\n gettext('Revoke provisioned certificate'),\n this.translateService.instant(\n gettext(\n `You are about to revoke provisioned certificate {{ serialNumber }}. Do you want to proceed?`\n ),\n { serialNumber }\n ),\n Status.DANGER,\n { ok: gettext('Revoke'), cancel: gettext('Cancel') }\n );\n }\n}\n","<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"reload()\"\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-data-grid\n [title]=\"tableTitle | translate\"\n [columns]=\"columns\"\n [rows]=\"rows$ | async\"\n [pagination]=\"pagination\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n [hideReload]=\"true\"\n>\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No provisioned certificates to display.' | translate\"\n *ngIf=\"(rows$ | async)?.length === 0\"\n ></c8y-ui-empty-state>\n\n <c8y-column name=\"serialNumber\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value }}\"\n >\n {{ context.value }}\n </span>\n </ng-container>\n </c8y-column>\n\n <c8y-column name=\"validTill\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"text-truncate\"\n title=\"{{ context.property.header | translate }}: {{ context.value | c8yDate }}\"\n >\n <span\n *ngIf=\"context.value\"\n [ngClass]=\"highlightDependingOnExpirationStatus(context.item)\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"calendar\"\n *ngIf=\"!highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"warning\"\n *ngIf=\"highlightDependingOnExpirationStatus(context.item)\"\n ></i>\n <span>{{ context.value | c8yDate }}</span>\n </span>\n </span>\n </ng-container>\n </c8y-column>\n</c8y-data-grid>\n","import { NgModule } from '@angular/core';\nimport { CoreModule, hookRoute, gettext, ViewContext } from '@c8y/ngx-components';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { ButtonsModule } from 'ngx-bootstrap/buttons';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DeviceProvisionedCertificatesGuard } from './device-provisioned-certificates.guard';\nimport { DeviceTabProvisionedCertificatesComponent } from './device-tab-provisioned-certificates.component';\nimport { DeviceProvisionedCertificatesService } from './device-provisioned-certificates.service';\n\n@NgModule({\n declarations: [DeviceTabProvisionedCertificatesComponent],\n exports: [],\n imports: [CoreModule, TooltipModule, ReactiveFormsModule, ButtonsModule, PopoverModule],\n providers: [\n hookRoute([\n {\n context: ViewContext.Device,\n path: 'device-provisioned-certificates',\n component: DeviceTabProvisionedCertificatesComponent,\n label: gettext('x509'),\n icon: 'c8y-device-profile',\n canActivate: [DeviceProvisionedCertificatesGuard]\n }\n ]),\n DeviceProvisionedCertificatesService,\n DeviceProvisionedCertificatesGuard\n ]\n})\nexport class DeviceProvisionedCertificatesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DeviceProvisionedCertificatesService","i1","i2.DeviceProvisionedCertificatesService","i3"],"mappings":";;;;;;;;;;;;;;;MAKa,oCAAoC,CAAA;IAC/C,WACU,CAAA,WAAwB,EACxB,MAAmB,EAAA;QADnB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAa;KACzB;IAEJ,MAAM,gCAAgC,CACpC,MAAsB,EAAA;QAEtB,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;;;QAI5D,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,OAAO,SAAS,CAAC;SAClB;AAED,QAAA,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAA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,kCAAkC;AACnC,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -1047,7 +1047,7 @@ class ApplicationPluginsComponent {
1047
1047
  });
1048
1048
  }
1049
1049
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApplicationPluginsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
1050
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: { appId: "appId" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: DataGridComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/application/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"!(isStandard$ | async)\"\n>\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reset to default plugins' | translate }}\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n (click)=\"resetToDefault()\"\n >\n <i c8yIcon=\"undo\"></i>\n {{ 'Reset to default' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item\n *ngIf=\"orphanedPlugins?.length\"\n [placement]=\"'right'\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n class=\"d-contents\"\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'plugin'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n translate\n >\n Install plugins\n </button>\n </p>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] }); }
1050
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: { appId: "appId" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: DataGridComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/application/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"!(isStandard$ | async)\"\n>\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reset to default plugins' | translate }}\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n (click)=\"resetToDefault()\"\n >\n <i c8yIcon=\"undo\"></i>\n {{ 'Reset to default' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item\n *ngIf=\"orphanedPlugins?.length\"\n [placement]=\"'right'\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n class=\"d-contents\"\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'plugin'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n translate\n >\n Install plugins\n </button>\n </p>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "hideReload"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] }); }
1051
1051
  }
1052
1052
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApplicationPluginsComponent, decorators: [{
1053
1053
  type: Component,