@c8y/ngx-components 1023.17.19 → 1023.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/auth-configuration/index.d.ts +4 -2
  2. package/auth-configuration/index.d.ts.map +1 -1
  3. package/datapoint-explorer/view/index.d.ts.map +1 -1
  4. package/echart/index.d.ts +3 -0
  5. package/echart/index.d.ts.map +1 -1
  6. package/echart/models/index.d.ts +3 -0
  7. package/echart/models/index.d.ts.map +1 -1
  8. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +25 -17
  9. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  10. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +4 -2
  11. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  12. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-echart.mjs +98 -59
  14. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs +2 -2
  16. package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-icon-selector.mjs +7 -8
  18. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +2 -3
  20. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +7 -9
  22. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +6 -8
  24. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-repository-software.mjs +6 -8
  26. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-tenants.mjs +2 -2
  28. package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +9 -4
  30. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +4 -2
  32. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +6 -6
  34. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +5 -4
  36. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +5 -5
  38. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
  39. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +2 -3
  40. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components.mjs +15 -12
  42. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  43. package/icon-selector/index.d.ts.map +1 -1
  44. package/index.d.ts.map +1 -1
  45. package/locales/de.po +42 -31
  46. package/locales/es.po +45 -28
  47. package/locales/fr.po +45 -31
  48. package/locales/ja_JP.po +38 -31
  49. package/locales/ko.po +42 -31
  50. package/locales/locales.pot +42 -24
  51. package/locales/nl.po +45 -27
  52. package/locales/pl.po +44 -28
  53. package/locales/pt_BR.po +45 -28
  54. package/locales/zh_CN.po +46 -31
  55. package/locales/zh_TW.po +46 -31
  56. package/operations/stepper-bulk-type-firmware/index.d.ts.map +1 -1
  57. package/operations/stepper-bulk-type-software/index.d.ts.map +1 -1
  58. package/package.json +1 -1
  59. package/repository/firmware/index.d.ts.map +1 -1
  60. package/repository/software/index.d.ts.map +1 -1
  61. package/trusted-certificates/index.d.ts.map +1 -1
  62. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
  63. package/widgets/implementations/datapoints-table/index.d.ts +1 -1
  64. package/widgets/implementations/info-gauge/index.d.ts.map +1 -1
@@ -564,6 +564,7 @@ class TrustedCertificateListComponent {
564
564
  getExpirationHighlight(item) {
565
565
  const now = Date.now();
566
566
  const notAfter = new Date(item.notAfter).getTime();
567
+ const twoYears = 2 * 365 * 24 * 60 * 60 * 1000;
567
568
  const oneAndHalfYear = 1.5 * 365 * 24 * 60 * 60 * 1000;
568
569
  const oneYear = 365 * 24 * 60 * 60 * 1000;
569
570
  const ninetyDays = 90 * 24 * 60 * 60 * 1000;
@@ -595,7 +596,12 @@ class TrustedCertificateListComponent {
595
596
  result.textClass = 'text-info';
596
597
  result.tooltipText = gettext('Certificate expires in less than 1.5 year');
597
598
  }
598
- if (item.tenantCertificateAuthority && notAfter < now + oneAndHalfYear) {
599
+ else if (item.tenantCertificateAuthority && notAfter < now + twoYears) {
600
+ result.icon = 'info';
601
+ result.textClass = 'text-info';
602
+ result.tooltipText = gettext('Certificate expires in less than 2 years');
603
+ }
604
+ if (item.tenantCertificateAuthority && notAfter < now + twoYears) {
599
605
  result.renewable = true;
600
606
  }
601
607
  return result;
@@ -676,7 +682,7 @@ class TrustedCertificateListComponent {
676
682
  this.certificateAuthorityFeatureEnabled = await firstValueFrom(this.featureCacheService.getFeatureState('certificate-authority'));
677
683
  }
678
684
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TrustedCertificateListComponent, deps: [{ token: i1$1.BsModalService }, { token: i2.AlertService }, { token: i2$1.TrustedCertificateService }, { token: i2.ModalService }, { token: i4$1.TranslateService }, { token: i2.ClipboardService }, { token: i2.GainsightService }, { token: i2$1.SystemOptionsService }, { token: i2.FeatureCacheService }, { token: TrustedCertificatesGuard }], target: i0.ɵɵFactoryTarget.Component }); }
679
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: TrustedCertificateListComponent, isStandalone: true, selector: "c8y-trusted-certificates", ngImport: i0, template: "<div *ngIf=\"(hasReadRole$ | async) || (hasAdminRole$ | async)\">\n <c8y-title>{{ 'Trusted certificates' | translate }}</c8y-title>\n\n <c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"certificate\"\n label=\"{{ 'Trusted certificates' | translate }}\"\n ></c8y-breadcrumb-item>\n </c8y-breadcrumb>\n\n <c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"certificateAuthorityFeatureEnabled\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add CA certificate' | translate }}\"\n type=\"button\"\n [disabled]=\"!(hasAdminRole$ | async) || certificateAuthorityExists\"\n (click)=\"addCACertificate()\"\n >\n <i c8yIcon=\"contract\"></i>\n {{ 'Add CA certificate' | translate }}\n </button>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections. Only one certificate is allowed, which is why the button is disabled.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n *ngIf=\"certificateAuthorityExists\"\n ></button>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n *ngIf=\"!certificateAuthorityExists\"\n ></button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add trusted certificate' | 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=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadTrustedCertificates()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading | async }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n </c8y-action-bar-item>\n\n <c8y-help\n src=\"/docs/device-certificate-authentication/managing-trusted-certificates/#managing-trusted-certificates\"\n ></c8y-help>\n\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No trusted certificates to display.' | translate\"\n [subtitle]=\"'Add your first certificate by clicking below.' | translate\"\n *ngIf=\"(trustedCertificates | async)?.data.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n >\n {{ 'Add trusted certificate' | translate }}\n </button>\n </c8y-ui-empty-state>\n\n <c8y-list-group class=\"m-b-24\">\n <div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list__item--empty-actions\"\n *ngIf=\"(trustedCertificates | async)?.data.length > 0\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i\n class=\"invisible\"\n c8yIcon=\"certificate\"\n ></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Certificate' | translate }} \"\n >\n {{ 'Certificate' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Status' | translate }}\"\n >\n {{ 'Status' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}\"\n >\n {{ 'Algorithm' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Auto registration' | translate }}\"\n >\n {{ 'Auto registration' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Proof of possession' | translate }}\"\n >\n {{ 'Proof of possession' | translate }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"c8y-list__item__actions\"></div>\n </div>\n </div>\n\n <c8y-li\n *c8yFor=\"\n let trustedCertificate of trustedCertificates | async;\n let i = index;\n pipe: sortByExpirationDateAsc;\n loadMore: 'none'\n \"\n #listItem\n data-cy=\"c8y-trusted-certificates-list--item-block\"\n >\n <c8y-li-icon>\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'Certificate' | translate }}\"\n tooltip=\"{{ 'Certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n *ngIf=\"!trustedCertificate.tenantCertificateAuthority\"\n >\n <i c8yIcon=\"certificate\"></i>\n </button>\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'CA certificate' | translate }}\"\n tooltip=\"{{ 'CA certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n *ngIf=\"trustedCertificate.tenantCertificateAuthority\"\n >\n <i c8yIcon=\"contract\"></i>\n </button>\n </c8y-li-icon>\n\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n <button\n class=\"btn-clean text-truncate\"\n title=\"{{ trustedCertificate.name }}\"\n type=\"button\"\n (click)=\"listItem.toggleCollapsed()\"\n >\n {{ trustedCertificate.name }}\n </button>\n </div>\n <div class=\"col-2\">\n <div class=\"visible-xs p-8\"></div>\n <button\n class=\"btn c8y-btn-checkbox--inline\"\n name=\"certificateStatus\"\n type=\"button\"\n [(ngModel)]=\"trustedCertificate.status\"\n btnCheckbox\n btnCheckboxTrue=\"ENABLED\"\n btnCheckboxFalse=\"DISABLED\"\n (ngModelChange)=\"updateCertificate(trustedCertificate, { status: $event })\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <small\n title=\"{{ 'Disabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'DISABLED'\"\n >\n {{ 'Disabled`trusted certificate status`' | translate }}\n </small>\n <small\n title=\"{{ 'Enabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'ENABLED'\"\n >\n {{ 'Enabled`trusted certificate status`' | translate }}\n </small>\n </button>\n <div class=\"visible-xs p-8\"></div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}: {{ trustedCertificate.algorithmName }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Algorithm\n </span>\n {{ trustedCertificate.algorithmName }}\n </div>\n </div>\n\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{ trustedCertificate.notAfter | c8yDate }}\"\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 @let expirationHighlight = getExpirationHighlight(trustedCertificate);\n <span>\n <small\n [attr.title]=\"expirationHighlight?.tooltipText\"\n [ngClass]=\"expirationHighlight?.textClass\"\n >\n <ng-container *ngIf=\"expirationHighlight?.expired; else notExpiredYet\">\n <del>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </del>\n </ng-container>\n <ng-template #notExpiredYet>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </ng-template>\n <ng-template #expirationDateTpl>\n <i\n class=\"m-r-4\"\n c8yIcon=\"{{ expirationHighlight?.icon }}\"\n *ngIf=\"expirationHighlight?.icon\"\n ></i>\n <span>{{ trustedCertificate.notAfter | c8yDate }}</span>\n </ng-template>\n </small>\n <button\n class=\"btn btn-link btn-icon\"\n title=\"{{ 'Renew certificate' | translate }}\"\n type=\"button\"\n *ngIf=\"expirationHighlight?.renewable\"\n (click)=\"renewCertificate()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Auto registration' | translate }}\n </span>\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Enabled`auto registration`' | translate\n }}\"\n *ngIf=\"trustedCertificate.autoRegistrationEnabled\"\n >\n {{ 'Enabled`auto registration`' | translate }}\n </span>\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Disabled`auto registration`' | translate\n }}\"\n *ngIf=\"!trustedCertificate.autoRegistrationEnabled\"\n >\n {{ 'Disabled`auto registration`' | translate }}\n </span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n </div>\n <div class=\"col-2 d-flex\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Proof of possession' | translate }}\n </span>\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{ 'N/A' | translate }}\"\n *ngIf=\"trustedCertificate.tenantCertificateAuthority\"\n >\n {{ 'N/A' | translate }}\n </span>\n <span *ngIf=\"!trustedCertificate.tenantCertificateAuthority\">\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n *ngIf=\"trustedCertificate.proofOfPossessionValid\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </div>\n </span>\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n *ngIf=\"!trustedCertificate.proofOfPossessionValid\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </div>\n </span>\n </span>\n </div>\n <button\n class=\"m-l-auto btn-dot btn-dot--danger btn showOnHover m-r-8\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificate--delete\"\n [delay]=\"500\"\n (click)=\"deleteTrustedCertificate(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div class=\"p-t-16 p-b-16\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Certificate name' | translate }}\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n type=\"text\"\n required\n data-cy=\"c8y-trusted-certificates--edit-certificate-name\"\n [(ngModel)]=\"trustedCertificate.name\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Update certificate name' | translate }}\"\n type=\"button\"\n (click)=\"\n updateCertificate(trustedCertificate, { name: trustedCertificate.name })\n \"\n [disabled]=\"!trustedCertificate.name\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-md-1\"></div>\n <div class=\"col-md-7\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"certInPemFormat\"\n translate\n >\n Certificate\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"certInPemFormat\"\n name=\"certInPemFormat\"\n type=\"text\"\n rows=\"7\"\n readonly\n [(ngModel)]=\"trustedCertificate.certInPemFormat\"\n ></textarea>\n </c8y-form-group>\n <c8y-form-group>\n <label\n class=\"c8y-checkbox\"\n title=\"{{ 'Auto registration' | translate }}\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"trustedCertificate.autoRegistrationEnabled\"\n (ngModelChange)=\"\n updateCertificate(trustedCertificate, { autoRegistrationEnabled: $event })\n \"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <span>{{ 'Auto registration' | translate }}</span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4\">\n <div\n class=\"legend form-block\"\n translate\n >\n Additional properties\n </div>\n <ul class=\"list-unstyled\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Algorithm' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.algorithmName }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Version' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.version }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Valid from' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notBefore | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Issuer' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.issuer }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Expiration date' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notAfter | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Serial number' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.serialNumber }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Subject`of a certificate`' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.subject }}\n </span>\n </li>\n </ul>\n </div>\n <div class=\"col-md-1\"></div>\n <div\n class=\"col-md-7\"\n *ngIf=\"!trustedCertificate.tenantCertificateAuthority\"\n >\n <div class=\"legend form-block\">\n {{ 'Proof of possession' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ PROOF_OF_POSSESSION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n <div *ngIf=\"trustedCertificate.proofOfPossessionValid\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </span>\n </div>\n <div *ngIf=\"!trustedCertificate.proofOfPossessionValid\">\n <div class=\"row m-b-16\">\n <div class=\"col-md-6\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </span>\n </div>\n <div class=\"col-md-6 col-lg-6 text-right-md\">\n <span class=\"text-label-small m-r-4\">\n {{ 'Verification code expires/expired on' | translate }}\n </span>\n {{\n (trustedCertificate.proofOfPossessionVerificationCodeUsableUntil | c8yDate) ||\n '---'\n }}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"unsignedVerificationCode\"\n translate\n >\n Verification code\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"unsignedVerificationCode\"\n name=\"unsignedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n readonly\n [(ngModel)]=\"trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Regenerate verification code' | translate }}\"\n type=\"button\"\n (click)=\"regenerateUnsignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n {{ 'Regenerate`verification code`' | translate }}\n </button>\n\n <button\n class=\"btn btn-sm btn-default m-l-auto m-r-0\"\n [attr.aria-label]=\"'Copy to clipboard' | translate\"\n tooltip=\"{{ 'Copy to clipboard' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--copy-to-clipboard\"\n [delay]=\"500\"\n [disabled]=\"!trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n (click)=\"copyUnsignedVerificationCodeToClipboard(trustedCertificate)\"\n >\n <i c8yIcon=\"clipboard\"></i>\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Download as file' | translate\"\n tooltip=\"{{ 'Download as file' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--download-as-file\"\n [delay]=\"500\"\n [disabled]=\"!trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n (click)=\"downloadUnsignedVerificationCode(trustedCertificate)\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.VERIFICATION_CODE.COMPONENTS.DOWNLOAD_CODE,\n action: PRODUCT_EXPERIENCE.VERIFICATION_CODE.ACTIONS.DOWNLOAD\n }\"\n >\n <i c8yIcon=\"download\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"signedVerificationCode\"\n >\n {{ 'Signed verification code' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ SIGNED_VERIFICATION_CODE_POPOVER | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--signed-verification-code-popup\"\n [outsideClick]=\"true\"\n ></button>\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"signedVerificationCode\"\n name=\"signedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n [(ngModel)]=\"trustedCertificate.signedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Verify signed verification code' | translate }}\"\n type=\"button\"\n (click)=\"verifySignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!trustedCertificate.signedVerificationCode\"\n >\n {{ 'Verify`signed verification code`' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-default m-l-auto\"\n [attr.aria-label]=\"'Upload file' | translate\"\n tooltip=\"{{ 'Upload file' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"fileInput.click()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"upload\"></i>\n </button>\n <input\n class=\"hidden\"\n type=\"file\"\n #fileInput\n (change)=\"onFileInput($event, trustedCertificate)\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-list-group>\n</div>\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { 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: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { 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: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { 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: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: ButtonCheckboxDirective, selector: "[btnCheckbox]", inputs: ["btnCheckboxTrue", "btnCheckboxFalse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.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: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
685
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TrustedCertificateListComponent, isStandalone: true, selector: "c8y-trusted-certificates", ngImport: i0, template: "@if ((hasReadRole$ | async) || (hasAdminRole$ | async)) {\n <div>\n <c8y-title>{{ 'Trusted certificates' | translate }}</c8y-title>\n\n <c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"certificate\"\n label=\"{{ 'Trusted certificates' | translate }}\"\n ></c8y-breadcrumb-item>\n </c8y-breadcrumb>\n\n @if (certificateAuthorityFeatureEnabled) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add CA certificate' | translate }}\"\n type=\"button\"\n [disabled]=\"!(hasAdminRole$ | async) || certificateAuthorityExists\"\n (click)=\"addCACertificate()\"\n >\n <i c8yIcon=\"contract\"></i>\n {{ 'Add CA certificate' | translate }}\n </button>\n @if (certificateAuthorityExists) {\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections. Only one certificate is allowed, which is why the button is disabled.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n }\n @if (!certificateAuthorityExists) {\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n }\n </c8y-action-bar-item>\n }\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add trusted certificate' | 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=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadTrustedCertificates()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading | async }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n </c8y-action-bar-item>\n\n <c8y-help\n src=\"/docs/device-certificate-authentication/managing-trusted-certificates/#managing-trusted-certificates\"\n ></c8y-help>\n\n @if ((trustedCertificates | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No trusted certificates to display.' | translate\"\n [subtitle]=\"'Add your first certificate by clicking below.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n >\n {{ 'Add trusted certificate' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n\n <c8y-list-group class=\"m-b-24\">\n @if ((trustedCertificates | async)?.data.length > 0) {\n <div class=\"page-sticky-header hidden-xs c8y-list__item c8y-list__item--empty-actions\">\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i\n class=\"invisible\"\n c8yIcon=\"certificate\"\n ></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Certificate' | translate }} \"\n >\n {{ 'Certificate' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Status' | translate }}\"\n >\n {{ 'Status' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}\"\n >\n {{ 'Algorithm' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Auto registration' | translate }}\"\n >\n {{ 'Auto registration' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Proof of possession' | translate }}\"\n >\n {{ 'Proof of possession' | translate }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"c8y-list__item__actions\"></div>\n </div>\n </div>\n }\n\n <c8y-li\n *c8yFor=\"\n let trustedCertificate of trustedCertificates | async;\n let i = index;\n pipe: sortByExpirationDateAsc;\n loadMore: 'none'\n \"\n #listItem\n data-cy=\"c8y-trusted-certificates-list--item-block\"\n >\n <c8y-li-icon>\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'Certificate' | translate }}\"\n tooltip=\"{{ 'Certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"certificate\"></i>\n </button>\n }\n @if (trustedCertificate.tenantCertificateAuthority) {\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'CA certificate' | translate }}\"\n tooltip=\"{{ 'CA certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"contract\"></i>\n </button>\n }\n </c8y-li-icon>\n\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n <button\n class=\"btn-clean text-truncate\"\n title=\"{{ trustedCertificate.name }}\"\n type=\"button\"\n (click)=\"listItem.toggleCollapsed()\"\n >\n {{ trustedCertificate.name }}\n </button>\n </div>\n <div class=\"col-2\">\n <div class=\"visible-xs p-8\"></div>\n <button\n class=\"btn c8y-btn-checkbox--inline\"\n name=\"certificateStatus\"\n type=\"button\"\n [(ngModel)]=\"trustedCertificate.status\"\n btnCheckbox\n btnCheckboxTrue=\"ENABLED\"\n btnCheckboxFalse=\"DISABLED\"\n (ngModelChange)=\"updateCertificate(trustedCertificate, { status: $event })\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <small\n title=\"{{ 'Disabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'DISABLED'\"\n >\n {{ 'Disabled`trusted certificate status`' | translate }}\n </small>\n <small\n title=\"{{ 'Enabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'ENABLED'\"\n >\n {{ 'Enabled`trusted certificate status`' | translate }}\n </small>\n </button>\n <div class=\"visible-xs p-8\"></div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}: {{ trustedCertificate.algorithmName }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Algorithm\n </span>\n {{ trustedCertificate.algorithmName }}\n </div>\n </div>\n\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{\n trustedCertificate.notAfter | 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 @let expirationHighlight = getExpirationHighlight(trustedCertificate);\n <span>\n <small\n [attr.title]=\"expirationHighlight?.tooltipText\"\n [ngClass]=\"expirationHighlight?.textClass\"\n >\n @if (expirationHighlight?.expired) {\n <del>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </del>\n } @else {\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n }\n <ng-template #expirationDateTpl>\n @if (expirationHighlight?.icon) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"{{ expirationHighlight?.icon }}\"\n ></i>\n }\n <span>{{ trustedCertificate.notAfter | c8yDate }}</span>\n </ng-template>\n </small>\n @if (expirationHighlight?.renewable) {\n <button\n class=\"btn btn-link btn-icon\"\n title=\"{{ 'Renew certificate' | translate }}\"\n type=\"button\"\n (click)=\"renewCertificate()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n }\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Auto registration' | translate }}\n </span>\n @if (trustedCertificate.autoRegistrationEnabled) {\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Enabled`auto registration`' | translate\n }}\"\n >\n {{ 'Enabled`auto registration`' | translate }}\n </span>\n }\n @if (!trustedCertificate.autoRegistrationEnabled) {\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Disabled`auto registration`' | translate\n }}\"\n >\n {{ 'Disabled`auto registration`' | translate }}\n </span>\n }\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </div>\n </div>\n <div class=\"col-2 d-flex\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Proof of possession' | translate }}\n </span>\n @if (trustedCertificate.tenantCertificateAuthority) {\n <span title=\"{{ 'Proof of possession' | translate }}: {{ 'N/A' | translate }}\">\n {{ 'N/A' | translate }}\n </span>\n }\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <span>\n @if (trustedCertificate.proofOfPossessionValid) {\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </div>\n </span>\n }\n @if (!trustedCertificate.proofOfPossessionValid) {\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </div>\n </span>\n }\n </span>\n }\n </div>\n <button\n class=\"m-l-auto btn-dot btn-dot--danger btn showOnHover m-r-8\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificate--delete\"\n [delay]=\"500\"\n (click)=\"deleteTrustedCertificate(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div class=\"p-t-16 p-b-16\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Certificate name' | translate }}\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n type=\"text\"\n required\n data-cy=\"c8y-trusted-certificates--edit-certificate-name\"\n [(ngModel)]=\"trustedCertificate.name\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Update certificate name' | translate }}\"\n type=\"button\"\n (click)=\"\n updateCertificate(trustedCertificate, { name: trustedCertificate.name })\n \"\n [disabled]=\"!trustedCertificate.name\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-md-1\"></div>\n <div class=\"col-md-7\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"certInPemFormat\"\n translate\n >\n Certificate\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"certInPemFormat\"\n name=\"certInPemFormat\"\n type=\"text\"\n rows=\"7\"\n readonly\n [(ngModel)]=\"trustedCertificate.certInPemFormat\"\n ></textarea>\n </c8y-form-group>\n <c8y-form-group>\n <label\n class=\"c8y-checkbox\"\n title=\"{{ 'Auto registration' | translate }}\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"trustedCertificate.autoRegistrationEnabled\"\n (ngModelChange)=\"\n updateCertificate(trustedCertificate, { autoRegistrationEnabled: $event })\n \"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <span>{{ 'Auto registration' | translate }}</span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4\">\n <div\n class=\"legend form-block\"\n translate\n >\n Additional properties\n </div>\n <ul class=\"list-unstyled\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Algorithm' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.algorithmName }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Version' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.version }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Valid from' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notBefore | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Issuer' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.issuer }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Expiration date' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notAfter | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Serial number' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.serialNumber }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Subject`of a certificate`' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.subject }}\n </span>\n </li>\n </ul>\n </div>\n <div class=\"col-md-1\"></div>\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <div class=\"col-md-7\">\n <div class=\"legend form-block\">\n {{ 'Proof of possession' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ PROOF_OF_POSSESSION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n @if (trustedCertificate.proofOfPossessionValid) {\n <div>\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </span>\n </div>\n }\n @if (!trustedCertificate.proofOfPossessionValid) {\n <div>\n <div class=\"row m-b-16\">\n <div class=\"col-md-6\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </span>\n </div>\n <div class=\"col-md-6 col-lg-6 text-right-md\">\n <span class=\"text-label-small m-r-4\">\n {{ 'Verification code expires/expired on' | translate }}\n </span>\n {{\n (trustedCertificate.proofOfPossessionVerificationCodeUsableUntil\n | c8yDate) || '---'\n }}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"unsignedVerificationCode\"\n translate\n >\n Verification code\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"unsignedVerificationCode\"\n name=\"unsignedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n readonly\n [(ngModel)]=\"\n trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Regenerate verification code' | translate }}\"\n type=\"button\"\n (click)=\"regenerateUnsignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n {{ 'Regenerate`verification code`' | translate }}\n </button>\n\n <button\n class=\"btn btn-sm btn-default m-l-auto m-r-0\"\n [attr.aria-label]=\"'Copy to clipboard' | translate\"\n tooltip=\"{{ 'Copy to clipboard' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--copy-to-clipboard\"\n [delay]=\"500\"\n [disabled]=\"\n !trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n (click)=\"copyUnsignedVerificationCodeToClipboard(trustedCertificate)\"\n >\n <i c8yIcon=\"clipboard\"></i>\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Download as file' | translate\"\n tooltip=\"{{ 'Download as file' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--download-as-file\"\n [delay]=\"500\"\n [disabled]=\"\n !trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n (click)=\"downloadUnsignedVerificationCode(trustedCertificate)\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component:\n PRODUCT_EXPERIENCE.VERIFICATION_CODE.COMPONENTS.DOWNLOAD_CODE,\n action: PRODUCT_EXPERIENCE.VERIFICATION_CODE.ACTIONS.DOWNLOAD\n }\"\n >\n <i c8yIcon=\"download\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"signedVerificationCode\"\n >\n {{ 'Signed verification code' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ SIGNED_VERIFICATION_CODE_POPOVER | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--signed-verification-code-popup\"\n [outsideClick]=\"true\"\n ></button>\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"signedVerificationCode\"\n name=\"signedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n [(ngModel)]=\"trustedCertificate.signedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Verify signed verification code' | translate }}\"\n type=\"button\"\n (click)=\"verifySignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!trustedCertificate.signedVerificationCode\"\n >\n {{ 'Verify`signed verification code`' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-default m-l-auto\"\n [attr.aria-label]=\"'Upload file' | translate\"\n tooltip=\"{{ 'Upload file' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"fileInput.click()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"upload\"></i>\n </button>\n <input\n class=\"hidden\"\n type=\"file\"\n #fileInput\n (change)=\"onFileInput($event, trustedCertificate)\"\n />\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-list-group>\n </div>\n}\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { 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: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { 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: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { 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: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: ButtonCheckboxDirective, selector: "[btnCheckbox]", inputs: ["btnCheckboxTrue", "btnCheckboxFalse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.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: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
680
686
  }
681
687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TrustedCertificateListComponent, decorators: [{
682
688
  type: Component,
@@ -684,7 +690,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
684
690
  TitleComponent,
685
691
  BreadcrumbComponent,
686
692
  BreadcrumbItemComponent,
687
- NgIf,
688
693
  ActionBarItemComponent,
689
694
  IconDirective,
690
695
  PopoverDirective,
@@ -708,7 +713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
708
713
  AsyncPipe,
709
714
  DatePipe,
710
715
  NgTemplateOutlet
711
- ], template: "<div *ngIf=\"(hasReadRole$ | async) || (hasAdminRole$ | async)\">\n <c8y-title>{{ 'Trusted certificates' | translate }}</c8y-title>\n\n <c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"certificate\"\n label=\"{{ 'Trusted certificates' | translate }}\"\n ></c8y-breadcrumb-item>\n </c8y-breadcrumb>\n\n <c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"certificateAuthorityFeatureEnabled\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add CA certificate' | translate }}\"\n type=\"button\"\n [disabled]=\"!(hasAdminRole$ | async) || certificateAuthorityExists\"\n (click)=\"addCACertificate()\"\n >\n <i c8yIcon=\"contract\"></i>\n {{ 'Add CA certificate' | translate }}\n </button>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections. Only one certificate is allowed, which is why the button is disabled.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n *ngIf=\"certificateAuthorityExists\"\n ></button>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n *ngIf=\"!certificateAuthorityExists\"\n ></button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add trusted certificate' | 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=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadTrustedCertificates()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading | async }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n </c8y-action-bar-item>\n\n <c8y-help\n src=\"/docs/device-certificate-authentication/managing-trusted-certificates/#managing-trusted-certificates\"\n ></c8y-help>\n\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No trusted certificates to display.' | translate\"\n [subtitle]=\"'Add your first certificate by clicking below.' | translate\"\n *ngIf=\"(trustedCertificates | async)?.data.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n >\n {{ 'Add trusted certificate' | translate }}\n </button>\n </c8y-ui-empty-state>\n\n <c8y-list-group class=\"m-b-24\">\n <div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list__item--empty-actions\"\n *ngIf=\"(trustedCertificates | async)?.data.length > 0\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i\n class=\"invisible\"\n c8yIcon=\"certificate\"\n ></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Certificate' | translate }} \"\n >\n {{ 'Certificate' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Status' | translate }}\"\n >\n {{ 'Status' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}\"\n >\n {{ 'Algorithm' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Auto registration' | translate }}\"\n >\n {{ 'Auto registration' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Proof of possession' | translate }}\"\n >\n {{ 'Proof of possession' | translate }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"c8y-list__item__actions\"></div>\n </div>\n </div>\n\n <c8y-li\n *c8yFor=\"\n let trustedCertificate of trustedCertificates | async;\n let i = index;\n pipe: sortByExpirationDateAsc;\n loadMore: 'none'\n \"\n #listItem\n data-cy=\"c8y-trusted-certificates-list--item-block\"\n >\n <c8y-li-icon>\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'Certificate' | translate }}\"\n tooltip=\"{{ 'Certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n *ngIf=\"!trustedCertificate.tenantCertificateAuthority\"\n >\n <i c8yIcon=\"certificate\"></i>\n </button>\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'CA certificate' | translate }}\"\n tooltip=\"{{ 'CA certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n *ngIf=\"trustedCertificate.tenantCertificateAuthority\"\n >\n <i c8yIcon=\"contract\"></i>\n </button>\n </c8y-li-icon>\n\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n <button\n class=\"btn-clean text-truncate\"\n title=\"{{ trustedCertificate.name }}\"\n type=\"button\"\n (click)=\"listItem.toggleCollapsed()\"\n >\n {{ trustedCertificate.name }}\n </button>\n </div>\n <div class=\"col-2\">\n <div class=\"visible-xs p-8\"></div>\n <button\n class=\"btn c8y-btn-checkbox--inline\"\n name=\"certificateStatus\"\n type=\"button\"\n [(ngModel)]=\"trustedCertificate.status\"\n btnCheckbox\n btnCheckboxTrue=\"ENABLED\"\n btnCheckboxFalse=\"DISABLED\"\n (ngModelChange)=\"updateCertificate(trustedCertificate, { status: $event })\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <small\n title=\"{{ 'Disabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'DISABLED'\"\n >\n {{ 'Disabled`trusted certificate status`' | translate }}\n </small>\n <small\n title=\"{{ 'Enabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'ENABLED'\"\n >\n {{ 'Enabled`trusted certificate status`' | translate }}\n </small>\n </button>\n <div class=\"visible-xs p-8\"></div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}: {{ trustedCertificate.algorithmName }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Algorithm\n </span>\n {{ trustedCertificate.algorithmName }}\n </div>\n </div>\n\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{ trustedCertificate.notAfter | c8yDate }}\"\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 @let expirationHighlight = getExpirationHighlight(trustedCertificate);\n <span>\n <small\n [attr.title]=\"expirationHighlight?.tooltipText\"\n [ngClass]=\"expirationHighlight?.textClass\"\n >\n <ng-container *ngIf=\"expirationHighlight?.expired; else notExpiredYet\">\n <del>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </del>\n </ng-container>\n <ng-template #notExpiredYet>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </ng-template>\n <ng-template #expirationDateTpl>\n <i\n class=\"m-r-4\"\n c8yIcon=\"{{ expirationHighlight?.icon }}\"\n *ngIf=\"expirationHighlight?.icon\"\n ></i>\n <span>{{ trustedCertificate.notAfter | c8yDate }}</span>\n </ng-template>\n </small>\n <button\n class=\"btn btn-link btn-icon\"\n title=\"{{ 'Renew certificate' | translate }}\"\n type=\"button\"\n *ngIf=\"expirationHighlight?.renewable\"\n (click)=\"renewCertificate()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Auto registration' | translate }}\n </span>\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Enabled`auto registration`' | translate\n }}\"\n *ngIf=\"trustedCertificate.autoRegistrationEnabled\"\n >\n {{ 'Enabled`auto registration`' | translate }}\n </span>\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Disabled`auto registration`' | translate\n }}\"\n *ngIf=\"!trustedCertificate.autoRegistrationEnabled\"\n >\n {{ 'Disabled`auto registration`' | translate }}\n </span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n </div>\n <div class=\"col-2 d-flex\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Proof of possession' | translate }}\n </span>\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{ 'N/A' | translate }}\"\n *ngIf=\"trustedCertificate.tenantCertificateAuthority\"\n >\n {{ 'N/A' | translate }}\n </span>\n <span *ngIf=\"!trustedCertificate.tenantCertificateAuthority\">\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n *ngIf=\"trustedCertificate.proofOfPossessionValid\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </div>\n </span>\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n *ngIf=\"!trustedCertificate.proofOfPossessionValid\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </div>\n </span>\n </span>\n </div>\n <button\n class=\"m-l-auto btn-dot btn-dot--danger btn showOnHover m-r-8\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificate--delete\"\n [delay]=\"500\"\n (click)=\"deleteTrustedCertificate(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div class=\"p-t-16 p-b-16\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Certificate name' | translate }}\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n type=\"text\"\n required\n data-cy=\"c8y-trusted-certificates--edit-certificate-name\"\n [(ngModel)]=\"trustedCertificate.name\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Update certificate name' | translate }}\"\n type=\"button\"\n (click)=\"\n updateCertificate(trustedCertificate, { name: trustedCertificate.name })\n \"\n [disabled]=\"!trustedCertificate.name\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-md-1\"></div>\n <div class=\"col-md-7\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"certInPemFormat\"\n translate\n >\n Certificate\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"certInPemFormat\"\n name=\"certInPemFormat\"\n type=\"text\"\n rows=\"7\"\n readonly\n [(ngModel)]=\"trustedCertificate.certInPemFormat\"\n ></textarea>\n </c8y-form-group>\n <c8y-form-group>\n <label\n class=\"c8y-checkbox\"\n title=\"{{ 'Auto registration' | translate }}\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"trustedCertificate.autoRegistrationEnabled\"\n (ngModelChange)=\"\n updateCertificate(trustedCertificate, { autoRegistrationEnabled: $event })\n \"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <span>{{ 'Auto registration' | translate }}</span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4\">\n <div\n class=\"legend form-block\"\n translate\n >\n Additional properties\n </div>\n <ul class=\"list-unstyled\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Algorithm' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.algorithmName }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Version' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.version }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Valid from' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notBefore | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Issuer' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.issuer }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Expiration date' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notAfter | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Serial number' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.serialNumber }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Subject`of a certificate`' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.subject }}\n </span>\n </li>\n </ul>\n </div>\n <div class=\"col-md-1\"></div>\n <div\n class=\"col-md-7\"\n *ngIf=\"!trustedCertificate.tenantCertificateAuthority\"\n >\n <div class=\"legend form-block\">\n {{ 'Proof of possession' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ PROOF_OF_POSSESSION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n <div *ngIf=\"trustedCertificate.proofOfPossessionValid\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </span>\n </div>\n <div *ngIf=\"!trustedCertificate.proofOfPossessionValid\">\n <div class=\"row m-b-16\">\n <div class=\"col-md-6\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </span>\n </div>\n <div class=\"col-md-6 col-lg-6 text-right-md\">\n <span class=\"text-label-small m-r-4\">\n {{ 'Verification code expires/expired on' | translate }}\n </span>\n {{\n (trustedCertificate.proofOfPossessionVerificationCodeUsableUntil | c8yDate) ||\n '---'\n }}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"unsignedVerificationCode\"\n translate\n >\n Verification code\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"unsignedVerificationCode\"\n name=\"unsignedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n readonly\n [(ngModel)]=\"trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Regenerate verification code' | translate }}\"\n type=\"button\"\n (click)=\"regenerateUnsignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n {{ 'Regenerate`verification code`' | translate }}\n </button>\n\n <button\n class=\"btn btn-sm btn-default m-l-auto m-r-0\"\n [attr.aria-label]=\"'Copy to clipboard' | translate\"\n tooltip=\"{{ 'Copy to clipboard' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--copy-to-clipboard\"\n [delay]=\"500\"\n [disabled]=\"!trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n (click)=\"copyUnsignedVerificationCodeToClipboard(trustedCertificate)\"\n >\n <i c8yIcon=\"clipboard\"></i>\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Download as file' | translate\"\n tooltip=\"{{ 'Download as file' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--download-as-file\"\n [delay]=\"500\"\n [disabled]=\"!trustedCertificate.proofOfPossessionUnsignedVerificationCode\"\n (click)=\"downloadUnsignedVerificationCode(trustedCertificate)\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.VERIFICATION_CODE.COMPONENTS.DOWNLOAD_CODE,\n action: PRODUCT_EXPERIENCE.VERIFICATION_CODE.ACTIONS.DOWNLOAD\n }\"\n >\n <i c8yIcon=\"download\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"signedVerificationCode\"\n >\n {{ 'Signed verification code' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ SIGNED_VERIFICATION_CODE_POPOVER | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--signed-verification-code-popup\"\n [outsideClick]=\"true\"\n ></button>\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"signedVerificationCode\"\n name=\"signedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n [(ngModel)]=\"trustedCertificate.signedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Verify signed verification code' | translate }}\"\n type=\"button\"\n (click)=\"verifySignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!trustedCertificate.signedVerificationCode\"\n >\n {{ 'Verify`signed verification code`' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-default m-l-auto\"\n [attr.aria-label]=\"'Upload file' | translate\"\n tooltip=\"{{ 'Upload file' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"fileInput.click()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"upload\"></i>\n </button>\n <input\n class=\"hidden\"\n type=\"file\"\n #fileInput\n (change)=\"onFileInput($event, trustedCertificate)\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-list-group>\n</div>\n" }]
716
+ ], template: "@if ((hasReadRole$ | async) || (hasAdminRole$ | async)) {\n <div>\n <c8y-title>{{ 'Trusted certificates' | translate }}</c8y-title>\n\n <c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"certificate\"\n label=\"{{ 'Trusted certificates' | translate }}\"\n ></c8y-breadcrumb-item>\n </c8y-breadcrumb>\n\n @if (certificateAuthorityFeatureEnabled) {\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add CA certificate' | translate }}\"\n type=\"button\"\n [disabled]=\"!(hasAdminRole$ | async) || certificateAuthorityExists\"\n (click)=\"addCACertificate()\"\n >\n <i c8yIcon=\"contract\"></i>\n {{ 'Add CA certificate' | translate }}\n </button>\n @if (certificateAuthorityExists) {\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections. Only one certificate is allowed, which is why the button is disabled.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n }\n @if (!certificateAuthorityExists) {\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Adding a CA certificate lets the app trust certificates from the specified authority, ensuring secure connections.'\n | translate\n }}\"\n placement=\"bottom\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n }\n </c8y-action-bar-item>\n }\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add trusted certificate' | 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=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadTrustedCertificates()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading | async }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n </c8y-action-bar-item>\n\n <c8y-help\n src=\"/docs/device-certificate-authentication/managing-trusted-certificates/#managing-trusted-certificates\"\n ></c8y-help>\n\n @if ((trustedCertificates | async)?.data.length === 0) {\n <c8y-ui-empty-state\n [icon]=\"'certificate'\"\n [title]=\"'No trusted certificates to display.' | translate\"\n [subtitle]=\"'Add your first certificate by clicking below.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add trusted certificate' | translate }}\"\n type=\"button\"\n (click)=\"addTrustedCertificate()\"\n >\n {{ 'Add trusted certificate' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n\n <c8y-list-group class=\"m-b-24\">\n @if ((trustedCertificates | async)?.data.length > 0) {\n <div class=\"page-sticky-header hidden-xs c8y-list__item c8y-list__item--empty-actions\">\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i\n class=\"invisible\"\n c8yIcon=\"certificate\"\n ></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-60\">\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Certificate' | translate }} \"\n >\n {{ 'Certificate' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Status' | translate }}\"\n >\n {{ 'Status' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}\"\n >\n {{ 'Algorithm' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}\"\n >\n {{ 'Expiration date' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Auto registration' | translate }}\"\n >\n {{ 'Auto registration' | translate }}\n </span>\n </div>\n <div class=\"col-2\">\n <span\n class=\"text-truncate\"\n title=\" {{ 'Proof of possession' | translate }}\"\n >\n {{ 'Proof of possession' | translate }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"c8y-list__item__actions\"></div>\n </div>\n </div>\n }\n\n <c8y-li\n *c8yFor=\"\n let trustedCertificate of trustedCertificates | async;\n let i = index;\n pipe: sortByExpirationDateAsc;\n loadMore: 'none'\n \"\n #listItem\n data-cy=\"c8y-trusted-certificates-list--item-block\"\n >\n <c8y-li-icon>\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'Certificate' | translate }}\"\n tooltip=\"{{ 'Certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"certificate\"></i>\n </button>\n }\n @if (trustedCertificate.tenantCertificateAuthority) {\n <button\n class=\"btn-clean\"\n attr.aria-label=\"{{ 'CA certificate' | translate }}\"\n tooltip=\"{{ 'CA certificate' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"contract\"></i>\n </button>\n }\n </c8y-li-icon>\n\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n <button\n class=\"btn-clean text-truncate\"\n title=\"{{ trustedCertificate.name }}\"\n type=\"button\"\n (click)=\"listItem.toggleCollapsed()\"\n >\n {{ trustedCertificate.name }}\n </button>\n </div>\n <div class=\"col-2\">\n <div class=\"visible-xs p-8\"></div>\n <button\n class=\"btn c8y-btn-checkbox--inline\"\n name=\"certificateStatus\"\n type=\"button\"\n [(ngModel)]=\"trustedCertificate.status\"\n btnCheckbox\n btnCheckboxTrue=\"ENABLED\"\n btnCheckboxFalse=\"DISABLED\"\n (ngModelChange)=\"updateCertificate(trustedCertificate, { status: $event })\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <small\n title=\"{{ 'Disabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'DISABLED'\"\n >\n {{ 'Disabled`trusted certificate status`' | translate }}\n </small>\n <small\n title=\"{{ 'Enabled`trusted certificate status`' | translate }}\"\n [hidden]=\"trustedCertificate.status !== 'ENABLED'\"\n >\n {{ 'Enabled`trusted certificate status`' | translate }}\n </small>\n </button>\n <div class=\"visible-xs p-8\"></div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Algorithm' | translate }}: {{ trustedCertificate.algorithmName }}\"\n >\n <span\n class=\"text-label-small m-t-8 m-r-8 visible-xs-inline\"\n translate\n >\n Algorithm\n </span>\n {{ trustedCertificate.algorithmName }}\n </div>\n </div>\n\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Expiration date' | translate }}: {{\n trustedCertificate.notAfter | 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 @let expirationHighlight = getExpirationHighlight(trustedCertificate);\n <span>\n <small\n [attr.title]=\"expirationHighlight?.tooltipText\"\n [ngClass]=\"expirationHighlight?.textClass\"\n >\n @if (expirationHighlight?.expired) {\n <del>\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n </del>\n } @else {\n <ng-container *ngTemplateOutlet=\"expirationDateTpl\"></ng-container>\n }\n <ng-template #expirationDateTpl>\n @if (expirationHighlight?.icon) {\n <i\n class=\"m-r-4\"\n c8yIcon=\"{{ expirationHighlight?.icon }}\"\n ></i>\n }\n <span>{{ trustedCertificate.notAfter | c8yDate }}</span>\n </ng-template>\n </small>\n @if (expirationHighlight?.renewable) {\n <button\n class=\"btn btn-link btn-icon\"\n title=\"{{ 'Renew certificate' | translate }}\"\n type=\"button\"\n (click)=\"renewCertificate()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n }\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Auto registration' | translate }}\n </span>\n @if (trustedCertificate.autoRegistrationEnabled) {\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Enabled`auto registration`' | translate\n }}\"\n >\n {{ 'Enabled`auto registration`' | translate }}\n </span>\n }\n @if (!trustedCertificate.autoRegistrationEnabled) {\n <span\n title=\"{{ 'Auto registration' | translate }}: {{\n 'Disabled`auto registration`' | translate\n }}\"\n >\n {{ 'Disabled`auto registration`' | translate }}\n </span>\n }\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </div>\n </div>\n <div class=\"col-2 d-flex\">\n <div class=\"text-truncate\">\n <span class=\"text-label-small m-t-8 m-r-4 visible-xs-inline\">\n {{ 'Proof of possession' | translate }}\n </span>\n @if (trustedCertificate.tenantCertificateAuthority) {\n <span title=\"{{ 'Proof of possession' | translate }}: {{ 'N/A' | translate }}\">\n {{ 'N/A' | translate }}\n </span>\n }\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <span>\n @if (trustedCertificate.proofOfPossessionValid) {\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </div>\n </span>\n }\n @if (!trustedCertificate.proofOfPossessionValid) {\n <span\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <div class=\"icon-flex\">\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </div>\n </span>\n }\n </span>\n }\n </div>\n <button\n class=\"m-l-auto btn-dot btn-dot--danger btn showOnHover m-r-8\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificate--delete\"\n [delay]=\"500\"\n (click)=\"deleteTrustedCertificate(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"delete\"></i>\n </button>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div class=\"p-t-16 p-b-16\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Certificate name' | translate }}\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n type=\"text\"\n required\n data-cy=\"c8y-trusted-certificates--edit-certificate-name\"\n [(ngModel)]=\"trustedCertificate.name\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Update certificate name' | translate }}\"\n type=\"button\"\n (click)=\"\n updateCertificate(trustedCertificate, { name: trustedCertificate.name })\n \"\n [disabled]=\"!trustedCertificate.name\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-md-1\"></div>\n <div class=\"col-md-7\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"certInPemFormat\"\n translate\n >\n Certificate\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"certInPemFormat\"\n name=\"certInPemFormat\"\n type=\"text\"\n rows=\"7\"\n readonly\n [(ngModel)]=\"trustedCertificate.certInPemFormat\"\n ></textarea>\n </c8y-form-group>\n <c8y-form-group>\n <label\n class=\"c8y-checkbox\"\n title=\"{{ 'Auto registration' | translate }}\"\n [ngClass]=\"{\n disabled: !(hasAdminRole$ | async)\n }\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"trustedCertificate.autoRegistrationEnabled\"\n (ngModelChange)=\"\n updateCertificate(trustedCertificate, { autoRegistrationEnabled: $event })\n \"\n [disabled]=\"!(hasAdminRole$ | async)\"\n />\n <span></span>\n <span>{{ 'Auto registration' | translate }}</span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ AUTO_REGISTRATION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4\">\n <div\n class=\"legend form-block\"\n translate\n >\n Additional properties\n </div>\n <ul class=\"list-unstyled\">\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Algorithm' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.algorithmName }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Version' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.version }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Valid from' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notBefore | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Issuer' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.issuer }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Expiration date' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.notAfter | c8yDate }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Serial number' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.serialNumber }}\n </span>\n </li>\n <li class=\"p-t-4 p-b-4 d-flex separator-bottom flex-wrap\">\n <label class=\"small m-b-0 m-r-8 a-s-start flex-grow\">\n {{ 'Subject`of a certificate`' | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ trustedCertificate.subject }}\n </span>\n </li>\n </ul>\n </div>\n <div class=\"col-md-1\"></div>\n @if (!trustedCertificate.tenantCertificateAuthority) {\n <div class=\"col-md-7\">\n <div class=\"legend form-block\">\n {{ 'Proof of possession' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ PROOF_OF_POSSESSION_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n type=\"button\"\n ></button>\n </div>\n @if (trustedCertificate.proofOfPossessionValid) {\n <div>\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Complete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-success\"\n c8yIcon=\"success\"\n ></i>\n {{ 'Complete`proof of possession`' | translate }}\n </span>\n </div>\n }\n @if (!trustedCertificate.proofOfPossessionValid) {\n <div>\n <div class=\"row m-b-16\">\n <div class=\"col-md-6\">\n <span\n class=\"icon-flex\"\n title=\"{{ 'Proof of possession' | translate }}: {{\n 'Incomplete`proof of possession`' | translate\n }}\"\n >\n <i\n class=\"text-warning\"\n c8yIcon=\"warning\"\n ></i>\n {{ 'Incomplete`proof of possession`' | translate }}\n </span>\n </div>\n <div class=\"col-md-6 col-lg-6 text-right-md\">\n <span class=\"text-label-small m-r-4\">\n {{ 'Verification code expires/expired on' | translate }}\n </span>\n {{\n (trustedCertificate.proofOfPossessionVerificationCodeUsableUntil\n | c8yDate) || '---'\n }}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"unsignedVerificationCode\"\n translate\n >\n Verification code\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"unsignedVerificationCode\"\n name=\"unsignedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n readonly\n [(ngModel)]=\"\n trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Regenerate verification code' | translate }}\"\n type=\"button\"\n (click)=\"regenerateUnsignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n {{ 'Regenerate`verification code`' | translate }}\n </button>\n\n <button\n class=\"btn btn-sm btn-default m-l-auto m-r-0\"\n [attr.aria-label]=\"'Copy to clipboard' | translate\"\n tooltip=\"{{ 'Copy to clipboard' | translate }}\"\n placement=\"right\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--copy-to-clipboard\"\n [delay]=\"500\"\n [disabled]=\"\n !trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n (click)=\"copyUnsignedVerificationCodeToClipboard(trustedCertificate)\"\n >\n <i c8yIcon=\"clipboard\"></i>\n </button>\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Download as file' | translate\"\n tooltip=\"{{ 'Download as file' | translate }}\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--download-as-file\"\n [delay]=\"500\"\n [disabled]=\"\n !trustedCertificate.proofOfPossessionUnsignedVerificationCode\n \"\n (click)=\"downloadUnsignedVerificationCode(trustedCertificate)\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component:\n PRODUCT_EXPERIENCE.VERIFICATION_CODE.COMPONENTS.DOWNLOAD_CODE,\n action: PRODUCT_EXPERIENCE.VERIFICATION_CODE.ACTIONS.DOWNLOAD\n }\"\n >\n <i c8yIcon=\"download\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"col-md-6 col-lg-6\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n for=\"signedVerificationCode\"\n >\n {{ 'Signed verification code' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ SIGNED_VERIFICATION_CODE_POPOVER | translate }}\"\n placement=\"top\"\n container=\"body\"\n type=\"button\"\n data-cy=\"c8y-trusted-certificates--signed-verification-code-popup\"\n [outsideClick]=\"true\"\n ></button>\n </label>\n <textarea\n class=\"form-control no-resize\"\n id=\"signedVerificationCode\"\n name=\"signedVerificationCode\"\n type=\"text\"\n rows=\"5\"\n [(ngModel)]=\"trustedCertificate.signedVerificationCode\"\n ></textarea>\n </c8y-form-group>\n <div class=\"d-flex\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Verify signed verification code' | translate }}\"\n type=\"button\"\n (click)=\"verifySignedVerificationCode(trustedCertificate)\"\n [disabled]=\"!trustedCertificate.signedVerificationCode\"\n >\n {{ 'Verify`signed verification code`' | translate }}\n </button>\n <button\n class=\"btn btn-sm btn-default m-l-auto\"\n [attr.aria-label]=\"'Upload file' | translate\"\n tooltip=\"{{ 'Upload file' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"fileInput.click()\"\n [disabled]=\"!(hasAdminRole$ | async)\"\n >\n <i c8yIcon=\"upload\"></i>\n </button>\n <input\n class=\"hidden\"\n type=\"file\"\n #fileInput\n (change)=\"onFileInput($event, trustedCertificate)\"\n />\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-list-group>\n </div>\n}\n" }]
712
717
  }], ctorParameters: () => [{ type: i1$1.BsModalService }, { type: i2.AlertService }, { type: i2$1.TrustedCertificateService }, { type: i2.ModalService }, { type: i4$1.TranslateService }, { type: i2.ClipboardService }, { type: i2.GainsightService }, { type: i2$1.SystemOptionsService }, { type: i2.FeatureCacheService }, { type: TrustedCertificatesGuard }] });
713
718
 
714
719
  const trustedCertificatesRoutes = [