@c8y/ngx-components 1020.28.11 → 1020.33.1

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 (107) hide show
  1. package/bookmarks/bookmarks.service.d.ts +3 -2
  2. package/bookmarks/bookmarks.service.d.ts.map +1 -1
  3. package/context-dashboard/context-dashboard.service.d.ts.map +1 -1
  4. package/context-dashboard/device-info-dashboard/device-info-dashboard.component.d.ts.map +1 -1
  5. package/core/common/common.module.d.ts +2 -2
  6. package/core/common/humanize-app-name.model.d.ts +2 -2
  7. package/core/common/humanize-app-name.pipe.d.ts.map +1 -1
  8. package/core/dashboard/dashboard.model.d.ts +1 -0
  9. package/core/dashboard/dashboard.model.d.ts.map +1 -1
  10. package/core/dashboard/widgets-dashboard.component.d.ts +1 -0
  11. package/core/dashboard/widgets-dashboard.component.d.ts.map +1 -1
  12. package/core/data-grid/data-grid.model.d.ts +1 -1
  13. package/core/data-grid/data-grid.model.d.ts.map +1 -1
  14. package/core/data-grid/visible-controls.pipe.d.ts +3 -2
  15. package/core/data-grid/visible-controls.pipe.d.ts.map +1 -1
  16. package/esm2022/bookmarks/bookmarks.service.mjs +9 -7
  17. package/esm2022/context-dashboard/context-dashboard.service.mjs +6 -3
  18. package/esm2022/context-dashboard/device-info-dashboard/device-info-dashboard.component.mjs +39 -3
  19. package/esm2022/core/common/common.module.mjs +3 -3
  20. package/esm2022/core/common/humanize-app-name.model.mjs +3 -3
  21. package/esm2022/core/common/humanize-app-name.pipe.mjs +6 -5
  22. package/esm2022/core/dashboard/dashboard.model.mjs +2 -2
  23. package/esm2022/core/dashboard/widgets-dashboard.component.mjs +12 -3
  24. package/esm2022/core/data-grid/data-grid.component.mjs +3 -3
  25. package/esm2022/core/data-grid/data-grid.model.mjs +1 -1
  26. package/esm2022/core/data-grid/visible-controls.pipe.mjs +5 -4
  27. package/esm2022/core/docs/defaults.items.mjs +2 -2
  28. package/esm2022/protocol-opcua/opcua-device-protocol-data-reporting.component.mjs +3 -3
  29. package/esm2022/repository/configuration/list/configuration-list.component.mjs +107 -60
  30. package/esm2022/repository/shared/columns/device-type.cell-renderer.component.mjs +7 -3
  31. package/esm2022/repository/shared/columns/device-type.grid-column.mjs +2 -2
  32. package/esm2022/repository/shared/columns/file.cell-renderer.component.mjs +39 -0
  33. package/esm2022/repository/shared/columns/file.grid-column.mjs +13 -0
  34. package/esm2022/repository/shared/columns/name.cell-renderer.component.mjs +26 -5
  35. package/esm2022/repository/shared/columns/name.grid-column.mjs +1 -1
  36. package/esm2022/repository/shared/columns/type.cell-renderer.component.mjs +18 -0
  37. package/esm2022/repository/shared/columns/type.filtering-form-renderer.component.mjs +115 -0
  38. package/esm2022/repository/shared/columns/type.grid-column.mjs +29 -0
  39. package/esm2022/repository/shared/index.mjs +10 -1
  40. package/esm2022/repository/software/list/software-list.component.mjs +9 -4
  41. package/esm2022/repository/software/list/software-repository-list.module.mjs +3 -15
  42. package/esm2022/widgets/definitions/device-management-welcome/index.mjs +2 -2
  43. package/esm2022/widgets/implementations/info-gauge/info-gauge-widget-view/info-gauge-widget-view.component.mjs +22 -5
  44. package/fesm2022/c8y-ngx-components-bookmarks.mjs +7 -5
  45. package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
  46. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +43 -4
  47. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  48. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +2 -2
  49. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +118 -68
  51. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-repository-shared.mjs +283 -81
  53. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-repository-software.mjs +31 -154
  55. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-widgets-definitions-device-management-welcome.mjs +1 -1
  57. package/fesm2022/c8y-ngx-components-widgets-definitions-device-management-welcome.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +24 -9
  59. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  60. package/fesm2022/c8y-ngx-components.mjs +27 -17
  61. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  62. package/locales/de.po +6 -0
  63. package/locales/es.po +6 -0
  64. package/locales/fr.po +6 -0
  65. package/locales/ja_JP.po +6 -0
  66. package/locales/locales.pot +38 -23
  67. package/locales/nl.po +6 -0
  68. package/locales/pl.po +6 -0
  69. package/locales/pt_BR.po +6 -0
  70. package/package.json +1 -1
  71. package/repository/configuration/list/configuration-list.component.d.ts +21 -17
  72. package/repository/configuration/list/configuration-list.component.d.ts.map +1 -1
  73. package/repository/shared/columns/device-type.cell-renderer.component.d.ts +4 -1
  74. package/repository/shared/columns/device-type.cell-renderer.component.d.ts.map +1 -1
  75. package/repository/shared/columns/device-type.grid-column.d.ts +1 -0
  76. package/repository/shared/columns/device-type.grid-column.d.ts.map +1 -1
  77. package/repository/shared/columns/file.cell-renderer.component.d.ts +15 -0
  78. package/repository/shared/columns/file.cell-renderer.component.d.ts.map +1 -0
  79. package/repository/shared/columns/file.grid-column.d.ts +8 -0
  80. package/repository/shared/columns/file.grid-column.d.ts.map +1 -0
  81. package/repository/shared/columns/name.cell-renderer.component.d.ts.map +1 -1
  82. package/repository/shared/columns/name.grid-column.d.ts +3 -1
  83. package/repository/shared/columns/name.grid-column.d.ts.map +1 -1
  84. package/repository/shared/columns/type.cell-renderer.component.d.ts +9 -0
  85. package/repository/shared/columns/type.cell-renderer.component.d.ts.map +1 -0
  86. package/repository/{software/list/columns/software-type.filtering-form-renderer.component.d.ts → shared/columns/type.filtering-form-renderer.component.d.ts} +9 -8
  87. package/repository/shared/columns/type.filtering-form-renderer.component.d.ts.map +1 -0
  88. package/repository/shared/columns/type.grid-column.d.ts +20 -0
  89. package/repository/shared/columns/type.grid-column.d.ts.map +1 -0
  90. package/repository/shared/index.d.ts +9 -0
  91. package/repository/shared/index.d.ts.map +1 -1
  92. package/repository/software/list/software-list.component.d.ts.map +1 -1
  93. package/repository/software/list/software-repository-list.module.d.ts +8 -10
  94. package/repository/software/list/software-repository-list.module.d.ts.map +1 -1
  95. package/widgets/definitions/device-management-welcome/index.d.ts +1 -1
  96. package/widgets/definitions/device-management-welcome/index.d.ts.map +1 -1
  97. package/widgets/device-management/index.d.ts +1 -1
  98. package/widgets/implementations/info-gauge/info-gauge-widget-view/info-gauge-widget-view.component.d.ts +5 -1
  99. package/widgets/implementations/info-gauge/info-gauge-widget-view/info-gauge-widget-view.component.d.ts.map +1 -1
  100. package/esm2022/repository/software/list/columns/software-type.cell-renderer.component.mjs +0 -17
  101. package/esm2022/repository/software/list/columns/software-type.filtering-form-renderer.component.mjs +0 -93
  102. package/esm2022/repository/software/list/columns/software-type.grid-column.mjs +0 -28
  103. package/repository/software/list/columns/software-type.cell-renderer.component.d.ts +0 -9
  104. package/repository/software/list/columns/software-type.cell-renderer.component.d.ts.map +0 -1
  105. package/repository/software/list/columns/software-type.filtering-form-renderer.component.d.ts.map +0 -1
  106. package/repository/software/list/columns/software-type.grid-column.d.ts +0 -5
  107. package/repository/software/list/columns/software-type.grid-column.d.ts.map +0 -1
@@ -1,27 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Injectable, Component, Pipe, Input, Output, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
- import * as i5 from '@c8y/client';
4
+ import * as i4 from '@c8y/client';
5
5
  import { OperationStatus } from '@c8y/client';
6
6
  import * as i2 from '@c8y/ngx-components';
7
- import { gettext, Permissions, hookRoute, ViewContext, CoreModule, Status, FilterInputComponent, memoize, NavigatorNode, hookNavigator, FormsModule } from '@c8y/ngx-components';
7
+ import { gettext, Permissions, hookRoute, ViewContext, CoreModule, Status, FilterInputComponent, NavigatorNode, hookNavigator, FormsModule } from '@c8y/ngx-components';
8
8
  import * as i3 from '@c8y/ngx-components/repository/shared';
9
- import { DeviceConfigurationOperation, RepositoryType, SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
9
+ import { DeviceConfigurationOperation, RepositoryType, SharedRepositoryModule, RepositoryItemNameGridColumn, DescriptionGridColumn, FileGridColumn, DeviceTypeGridColumn, TypeGridColumn } from '@c8y/ngx-components/repository/shared';
10
10
  import * as i6 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
- import * as i4 from '@angular/forms';
12
+ import * as i4$1 from '@angular/forms';
13
13
  import * as i8 from '@c8y/ngx-components/operations/operation-details';
14
14
  import { OperationDetailsModule } from '@c8y/ngx-components/operations/operation-details';
15
- import { has, cloneDeep, uniqBy, isUndefined, property } from 'lodash-es';
15
+ import { has, cloneDeep, uniqBy, isUndefined } from 'lodash-es';
16
16
  import { saveAs } from 'file-saver';
17
17
  import * as i3$1 from 'ngx-bootstrap/modal';
18
18
  import { map } from 'rxjs/operators';
19
19
  import * as i7 from 'ngx-bootstrap/tabs';
20
20
  import { TabsModule } from 'ngx-bootstrap/tabs';
21
- import { __decorate, __metadata } from 'tslib';
22
- import * as i4$1 from '@ngx-translate/core';
23
- import { pipe, of } from 'rxjs';
24
- import * as i7$1 from 'ngx-bootstrap/tooltip';
21
+ import * as i4$2 from '@ngx-translate/core';
22
+ import { pipe } from 'rxjs';
25
23
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
26
24
 
27
25
  class DeviceConfigurationService {
@@ -145,13 +143,13 @@ class TextBasedConfigurationComponent {
145
143
  withChildren: false
146
144
  })).data;
147
145
  }
148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TextBasedConfigurationComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.AlertService }, { token: i3.RepositoryService }, { token: DeviceConfigurationService }, { token: i5.InventoryService }], target: i0.ɵɵFactoryTarget.Component }); }
149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: TextBasedConfigurationComponent, selector: "c8y-text-based-configuration", ngImport: i0, template: "<div class=\"d-flex d-col fit-h\">\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50\">\n <div class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-default btn-sm a-s-center m-t-8 m-b-8\"\n title=\"{{ 'Get configuration from device' | translate }}\"\n type=\"button\"\n *ngIf=\"showTextBasedConfigReload\"\n (click)=\"reloadConfiguration()\"\n [disabled]=\"reloadingConfig || savingConfig\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"refresh\"\n *ngIf=\"reloadingConfig\"\n [ngClass]=\"{ 'icon-spin': reloadingConfig }\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"download\"\n *ngIf=\"!reloadingConfig\"\n ></i>\n\n {{ 'Get configuration from device' | translate }}\n </button>\n </div>\n </div>\n </fieldset>\n <div class=\"flex-grow\">\n <textarea\n class=\"form-control fit-h p-r-16 p-l-16\"\n [attr.aria-label]=\"'Operations' | translate\"\n [(ngModel)]=\"config\"\n [disabled]=\"reloadingConfig || savingConfig\"\n c8y-spellcheck=\"false\"\n ></textarea>\n </div>\n <c8y-operation-details\n class=\"bg-level-2 p-0\"\n *ngIf=\"latestOperation !== undefined\"\n [operation]=\"latestOperation\"\n ></c8y-operation-details>\n <div\n class=\"card-footer fit-w separator\"\n *ngIf=\"showTextBasedConfigSave\"\n >\n <button\n class=\"btn btn-primary\"\n id=\"send-config-btn\"\n type=\"button\"\n (click)=\"updateConfiguration(config)\"\n [disabled]=\"reloadingConfig || savingConfig || !config\"\n [ngClass]=\"{ 'btn-pending': savingConfig }\"\n >\n <span\n title=\"{{ 'Send' | translate }}\"\n *ngIf=\"!savingConfig\"\n >\n {{ 'Send configuration to device' | translate }}\n </span>\n <span\n title=\"{{ 'Sending\u2026' | translate }}\"\n *ngIf=\"savingConfig\"\n >\n {{ 'Sending\u2026' | translate }}\n </span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TextBasedConfigurationComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.AlertService }, { token: i3.RepositoryService }, { token: DeviceConfigurationService }, { token: i4.InventoryService }], target: i0.ɵɵFactoryTarget.Component }); }
147
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: TextBasedConfigurationComponent, selector: "c8y-text-based-configuration", ngImport: i0, template: "<div class=\"d-flex d-col fit-h\">\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50\">\n <div class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-default btn-sm a-s-center m-t-8 m-b-8\"\n title=\"{{ 'Get configuration from device' | translate }}\"\n type=\"button\"\n *ngIf=\"showTextBasedConfigReload\"\n (click)=\"reloadConfiguration()\"\n [disabled]=\"reloadingConfig || savingConfig\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"refresh\"\n *ngIf=\"reloadingConfig\"\n [ngClass]=\"{ 'icon-spin': reloadingConfig }\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"download\"\n *ngIf=\"!reloadingConfig\"\n ></i>\n\n {{ 'Get configuration from device' | translate }}\n </button>\n </div>\n </div>\n </fieldset>\n <div class=\"flex-grow\">\n <textarea\n class=\"form-control fit-h p-r-16 p-l-16\"\n [attr.aria-label]=\"'Operations' | translate\"\n [(ngModel)]=\"config\"\n [disabled]=\"reloadingConfig || savingConfig\"\n c8y-spellcheck=\"false\"\n ></textarea>\n </div>\n <c8y-operation-details\n class=\"bg-level-2 p-0\"\n *ngIf=\"latestOperation !== undefined\"\n [operation]=\"latestOperation\"\n ></c8y-operation-details>\n <div\n class=\"card-footer fit-w separator\"\n *ngIf=\"showTextBasedConfigSave\"\n >\n <button\n class=\"btn btn-primary\"\n id=\"send-config-btn\"\n type=\"button\"\n (click)=\"updateConfiguration(config)\"\n [disabled]=\"reloadingConfig || savingConfig || !config\"\n [ngClass]=\"{ 'btn-pending': savingConfig }\"\n >\n <span\n title=\"{{ 'Send' | translate }}\"\n *ngIf=\"!savingConfig\"\n >\n {{ 'Send configuration to device' | translate }}\n </span>\n <span\n title=\"{{ 'Sending\u2026' | translate }}\"\n *ngIf=\"savingConfig\"\n >\n {{ 'Sending\u2026' | translate }}\n </span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
150
148
  }
151
149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TextBasedConfigurationComponent, decorators: [{
152
150
  type: Component,
153
151
  args: [{ selector: 'c8y-text-based-configuration', template: "<div class=\"d-flex d-col fit-h\">\n <fieldset class=\"card-block bg-level-1 fit-w\">\n <div class=\"content-flex-50\">\n <div class=\"m-l-auto d-flex\">\n <button\n class=\"btn btn-default btn-sm a-s-center m-t-8 m-b-8\"\n title=\"{{ 'Get configuration from device' | translate }}\"\n type=\"button\"\n *ngIf=\"showTextBasedConfigReload\"\n (click)=\"reloadConfiguration()\"\n [disabled]=\"reloadingConfig || savingConfig\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"refresh\"\n *ngIf=\"reloadingConfig\"\n [ngClass]=\"{ 'icon-spin': reloadingConfig }\"\n ></i>\n <i\n class=\"m-r-4\"\n c8yIcon=\"download\"\n *ngIf=\"!reloadingConfig\"\n ></i>\n\n {{ 'Get configuration from device' | translate }}\n </button>\n </div>\n </div>\n </fieldset>\n <div class=\"flex-grow\">\n <textarea\n class=\"form-control fit-h p-r-16 p-l-16\"\n [attr.aria-label]=\"'Operations' | translate\"\n [(ngModel)]=\"config\"\n [disabled]=\"reloadingConfig || savingConfig\"\n c8y-spellcheck=\"false\"\n ></textarea>\n </div>\n <c8y-operation-details\n class=\"bg-level-2 p-0\"\n *ngIf=\"latestOperation !== undefined\"\n [operation]=\"latestOperation\"\n ></c8y-operation-details>\n <div\n class=\"card-footer fit-w separator\"\n *ngIf=\"showTextBasedConfigSave\"\n >\n <button\n class=\"btn btn-primary\"\n id=\"send-config-btn\"\n type=\"button\"\n (click)=\"updateConfiguration(config)\"\n [disabled]=\"reloadingConfig || savingConfig || !config\"\n [ngClass]=\"{ 'btn-pending': savingConfig }\"\n >\n <span\n title=\"{{ 'Send' | translate }}\"\n *ngIf=\"!savingConfig\"\n >\n {{ 'Send configuration to device' | translate }}\n </span>\n <span\n title=\"{{ 'Sending\u2026' | translate }}\"\n *ngIf=\"savingConfig\"\n >\n {{ 'Sending\u2026' | translate }}\n </span>\n </button>\n </div>\n</div>\n" }]
154
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2.AlertService }, { type: i3.RepositoryService }, { type: DeviceConfigurationService }, { type: i5.InventoryService }] });
152
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2.AlertService }, { type: i3.RepositoryService }, { type: DeviceConfigurationService }, { type: i4.InventoryService }] });
155
153
 
156
154
  class DeviceConfigurationGuard {
157
155
  constructor(deviceConfigurationService) {
@@ -238,7 +236,7 @@ class SaveToRepositoryComponent {
238
236
  this.modal.hide();
239
237
  }
240
238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SaveToRepositoryComponent, deps: [{ token: i3$1.BsModalRef }, { token: i2.AlertService }, { token: i3.RepositoryService }], target: i0.ɵɵFactoryTarget.Component }); }
241
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: SaveToRepositoryComponent, selector: "c8y-save-config-to-configuration-repository", ngImport: i0, template: "<div class=\"modal-header dialog-header\">\n <i c8yIcon=\"gears\"></i>\n <h4 id=\"modal-title\" translate>\n Save configuration\n </h4>\n</div>\n<div class=\"modal-body\" id=\"modal-body\">\n <form #saveConfigurationSnapshot=\"ngForm\" class=\"p-t-24\">\n <c8y-form-group>\n <label translate for=\"name\">Name</label>\n <input\n id=\"name\"\n type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"name\"\n [(ngModel)]=\"configSnapshot.name\"\n required\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"deviceType\">Device type</label>\n <input\n id=\"deviceType\"\n class=\"form-control\"\n rows=\"6\"\n name=\"deviceType\"\n [(ngModel)]=\"configSnapshot.deviceType\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"description\">Description</label>\n <input\n type=\"text\"\n id=\"description\"\n class=\"form-control\"\n maxlength=\"254\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"configSnapshot.description\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"configurationType\">Configuration type</label>\n <input\n id=\"configurationType\"\n class=\"form-control\"\n rows=\"6\"\n name=\"configurationType\"\n [(ngModel)]=\"configSnapshot.configurationType\"\n />\n </c8y-form-group>\n </form>\n</div>\n<div class=\"modal-footer\">\n <button title=\"{{ 'Cancel' | translate }}\" class=\"btn btn-default\" (click)=\"close()\" translate>\n Cancel\n </button>\n\n <button\n title=\"{{ 'Save configuration to repository' | translate }}\"\n class=\"btn btn-primary\"\n (click)=\"save()\"\n [disabled]=\"saveConfigurationSnapshot.form.invalid\"\n translate\n >\n Save\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: SaveToRepositoryComponent, selector: "c8y-save-config-to-configuration-repository", ngImport: i0, template: "<div class=\"modal-header dialog-header\">\n <i c8yIcon=\"gears\"></i>\n <h4 id=\"modal-title\" translate>\n Save configuration\n </h4>\n</div>\n<div class=\"modal-body\" id=\"modal-body\">\n <form #saveConfigurationSnapshot=\"ngForm\" class=\"p-t-24\">\n <c8y-form-group>\n <label translate for=\"name\">Name</label>\n <input\n id=\"name\"\n type=\"text\"\n class=\"form-control\"\n autocomplete=\"off\"\n name=\"name\"\n [(ngModel)]=\"configSnapshot.name\"\n required\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"deviceType\">Device type</label>\n <input\n id=\"deviceType\"\n class=\"form-control\"\n rows=\"6\"\n name=\"deviceType\"\n [(ngModel)]=\"configSnapshot.deviceType\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"description\">Description</label>\n <input\n type=\"text\"\n id=\"description\"\n class=\"form-control\"\n maxlength=\"254\"\n autocomplete=\"off\"\n name=\"description\"\n [(ngModel)]=\"configSnapshot.description\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label translate for=\"configurationType\">Configuration type</label>\n <input\n id=\"configurationType\"\n class=\"form-control\"\n rows=\"6\"\n name=\"configurationType\"\n [(ngModel)]=\"configSnapshot.configurationType\"\n />\n </c8y-form-group>\n </form>\n</div>\n<div class=\"modal-footer\">\n <button title=\"{{ 'Cancel' | translate }}\" class=\"btn btn-default\" (click)=\"close()\" translate>\n Cancel\n </button>\n\n <button\n title=\"{{ 'Save configuration to repository' | translate }}\"\n class=\"btn btn-primary\"\n (click)=\"save()\"\n [disabled]=\"saveConfigurationSnapshot.form.invalid\"\n translate\n >\n Save\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
242
240
  }
243
241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SaveToRepositoryComponent, decorators: [{
244
242
  type: Component,
@@ -405,13 +403,13 @@ class ConfigurationPreviewComponent {
405
403
  this.deviceConfigurationService.updateConfigurations();
406
404
  }
407
405
  }
408
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationPreviewComponent, deps: [{ token: DeviceConfigurationService }, { token: i2.OperationRealtimeService }, { token: i3$1.BsModalService }, { token: i5.UserService }, { token: i2.AppStateService }, { token: i3.RepositoryService }, { token: i5.OperationService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
406
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationPreviewComponent, deps: [{ token: DeviceConfigurationService }, { token: i2.OperationRealtimeService }, { token: i3$1.BsModalService }, { token: i4.UserService }, { token: i2.AppStateService }, { token: i3.RepositoryService }, { token: i4.OperationService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
409
407
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ConfigurationPreviewComponent, selector: "c8y-device-configuration-preview", inputs: { device: "device", configurationType: "configurationType", configSnapshot: "configSnapshot", canSaveSnapshot: "canSaveSnapshot", actionButtonText: "actionButtonText", actionButtonIcon: "actionButtonIcon", isLegacy: "isLegacy", operationToTrigger: "operationToTrigger" }, ngImport: i0, template: "<div class=\"content-flex-55 p-b-16\">\n <div class=\"col-7 p-t-4\">\n <p>\n <span class=\"text-label-small text-uppercase m-r-4\" translate>Configuration</span>\n <span *ngIf=\"configSnapshot?.name; else emptyText\">\n <strong>{{ configSnapshot.name }}</strong>\n </span>\n <ng-template #emptyText>---</ng-template>\n </p>\n <p>\n <span class=\"text-label-small text-uppercase m-r-4\" translate>Last updated</span>\n <small *ngIf=\"configSnapshot?.time; else emptyDate\">\n {{ configSnapshot.time | c8yDate }}\n </small>\n <ng-template #emptyDate>---</ng-template>\n </p>\n </div>\n <div class=\"col-5\">\n <button\n id=\"action-btn\"\n class=\"btn btn-default btn-sm pull-right\"\n type=\"button\"\n title=\"{{ actionButtonText | translate }}\"\n (click)=\"createDeviceOperation()\"\n [disabled]=\"isCreateOperationDisabled()\"\n *ngIf=\"canCallAction\"\n >\n <i [c8yIcon]=\"actionButtonIcon\"></i>\n {{ actionButtonText | translate }}\n </button>\n </div>\n</div>\n<div class=\"c8y-empty-state text-left\" *ngIf=\"!configSnapshot?.binary && showBinary()\">\n <h1 [c8yIcon]=\"'file-image-o'\"></h1>\n <p>\n <strong translate>No preview available.</strong>\n <br />\n <small *ngIf=\"configSnapshot?.binary !== ''; else emptyFile\" translate>\n The file is not available.\n </small>\n <ng-template #emptyFile>\n <small translate>The file is empty.</small>\n </ng-template>\n </p>\n</div>\n<div *ngIf=\"configSnapshot?.binary && showBinary()\" class=\"flex-grow d-flex d-col\">\n <c8y-source-code-preview\n [text]=\"configSnapshot.binary\"\n [isDisabled]=\"true\"\n class=\"d-contents\"\n ></c8y-source-code-preview>\n <div *ngIf=\"canSaveSnapshot\" class=\"p-t-16\">\n <button\n title=\"{{ 'Download' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-sm pull-right m-l-8\"\n (click)=\"download()\"\n >\n {{ 'Download' | translate }}\n </button>\n <button\n title=\"{{ 'Save to repository' | translate }}\"\n *ngIf=\"hasPermission()\"\n type=\"button\"\n class=\"btn btn-default btn-sm pull-right\"\n (click)=\"saveToRepository()\"\n >\n {{ 'Save to repository' | translate }}\n </button>\n </div>\n</div>\n<div *ngIf=\"showOperation()\">\n <c8y-operation-details [operation]=\"operation\"></c8y-operation-details>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i8.OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "component", type: SourceCodePreviewComponent, selector: "c8y-source-code-preview", inputs: ["isDisabled", "text"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i2.DatePipe, name: "c8yDate" }] }); }
410
408
  }
411
409
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationPreviewComponent, decorators: [{
412
410
  type: Component,
413
411
  args: [{ selector: 'c8y-device-configuration-preview', template: "<div class=\"content-flex-55 p-b-16\">\n <div class=\"col-7 p-t-4\">\n <p>\n <span class=\"text-label-small text-uppercase m-r-4\" translate>Configuration</span>\n <span *ngIf=\"configSnapshot?.name; else emptyText\">\n <strong>{{ configSnapshot.name }}</strong>\n </span>\n <ng-template #emptyText>---</ng-template>\n </p>\n <p>\n <span class=\"text-label-small text-uppercase m-r-4\" translate>Last updated</span>\n <small *ngIf=\"configSnapshot?.time; else emptyDate\">\n {{ configSnapshot.time | c8yDate }}\n </small>\n <ng-template #emptyDate>---</ng-template>\n </p>\n </div>\n <div class=\"col-5\">\n <button\n id=\"action-btn\"\n class=\"btn btn-default btn-sm pull-right\"\n type=\"button\"\n title=\"{{ actionButtonText | translate }}\"\n (click)=\"createDeviceOperation()\"\n [disabled]=\"isCreateOperationDisabled()\"\n *ngIf=\"canCallAction\"\n >\n <i [c8yIcon]=\"actionButtonIcon\"></i>\n {{ actionButtonText | translate }}\n </button>\n </div>\n</div>\n<div class=\"c8y-empty-state text-left\" *ngIf=\"!configSnapshot?.binary && showBinary()\">\n <h1 [c8yIcon]=\"'file-image-o'\"></h1>\n <p>\n <strong translate>No preview available.</strong>\n <br />\n <small *ngIf=\"configSnapshot?.binary !== ''; else emptyFile\" translate>\n The file is not available.\n </small>\n <ng-template #emptyFile>\n <small translate>The file is empty.</small>\n </ng-template>\n </p>\n</div>\n<div *ngIf=\"configSnapshot?.binary && showBinary()\" class=\"flex-grow d-flex d-col\">\n <c8y-source-code-preview\n [text]=\"configSnapshot.binary\"\n [isDisabled]=\"true\"\n class=\"d-contents\"\n ></c8y-source-code-preview>\n <div *ngIf=\"canSaveSnapshot\" class=\"p-t-16\">\n <button\n title=\"{{ 'Download' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary btn-sm pull-right m-l-8\"\n (click)=\"download()\"\n >\n {{ 'Download' | translate }}\n </button>\n <button\n title=\"{{ 'Save to repository' | translate }}\"\n *ngIf=\"hasPermission()\"\n type=\"button\"\n class=\"btn btn-default btn-sm pull-right\"\n (click)=\"saveToRepository()\"\n >\n {{ 'Save to repository' | translate }}\n </button>\n </div>\n</div>\n<div *ngIf=\"showOperation()\">\n <c8y-operation-details [operation]=\"operation\"></c8y-operation-details>\n</div>\n" }]
414
- }], ctorParameters: () => [{ type: DeviceConfigurationService }, { type: i2.OperationRealtimeService }, { type: i3$1.BsModalService }, { type: i5.UserService }, { type: i2.AppStateService }, { type: i3.RepositoryService }, { type: i5.OperationService }, { type: i2.AlertService }], propDecorators: { device: [{
412
+ }], ctorParameters: () => [{ type: DeviceConfigurationService }, { type: i2.OperationRealtimeService }, { type: i3$1.BsModalService }, { type: i4.UserService }, { type: i2.AppStateService }, { type: i3.RepositoryService }, { type: i4.OperationService }, { type: i2.AlertService }], propDecorators: { device: [{
415
413
  type: Input
416
414
  }], configurationType: [{
417
415
  type: Input
@@ -545,13 +543,13 @@ class DeviceConfigurationComponent {
545
543
  }
546
544
  this.reloading = false;
547
545
  }
548
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DeviceConfigurationComponent, deps: [{ token: i1.ActivatedRoute }, { token: DeviceConfigurationService }, { token: i5.Realtime }, { token: i3.RepositoryService }], target: i0.ɵɵFactoryTarget.Component }); }
546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DeviceConfigurationComponent, deps: [{ token: i1.ActivatedRoute }, { token: DeviceConfigurationService }, { token: i4.Realtime }, { token: i3.RepositoryService }], target: i0.ɵɵFactoryTarget.Component }); }
549
547
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: DeviceConfigurationComponent, selector: "c8y-device-configuration", viewQueries: [{ propertyName: "textBasedConfigurationComponent", first: true, predicate: TextBasedConfigurationComponent, descendants: true }], ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button class=\"btn btn-link\" title=\"{{ 'Reload' | translate }}\" (click)=\"updateSnapshots()\">\n <i c8yIcon=\"refresh\" [ngClass]=\"{ 'icon-spin': reloading }\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage card-has-tabs\">\n <tabset>\n <div class=\"card-header separator\" *ngIf=\"showBinaryBasedConfig && !showTextBasedConfig\">\n <div class=\"card-title\">{{ 'Configurations' | translate }}</div>\n </div>\n <div class=\"card-header separator\" *ngIf=\"!showBinaryBasedConfig && showTextBasedConfig\">\n <div class=\"card-title\">{{ 'Text-based configuration' | translate }}</div>\n </div>\n <tab heading=\"{{ 'Configurations' | translate }}\" *ngIf=\"showBinaryBasedConfig\">\n <div class=\"card--grid card grid__col--4-8--md grid__row--6-6--md m-b-0\">\n <!-- DEVICE SUPPORTED CONFIGURATIONS -->\n <div class=\"card--grid__inner-scroll bg-level-1\">\n <div class=\"p-l-16 p-r-16\">\n <h5 class=\"legend form-block\">\n <span translate>Device-supported configurations</span>\n </h5>\n </div>\n <c8y-device-configuration-list\n [items]=\"supportedConfigurations\"\n [itemIcon]=\"'gears'\"\n (configSelected)=\"onConfigTypeSelected($event)\"\n ></c8y-device-configuration-list>\n </div>\n\n <!-- CONFIGURATION PREVIEW -->\n <div class=\"card--grid__inner-scroll d-flex d-col flex-grow\">\n <div class=\"card-block d-flex d-col flex-grow\">\n <h5 class=\"legend form-block\"><span translate>Preview</span></h5>\n\n <!-- EMPTY STATE -->\n\n <c8y-ui-empty-state\n *ngIf=\"!configurationType\"\n [icon]=\"'file-text'\"\n [title]=\"'No configuration selected.' | translate\"\n [subtitle]=\"'Select a configuration to preview.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <!-- PREVIEW AVAILABLE STATE -->\n <c8y-device-configuration-preview\n *ngIf=\"configurationType\"\n [device]=\"device\"\n [configurationType]=\"configurationType\"\n [configSnapshot]=\"configSnapshot\"\n [canSaveSnapshot]=\"true\"\n [operationToTrigger]=\"'c8y_UploadConfigFile'\"\n [actionButtonText]=\"'Get snapshot from device' | translate\"\n [actionButtonIcon]=\"'download'\"\n [isLegacy]=\"isLegacy\"\n class=\"d-flex d-col flex-grow\"\n ></c8y-device-configuration-preview>\n </div>\n </div>\n\n <!-- AVAILABLE SUPPORTED CONFIGURATIONS -->\n <div class=\"card--grid__inner-scroll bg-level-1\">\n <div class=\"p-l-16 p-r-16\">\n <h5 class=\"legend form-block\" translate>Available supported configurations</h5>\n </div>\n\n <!-- EMPTY STATE -->\n\n <c8y-ui-empty-state\n *ngIf=\"!configurationType\"\n [icon]=\"'gears'\"\n [title]=\"'No selection.' | translate\"\n [subtitle]=\"\n 'Select a configuration from the device-supported configuration list.' | translate\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div class=\"p-r-16\" *ngIf=\"configurationType\">\n <c8y-device-configuration-list\n [items]=\"repositorySnapshots\"\n [itemIcon]=\"'file-text'\"\n [emptyState]=\"repositorySnapshotsEmptyState\"\n [isFilterEnabled]=\"true\"\n (configSelected)=\"onRepositoryConfigSelected($event)\"\n ></c8y-device-configuration-list>\n </div>\n </div>\n\n <!-- CONFIGURATION PREVIEW -->\n <div class=\"card--grid__inner-scroll d-flex d-col flex-grow\">\n <div class=\"card-block flex-grow d-flex d-col\">\n <h5 class=\"legend form-block\" translate>Preview</h5>\n\n <!-- EMPTY STATE -->\n <c8y-ui-empty-state\n *ngIf=\"!repositorySnapshot\"\n [icon]=\"'file-text'\"\n [title]=\"'No configuration selected.' | translate\"\n [subtitle]=\"'Select a configuration to preview.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <!-- CONFIGURATION SELECTED STATE -->\n <c8y-device-configuration-preview\n *ngIf=\"repositorySnapshot\"\n [device]=\"device\"\n [configurationType]=\"configurationType\"\n [configSnapshot]=\"repositorySnapshot\"\n [operationToTrigger]=\"'c8y_DownloadConfigFile'\"\n [actionButtonText]=\"'Send configuration to device' | translate\"\n [actionButtonIcon]=\"'upload'\"\n [isLegacy]=\"isLegacy\"\n class=\"d-flex d-col flex-grow\"\n ></c8y-device-configuration-preview>\n </div>\n </div>\n </div>\n </tab>\n <tab heading=\"{{ 'Text-based configuration' | translate }}\" *ngIf=\"showTextBasedConfig\">\n <c8y-text-based-configuration></c8y-text-based-configuration>\n </tab>\n </tabset>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.TabsetAriaDirective, selector: "tabset" }, { kind: "directive", type: i7.TabDirective, selector: "tab, [tab]", inputs: ["heading", "id", "disabled", "removable", "customClass", "active"], outputs: ["selectTab", "deselect", "removed"], exportAs: ["tab"] }, { kind: "component", type: i7.TabsetComponent, selector: "tabset", inputs: ["vertical", "justified", "type"] }, { kind: "component", type: DeviceConfigurationListComponent, selector: "c8y-device-configuration-list", inputs: ["items", "itemIcon", "emptyState", "isFilterEnabled"], outputs: ["configSelected"] }, { kind: "component", type: ConfigurationPreviewComponent, selector: "c8y-device-configuration-preview", inputs: ["device", "configurationType", "configSnapshot", "canSaveSnapshot", "actionButtonText", "actionButtonIcon", "isLegacy", "operationToTrigger"] }, { kind: "component", type: TextBasedConfigurationComponent, selector: "c8y-text-based-configuration" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
550
548
  }
551
549
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DeviceConfigurationComponent, decorators: [{
552
550
  type: Component,
553
551
  args: [{ selector: 'c8y-device-configuration', template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button class=\"btn btn-link\" title=\"{{ 'Reload' | translate }}\" (click)=\"updateSnapshots()\">\n <i c8yIcon=\"refresh\" [ngClass]=\"{ 'icon-spin': reloading }\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage card-has-tabs\">\n <tabset>\n <div class=\"card-header separator\" *ngIf=\"showBinaryBasedConfig && !showTextBasedConfig\">\n <div class=\"card-title\">{{ 'Configurations' | translate }}</div>\n </div>\n <div class=\"card-header separator\" *ngIf=\"!showBinaryBasedConfig && showTextBasedConfig\">\n <div class=\"card-title\">{{ 'Text-based configuration' | translate }}</div>\n </div>\n <tab heading=\"{{ 'Configurations' | translate }}\" *ngIf=\"showBinaryBasedConfig\">\n <div class=\"card--grid card grid__col--4-8--md grid__row--6-6--md m-b-0\">\n <!-- DEVICE SUPPORTED CONFIGURATIONS -->\n <div class=\"card--grid__inner-scroll bg-level-1\">\n <div class=\"p-l-16 p-r-16\">\n <h5 class=\"legend form-block\">\n <span translate>Device-supported configurations</span>\n </h5>\n </div>\n <c8y-device-configuration-list\n [items]=\"supportedConfigurations\"\n [itemIcon]=\"'gears'\"\n (configSelected)=\"onConfigTypeSelected($event)\"\n ></c8y-device-configuration-list>\n </div>\n\n <!-- CONFIGURATION PREVIEW -->\n <div class=\"card--grid__inner-scroll d-flex d-col flex-grow\">\n <div class=\"card-block d-flex d-col flex-grow\">\n <h5 class=\"legend form-block\"><span translate>Preview</span></h5>\n\n <!-- EMPTY STATE -->\n\n <c8y-ui-empty-state\n *ngIf=\"!configurationType\"\n [icon]=\"'file-text'\"\n [title]=\"'No configuration selected.' | translate\"\n [subtitle]=\"'Select a configuration to preview.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <!-- PREVIEW AVAILABLE STATE -->\n <c8y-device-configuration-preview\n *ngIf=\"configurationType\"\n [device]=\"device\"\n [configurationType]=\"configurationType\"\n [configSnapshot]=\"configSnapshot\"\n [canSaveSnapshot]=\"true\"\n [operationToTrigger]=\"'c8y_UploadConfigFile'\"\n [actionButtonText]=\"'Get snapshot from device' | translate\"\n [actionButtonIcon]=\"'download'\"\n [isLegacy]=\"isLegacy\"\n class=\"d-flex d-col flex-grow\"\n ></c8y-device-configuration-preview>\n </div>\n </div>\n\n <!-- AVAILABLE SUPPORTED CONFIGURATIONS -->\n <div class=\"card--grid__inner-scroll bg-level-1\">\n <div class=\"p-l-16 p-r-16\">\n <h5 class=\"legend form-block\" translate>Available supported configurations</h5>\n </div>\n\n <!-- EMPTY STATE -->\n\n <c8y-ui-empty-state\n *ngIf=\"!configurationType\"\n [icon]=\"'gears'\"\n [title]=\"'No selection.' | translate\"\n [subtitle]=\"\n 'Select a configuration from the device-supported configuration list.' | translate\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div class=\"p-r-16\" *ngIf=\"configurationType\">\n <c8y-device-configuration-list\n [items]=\"repositorySnapshots\"\n [itemIcon]=\"'file-text'\"\n [emptyState]=\"repositorySnapshotsEmptyState\"\n [isFilterEnabled]=\"true\"\n (configSelected)=\"onRepositoryConfigSelected($event)\"\n ></c8y-device-configuration-list>\n </div>\n </div>\n\n <!-- CONFIGURATION PREVIEW -->\n <div class=\"card--grid__inner-scroll d-flex d-col flex-grow\">\n <div class=\"card-block flex-grow d-flex d-col\">\n <h5 class=\"legend form-block\" translate>Preview</h5>\n\n <!-- EMPTY STATE -->\n <c8y-ui-empty-state\n *ngIf=\"!repositorySnapshot\"\n [icon]=\"'file-text'\"\n [title]=\"'No configuration selected.' | translate\"\n [subtitle]=\"'Select a configuration to preview.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <!-- CONFIGURATION SELECTED STATE -->\n <c8y-device-configuration-preview\n *ngIf=\"repositorySnapshot\"\n [device]=\"device\"\n [configurationType]=\"configurationType\"\n [configSnapshot]=\"repositorySnapshot\"\n [operationToTrigger]=\"'c8y_DownloadConfigFile'\"\n [actionButtonText]=\"'Send configuration to device' | translate\"\n [actionButtonIcon]=\"'upload'\"\n [isLegacy]=\"isLegacy\"\n class=\"d-flex d-col flex-grow\"\n ></c8y-device-configuration-preview>\n </div>\n </div>\n </div>\n </tab>\n <tab heading=\"{{ 'Text-based configuration' | translate }}\" *ngIf=\"showTextBasedConfig\">\n <c8y-text-based-configuration></c8y-text-based-configuration>\n </tab>\n </tabset>\n</div>\n" }]
554
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: DeviceConfigurationService }, { type: i5.Realtime }, { type: i3.RepositoryService }], propDecorators: { textBasedConfigurationComponent: [{
552
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: DeviceConfigurationService }, { type: i4.Realtime }, { type: i3.RepositoryService }], propDecorators: { textBasedConfigurationComponent: [{
555
553
  type: ViewChild,
556
554
  args: [TextBasedConfigurationComponent]
557
555
  }] } });
@@ -709,7 +707,7 @@ class ConfigurationDetailComponent {
709
707
  }
710
708
  }
711
709
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationDetailComponent, deps: [{ token: i3.RepositoryService }, { token: i3$1.BsModalRef }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
712
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ConfigurationDetailComponent, selector: "c8y-configuration-detail", viewQueries: [{ propertyName: "configurationForm", first: true, predicate: ["configurationForm"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div\n class=\"modal-header dialog-header\"\n id=\"configurationModalTitle\"\n >\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"mo.id\"\n >\n Update configuration\n </h4>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"!mo.id\"\n >\n Add configuration\n </h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div\n class=\"modal-inner-scroll\"\n id=\"modal-body\"\n >\n <div\n class=\"modal-body\"\n id=\"configurationModalDescription\"\n >\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n name=\"version\"\n type=\"text\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n name=\"description\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n [(ngModel)]=\"configurationTypeMO\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li\n class=\"bg-level-2 p-8\"\n *ngIf=\"pattern.length > 0\"\n >\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n ></c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ submitButtonTitle | translate }}\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.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: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: i2.TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "fileUrl", "fileBinary", "config", "filePickerIndex", "fileUrlPopover"], outputs: ["onFilesPicked"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
710
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ConfigurationDetailComponent, selector: "c8y-configuration-detail", viewQueries: [{ propertyName: "configurationForm", first: true, predicate: ["configurationForm"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div\n class=\"modal-header dialog-header\"\n id=\"configurationModalTitle\"\n >\n <i [c8yIcon]=\"'cogs'\"></i>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"mo.id\"\n >\n Update configuration\n </h4>\n <h4\n id=\"modal-title\"\n translate\n *ngIf=\"!mo.id\"\n >\n Add configuration\n </h4>\n </div>\n\n <form\n class=\"d-contents\"\n #configurationForm=\"ngForm\"\n (ngSubmit)=\"configurationForm.form.valid && save()\"\n >\n <div\n class=\"modal-inner-scroll\"\n id=\"modal-body\"\n >\n <div\n class=\"modal-body\"\n id=\"configurationModalDescription\"\n >\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} hosts\"\n name=\"version\"\n type=\"text\"\n autocomplete=\"off\"\n required\n maxlength=\"254\"\n [(ngModel)]=\"version\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Device type</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"deviceType\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. Host configuration' | translate }} c8y_Linux\"\n name=\"description\"\n type=\"text\"\n autocomplete=\"off\"\n maxlength=\"254\"\n [(ngModel)]=\"description\"\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Configuration type</label>\n <c8y-typeahead\n placeholder=\"{{ 'e.g.' | translate }} ssh\"\n name=\"confType\"\n [(ngModel)]=\"configurationTypeMO\"\n maxlength=\"254\"\n (onSearch)=\"setPipe($event)\"\n displayProperty=\"configurationType\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let config of configs; pipe: filterPipe; notFound: notFoundTemplate\"\n (click)=\"configurationTypeMO = config; setPipe('')\"\n [active]=\"configurationTypeMO === config\"\n >\n <c8y-highlight\n [text]=\"config.configurationType || '--'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n <ng-template #notFoundTemplate>\n <c8y-li\n class=\"bg-level-2 p-8\"\n *ngIf=\"pattern.length > 0\"\n >\n <span translate>No match found.</span>\n <button\n class=\"btn btn-primary btn-xs m-l-8\"\n title=\"{{ 'Add new`configuration type`' | translate }}\"\n type=\"button\"\n translate\n >\n Add new`configuration type`\n </button>\n </c8y-li>\n </ng-template>\n </c8y-typeahead>\n </c8y-form-group>\n\n <c8y-form-group>\n <div\n class=\"legend form-block m-t-40\"\n translate\n >\n Configuration file\n </div>\n <c8y-file-picker\n [maxAllowedFiles]=\"1\"\n (onFilesPicked)=\"onFile($event)\"\n [uploadChoice]=\"uploadChoice\"\n [fileUrl]=\"binary.url\"\n [fileBinary]=\"binary.file\"\n [fileUrlPopover]=\"textForConfigurationUrlPopover\"\n ></c8y-file-picker>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n [disabled]=\"saving\"\n >\n <span translate>Cancel</span>\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ submitButtonTitle | translate }}\"\n type=\"submit\"\n [ngClass]=\"{ 'btn-pending': saving }\"\n [disabled]=\"\n !configurationForm.valid ||\n configurationForm.pristine ||\n (!binary?.url && !binary?.file) ||\n saving\n \"\n >\n {{ submitButtonTitle | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.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: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: i2.TypeaheadComponent, selector: "c8y-typeahead", inputs: ["required", "maxlength", "disabled", "allowFreeEntries", "placeholder", "displayProperty", "icon", "name", "autoClose", "hideNew", "container", "selected"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.FilePickerComponent, selector: "c8y-file-picker", inputs: ["maxAllowedFiles", "uploadChoice", "fileUrl", "fileBinary", "config", "filePickerIndex", "fileUrlPopover"], outputs: ["onFilesPicked"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
713
711
  }
714
712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationDetailComponent, decorators: [{
715
713
  type: Component,
@@ -720,26 +718,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
720
718
  }] } });
721
719
 
722
720
  class ConfigurationListComponent {
723
- constructor(alert, repositoryService, bsModalService, modalService, translateService, inventoryBinaryService, inventoryService) {
721
+ constructor(alert, gridService, repositoryService, bsModalService, modalService, translateService, inventoryBinaryService) {
724
722
  this.alert = alert;
723
+ this.gridService = gridService;
725
724
  this.repositoryService = repositoryService;
726
725
  this.bsModalService = bsModalService;
727
726
  this.modalService = modalService;
728
727
  this.translateService = translateService;
729
728
  this.inventoryBinaryService = inventoryBinaryService;
730
- this.inventoryService = inventoryService;
731
- this.filterTerm = '';
732
- this.reloading = false;
729
+ this.refresh$ = new EventEmitter();
730
+ this.pagination = {
731
+ pageSize: 50,
732
+ currentPage: 1
733
+ };
734
+ this.noResultsMessage = gettext('No results to display.');
735
+ this.noDataMessage = gettext('There are no configuration snapshots defined.');
736
+ this.noResultsSubtitle = gettext('Refine your search terms or check your spelling.');
737
+ this.noDataSubtitle = gettext('Add a configuration snapshot first.');
738
+ this.actionControls = [];
739
+ this.columns = [
740
+ new RepositoryItemNameGridColumn({
741
+ filterLabel: gettext('Filter configurations by name'),
742
+ placeholder: gettext('SSH'),
743
+ callback: this.edit.bind(this)
744
+ }),
745
+ new DescriptionGridColumn({
746
+ filterLabel: gettext('Filter configurations by description'),
747
+ placeholder: gettext('SSH configuration')
748
+ }),
749
+ new FileGridColumn(),
750
+ new DeviceTypeGridColumn({
751
+ path: 'deviceType',
752
+ filterLabel: gettext('Filter configurations by device type')
753
+ }),
754
+ new TypeGridColumn({
755
+ header: gettext('Configuration type'),
756
+ filterLabel: gettext('Filter by configuration type'),
757
+ example: 'ssh',
758
+ path: 'configurationType',
759
+ repositoryType: RepositoryType.CONFIGURATION
760
+ })
761
+ ];
762
+ this.sizeRequestDone = false;
733
763
  this.DELETED_SUCCESS_MSG = gettext('Configuration deleted.');
764
+ this.serverSideDataCallback = this.onDataSourceModifier.bind(this);
734
765
  }
735
766
  ngOnInit() {
736
- this.loadConfigurations();
767
+ this.actionControls.push({
768
+ type: "EDIT" /* BuiltInActionType.Edit */,
769
+ callback: this.edit.bind(this)
770
+ });
771
+ this.actionControls.push({
772
+ type: "DELETE" /* BuiltInActionType.Delete */,
773
+ callback: this.delete.bind(this)
774
+ });
775
+ this.actionControls.push({
776
+ type: 'download',
777
+ icon: 'download',
778
+ text: gettext('Download'),
779
+ showIf: row => this.isBinaryFile(row),
780
+ callback: this.download.bind(this)
781
+ });
737
782
  }
738
- async loadConfigurations() {
739
- this.reloading = true;
740
- this.configurations$ = of(await this.repositoryService.listRepositoryEntries(RepositoryType.CONFIGURATION));
741
- this.reloading = false;
742
- this.reset();
783
+ async onDataSourceModifier(dataSourceModifier) {
784
+ const dataRequest = this.repositoryService.listRepositoryEntries(RepositoryType.CONFIGURATION, {
785
+ query: this.gridService.getQueryObj(dataSourceModifier.columns),
786
+ skipDefaultOrder: true,
787
+ params: {
788
+ pageSize: dataSourceModifier.pagination.pageSize,
789
+ currentPage: dataSourceModifier.pagination.currentPage,
790
+ withTotalPages: true
791
+ }
792
+ });
793
+ const filtererdSizeRequest = this.repositoryService
794
+ .listRepositoryEntries(RepositoryType.CONFIGURATION, {
795
+ query: this.gridService.getQueryObj(dataSourceModifier.columns),
796
+ skipDefaultOrder: true,
797
+ params: { pageSize: 1 }
798
+ })
799
+ .then(response => response?.paging?.totalPages);
800
+ this.size$ = this.repositoryService
801
+ .listRepositoryEntries(RepositoryType.CONFIGURATION, {
802
+ skipDefaultOrder: true,
803
+ params: { pageSize: 1 }
804
+ })
805
+ .then(response => {
806
+ this.sizeRequestDone = true;
807
+ return response?.paging?.totalPages;
808
+ });
809
+ const [dataResponse, size, filteredSize] = await Promise.all([
810
+ dataRequest,
811
+ this.size$,
812
+ filtererdSizeRequest
813
+ ]);
814
+ const { res, data, paging } = dataResponse;
815
+ const serverSideDataResult = {
816
+ res,
817
+ data,
818
+ paging,
819
+ filteredSize,
820
+ size
821
+ };
822
+ return serverSideDataResult;
743
823
  }
744
824
  async add() {
745
825
  try {
@@ -750,7 +830,7 @@ class ConfigurationListComponent {
750
830
  ignoreBackdropClick: true,
751
831
  keyboard: false
752
832
  }).content.result;
753
- await this.loadConfigurations();
833
+ this.refresh$.next();
754
834
  }
755
835
  catch (ex) {
756
836
  // intended empty
@@ -776,7 +856,7 @@ class ConfigurationListComponent {
776
856
  }).content;
777
857
  modal.mo = configuration;
778
858
  await modal.result;
779
- await this.loadConfigurations();
859
+ this.refresh$.next();
780
860
  }
781
861
  catch (ex) {
782
862
  // intended empty
@@ -787,9 +867,6 @@ class ConfigurationListComponent {
787
867
  ? !!this.inventoryBinaryService.getIdFromUrl(configuration.url)
788
868
  : false;
789
869
  }
790
- getBinaryName(configuration) {
791
- return this.repositoryService.getBinaryName$(configuration.url);
792
- }
793
870
  async download(configuration) {
794
871
  const fileBinary = await this.repositoryService.getBinaryFile(configuration.url, {
795
872
  allowExternal: false
@@ -815,7 +892,7 @@ class ConfigurationListComponent {
815
892
  await this.modalService.confirm(title, body, Status.DANGER, labels);
816
893
  await this.repositoryService.delete(configuration);
817
894
  this.alert.success(this.DELETED_SUCCESS_MSG);
818
- await this.loadConfigurations();
895
+ this.refresh$.next();
819
896
  }
820
897
  catch (ex) {
821
898
  if (ex) {
@@ -823,46 +900,19 @@ class ConfigurationListComponent {
823
900
  }
824
901
  }
825
902
  }
826
- setPipe(filterTerm) {
827
- this.filterTerm = filterTerm;
828
- this.filterPipe = pipe(map(data => {
829
- this.data =
830
- filterTerm.trim().length === 0
831
- ? data
832
- : data.filter(mo => this.filterContainString(mo.name, filterTerm) ||
833
- this.filterContainString(mo.configurationType, filterTerm) ||
834
- this.filterContainString(mo.deviceType, filterTerm) ||
835
- this.filterContainString(mo.description, filterTerm));
836
- return this.data;
837
- }));
838
- }
839
- shouldShowEmptyState() {
840
- return !(this.data && this.data.length > 0);
841
- }
842
- reset() {
843
- this.filter.filterTerm = '';
844
- this.setPipe('');
845
- }
846
- filterContainString(name, filterTerm) {
847
- const term = filterTerm.toLowerCase().trim();
848
- return name && name.toLowerCase().indexOf(term) > -1;
903
+ trackByName(_index, column) {
904
+ return column.name;
849
905
  }
850
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationListComponent, deps: [{ token: i2.AlertService }, { token: i3.RepositoryService }, { token: i3$1.BsModalService }, { token: i2.ModalService }, { token: i4$1.TranslateService }, { token: i5.InventoryBinaryService }, { token: i5.InventoryService }], target: i0.ɵɵFactoryTarget.Component }); }
851
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ConfigurationListComponent, selector: "c8y-configuration-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n <span\n class=\"m-r-4\"\n translate\n >\n Configuration repository\n </span>\n <small *ngIf=\"(configurations$ | async)?.paging.totalPages === 1 && !filterTerm\">\n {{ (configurations$ | async).data.length }}\n <span translate>snapshots</span>\n </small>\n <small\n [tooltip]=\"'More data available. Scroll to the bottom of the list to load it.' | translate\"\n container=\"body\"\n *ngIf=\"(configurations$ | async)?.paging.totalPages > 1 && !filterTerm\"\n >\n {{ (configurations$ | async).paging.pageSize }}+\n <span translate>snapshots</span>\n </small>\n</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=\"gears\"\n label=\"{{ 'Configuration repository' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item itemClass=\"navbar-form\">\n <c8y-filter\n [icon]=\"'search'\"\n (onSearch)=\"setPipe($event)\"\n ></c8y-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration snapshot' | 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)=\"loadConfigurations()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n></c8y-help>\n\n<!-- empty state -->\n<c8y-ui-empty-state\n [icon]=\"'gears'\"\n [title]=\"'There are no configuration snapshots defined.' | translate\"\n [subtitle]=\"'Add a configuration snapshot first.' | translate\"\n *ngIf=\"!filterTerm && (configurations$ | async)?.data.length === 0\"\n>\n <div>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n {{ 'Add configuration snapshot' | translate }}\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n\n<!-- no results empty state -->\n<c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n *ngIf=\"shouldShowEmptyState() && (configurations$ | async)?.data.length > 0\"\n></c8y-ui-empty-state>\n\n<c8y-list-group\n class=\"m-b-24\"\n *ngIf=\"(configurations$ | async)?.data.length > 0\"\n [ngClass]=\"{\n 'dd-low': data && data.length ? data.length < 10 : (configurations$ | async)?.data.length < 10\n }\"\n>\n <c8y-li\n class=\"page-sticky-header hidden-xs\"\n [emptyActions]=\"true\"\n *ngIf=\"!shouldShowEmptyState()\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n {{ 'Configuration' | translate }}\n </div>\n <div class=\"col-3\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-3\">\n {{ 'File' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Device type' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Configuration type' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let configuration of configurations$; pipe: filterPipe\">\n <c8y-li-icon icon=\"gears\"></c8y-li-icon>\n <div class=\"content-flex-60\">\n <button\n class=\"btn-clean col-2\"\n title=\"{{ configuration.name || '-' }}\"\n type=\"button\"\n (click)=\"edit(configuration)\"\n >\n <span class=\"text-truncate\">\n <c8y-highlight\n [text]=\"configuration.name || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </button>\n <div class=\"col-3\">\n <div class=\"text-label-small visible-xs-inline m-r-4\">\n {{ 'Description' | translate }}\n </div>\n <small\n class=\"text-truncate\"\n title=\"configuration.description\"\n *ngIf=\"configuration.description; else emptyDescription\"\n >\n <c8y-highlight\n [text]=\"configuration.description || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </small>\n </div>\n <div class=\"col-3\">\n <span class=\"text-truncate\">\n <span\n class=\"text-label-small m-r-4 visible-xs-inline\"\n translate\n >\n File\n </span>\n <small\n title=\"{{ getBinaryName(configuration) | async }}\"\n *ngIf=\"isBinaryFile(configuration); else noFile\"\n >\n {{ getBinaryName(configuration) | async }}\n </small>\n <ng-template #noFile>\n <small title=\"{{ configuration.url }}\">\n {{ configuration.url }}\n </small>\n </ng-template>\n </span>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Device type' | translate }}: {{ configuration.deviceType || '-' }}\"\n >\n <span\n class=\"text-label-small visible-xs-inline m-r-4\"\n translate\n >\n Device type\n </span>\n <span *ngIf=\"configuration.deviceType; else emptyText\">\n <c8y-highlight\n [text]=\"configuration.deviceType || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ configuration.configurationType }}\"\n >\n <span\n class=\"label label-primary\"\n *ngIf=\"configuration.configurationType; else emptyText\"\n >\n <c8y-highlight\n [text]=\"configuration.configurationType\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </div>\n </div>\n </div>\n <c8y-li-action\n icon=\"pencil\"\n (click)=\"edit(configuration)\"\n label=\"{{ 'Edit' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n icon=\"delete\"\n (click)=\"delete(configuration)\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n icon=\"download\"\n *ngIf=\"isBinaryFile(configuration)\"\n (click)=\"download(configuration)\"\n label=\"{{ 'Download' | translate }}\"\n ></c8y-li-action>\n <ng-template #emptyText>\n <small class=\"text-muted\">\n <em>{{ 'Undefined' | translate }}</em>\n </small>\n </ng-template>\n <ng-template #emptyDescription>\n <small class=\"text-muted\">\n <em>{{ 'No description' | translate }}</em>\n </small>\n </ng-template>\n </c8y-li>\n</c8y-list-group>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.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: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: i2.FilterInputComponent, selector: "c8y-filter", inputs: ["icon"], outputs: ["onSearch"] }, { kind: "directive", type: i2.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i2.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i2.ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: i2.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "directive", type: i7$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
906
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationListComponent, deps: [{ token: i2.AlertService }, { token: i2.DataGridService }, { token: i3.RepositoryService }, { token: i3$1.BsModalService }, { token: i2.ModalService }, { token: i4$2.TranslateService }, { token: i4.InventoryBinaryService }], target: i0.ɵɵFactoryTarget.Component }); }
907
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: ConfigurationListComponent, selector: "c8y-configuration-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n <span\n class=\"m-r-4\"\n translate\n >\n Configuration repository\n </span>\n <small>\n {{ size$ | async }}\n <span translate>snapshots</span>\n </small>\n</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=\"gears\"\n label=\"{{ 'Configuration repository' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration snapshot' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n></c8y-help>\n\n<div class=\"content-fullpage border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Configurations' | translate\"\n [refresh]=\"refresh$\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'gears'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <ng-container *ngIf=\"stats?.size === 0\">\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n {{ 'Add configuration snapshot' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n </ng-container>\n </c8y-ui-empty-state>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByName\">\n <c8y-column [name]=\"column.name\"></c8y-column>\n </ng-container>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.ColumnDirective, selector: "c8y-column", inputs: ["name"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i2.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i2.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: i2.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
852
908
  }
853
- __decorate([
854
- memoize(property('id')),
855
- __metadata("design:type", Function),
856
- __metadata("design:paramtypes", [Object]),
857
- __metadata("design:returntype", void 0)
858
- ], ConfigurationListComponent.prototype, "getBinaryName", null);
859
909
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationListComponent, decorators: [{
860
910
  type: Component,
861
- args: [{ selector: 'c8y-configuration-list', template: "<c8y-title>\n <span\n class=\"m-r-4\"\n translate\n >\n Configuration repository\n </span>\n <small *ngIf=\"(configurations$ | async)?.paging.totalPages === 1 && !filterTerm\">\n {{ (configurations$ | async).data.length }}\n <span translate>snapshots</span>\n </small>\n <small\n [tooltip]=\"'More data available. Scroll to the bottom of the list to load it.' | translate\"\n container=\"body\"\n *ngIf=\"(configurations$ | async)?.paging.totalPages > 1 && !filterTerm\"\n >\n {{ (configurations$ | async).paging.pageSize }}+\n <span translate>snapshots</span>\n </small>\n</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=\"gears\"\n label=\"{{ 'Configuration repository' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item itemClass=\"navbar-form\">\n <c8y-filter\n [icon]=\"'search'\"\n (onSearch)=\"setPipe($event)\"\n ></c8y-filter>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration snapshot' | 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)=\"loadConfigurations()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n></c8y-help>\n\n<!-- empty state -->\n<c8y-ui-empty-state\n [icon]=\"'gears'\"\n [title]=\"'There are no configuration snapshots defined.' | translate\"\n [subtitle]=\"'Add a configuration snapshot first.' | translate\"\n *ngIf=\"!filterTerm && (configurations$ | async)?.data.length === 0\"\n>\n <div>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n {{ 'Add configuration snapshot' | translate }}\n </button>\n </div>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n\n<!-- no results empty state -->\n<c8y-ui-empty-state\n [icon]=\"'search'\"\n [title]=\"'No results to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n *ngIf=\"shouldShowEmptyState() && (configurations$ | async)?.data.length > 0\"\n></c8y-ui-empty-state>\n\n<c8y-list-group\n class=\"m-b-24\"\n *ngIf=\"(configurations$ | async)?.data.length > 0\"\n [ngClass]=\"{\n 'dd-low': data && data.length ? data.length < 10 : (configurations$ | async)?.data.length < 10\n }\"\n>\n <c8y-li\n class=\"page-sticky-header hidden-xs\"\n [emptyActions]=\"true\"\n *ngIf=\"!shouldShowEmptyState()\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-2\">\n {{ 'Configuration' | translate }}\n </div>\n <div class=\"col-3\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-3\">\n {{ 'File' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Device type' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Configuration type' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let configuration of configurations$; pipe: filterPipe\">\n <c8y-li-icon icon=\"gears\"></c8y-li-icon>\n <div class=\"content-flex-60\">\n <button\n class=\"btn-clean col-2\"\n title=\"{{ configuration.name || '-' }}\"\n type=\"button\"\n (click)=\"edit(configuration)\"\n >\n <span class=\"text-truncate\">\n <c8y-highlight\n [text]=\"configuration.name || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </button>\n <div class=\"col-3\">\n <div class=\"text-label-small visible-xs-inline m-r-4\">\n {{ 'Description' | translate }}\n </div>\n <small\n class=\"text-truncate\"\n title=\"configuration.description\"\n *ngIf=\"configuration.description; else emptyDescription\"\n >\n <c8y-highlight\n [text]=\"configuration.description || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </small>\n </div>\n <div class=\"col-3\">\n <span class=\"text-truncate\">\n <span\n class=\"text-label-small m-r-4 visible-xs-inline\"\n translate\n >\n File\n </span>\n <small\n title=\"{{ getBinaryName(configuration) | async }}\"\n *ngIf=\"isBinaryFile(configuration); else noFile\"\n >\n {{ getBinaryName(configuration) | async }}\n </small>\n <ng-template #noFile>\n <small title=\"{{ configuration.url }}\">\n {{ configuration.url }}\n </small>\n </ng-template>\n </span>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ 'Device type' | translate }}: {{ configuration.deviceType || '-' }}\"\n >\n <span\n class=\"text-label-small visible-xs-inline m-r-4\"\n translate\n >\n Device type\n </span>\n <span *ngIf=\"configuration.deviceType; else emptyText\">\n <c8y-highlight\n [text]=\"configuration.deviceType || '-'\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </div>\n </div>\n <div class=\"col-2\">\n <div\n class=\"text-truncate\"\n title=\"{{ configuration.configurationType }}\"\n >\n <span\n class=\"label label-primary\"\n *ngIf=\"configuration.configurationType; else emptyText\"\n >\n <c8y-highlight\n [text]=\"configuration.configurationType\"\n elementClass=\"text-info\"\n [pattern]=\"filterTerm\"\n ></c8y-highlight>\n </span>\n </div>\n </div>\n </div>\n <c8y-li-action\n icon=\"pencil\"\n (click)=\"edit(configuration)\"\n label=\"{{ 'Edit' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n icon=\"delete\"\n (click)=\"delete(configuration)\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n icon=\"download\"\n *ngIf=\"isBinaryFile(configuration)\"\n (click)=\"download(configuration)\"\n label=\"{{ 'Download' | translate }}\"\n ></c8y-li-action>\n <ng-template #emptyText>\n <small class=\"text-muted\">\n <em>{{ 'Undefined' | translate }}</em>\n </small>\n </ng-template>\n <ng-template #emptyDescription>\n <small class=\"text-muted\">\n <em>{{ 'No description' | translate }}</em>\n </small>\n </ng-template>\n </c8y-li>\n</c8y-list-group>\n" }]
862
- }], ctorParameters: () => [{ type: i2.AlertService }, { type: i3.RepositoryService }, { type: i3$1.BsModalService }, { type: i2.ModalService }, { type: i4$1.TranslateService }, { type: i5.InventoryBinaryService }, { type: i5.InventoryService }], propDecorators: { filter: [{
911
+ args: [{ selector: 'c8y-configuration-list', template: "<c8y-title>\n <span\n class=\"m-r-4\"\n translate\n >\n Configuration repository\n </span>\n <small>\n {{ size$ | async }}\n <span translate>snapshots</span>\n </small>\n</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=\"gears\"\n label=\"{{ 'Configuration repository' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration snapshot' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n></c8y-help>\n\n<div class=\"content-fullpage border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Configurations' | translate\"\n [refresh]=\"refresh$\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'gears'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <ng-container *ngIf=\"stats?.size === 0\">\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add configuration snapshot' | translate }}\"\n type=\"button\"\n (click)=\"add()\"\n >\n {{ 'Add configuration snapshot' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a\n c8y-guide-href=\"/docs/device-management-application/managing-device-data/#managing-configurations\"\n >\n user documentation\n </a>\n .\n </small>\n </p>\n </ng-container>\n </c8y-ui-empty-state>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByName\">\n <c8y-column [name]=\"column.name\"></c8y-column>\n </ng-container>\n </c8y-data-grid>\n</div>\n" }]
912
+ }], ctorParameters: () => [{ type: i2.AlertService }, { type: i2.DataGridService }, { type: i3.RepositoryService }, { type: i3$1.BsModalService }, { type: i2.ModalService }, { type: i4$2.TranslateService }, { type: i4.InventoryBinaryService }], propDecorators: { filter: [{
863
913
  type: ViewChild,
864
914
  args: [FilterInputComponent, { static: false }]
865
- }], getBinaryName: [] } });
915
+ }] } });
866
916
 
867
917
  class ConfigurationRepositoryNavigationFactory {
868
918
  constructor() {