@c8y/ngx-components 1021.29.4 → 1021.31.0

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 (40) hide show
  1. package/device-profile/device-profile.component.d.ts.map +1 -1
  2. package/device-profile/device-profile.model.d.ts +3 -0
  3. package/device-profile/device-profile.model.d.ts.map +1 -1
  4. package/device-profile/device-profile.service.d.ts +1 -1
  5. package/device-profile/device-profile.service.d.ts.map +1 -1
  6. package/device-profile/device-tab-profile/device-tab-profile.component.d.ts +2 -1
  7. package/device-profile/device-tab-profile/device-tab-profile.component.d.ts.map +1 -1
  8. package/esm2022/core/i18n/translation-loader.service.mjs +2 -2
  9. package/esm2022/device-profile/device-profile.component.mjs +4 -3
  10. package/esm2022/device-profile/device-profile.model.mjs +1 -1
  11. package/esm2022/device-profile/device-profile.service.mjs +17 -16
  12. package/esm2022/device-profile/device-tab-profile/device-profile-item-list.component.mjs +3 -3
  13. package/esm2022/device-profile/device-tab-profile/device-tab-profile.component.mjs +20 -4
  14. package/esm2022/repository/shared/repository.model.mjs +1 -1
  15. package/esm2022/widgets/implementations/alarms/alarm-widget.service.mjs +2 -2
  16. package/esm2022/widgets/implementations/info-gauge/info-gauge-widget-config/info-gauge-widget-config.component.mjs +2 -2
  17. package/esm2022/widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.mjs +2 -2
  18. package/esm2022/widgets/implementations/linear-gauge/linear-gauge-widget-config/linear-gauge-widget-config.component.mjs +2 -2
  19. package/fesm2022/c8y-ngx-components-device-profile.mjs +38 -20
  20. package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +1 -1
  23. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  24. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +1 -1
  25. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  26. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +1 -1
  27. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
  28. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +1 -1
  29. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
  30. package/fesm2022/c8y-ngx-components.mjs +1 -1
  31. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  32. package/locales/de.po +1 -1
  33. package/locales/es.po +1 -1
  34. package/locales/fr.po +1 -1
  35. package/locales/nl.po +1 -1
  36. package/locales/pl.po +1 -1
  37. package/locales/pt_BR.po +1 -1
  38. package/package.json +1 -1
  39. package/repository/shared/repository.model.d.ts +1 -0
  40. package/repository/shared/repository.model.d.ts.map +1 -1
@@ -4,7 +4,7 @@ import * as i2 from '@c8y/ngx-components';
4
4
  import { NavigatorNode, gettext, PRODUCT_EXPERIENCE_EVENT_SOURCE, ModalSelectionMode, BuiltInActionType, Status, ManagedObjectRealtimeService, ViewContext, CoreModule, CommonModule, hookNavigator, hookRoute } from '@c8y/ngx-components';
5
5
  import * as i1 from '@c8y/client';
6
6
  import { QueriesUtil, OperationStatus } from '@c8y/client';
7
- import { get, sortBy, toArray, assign, concat, uniqWith, isEqual, has, isEmpty, cloneDeep } from 'lodash-es';
7
+ import { get, sortBy, toArray, omitBy, isNil, assign, concat, uniqWith, isEqual, has, isEmpty, cloneDeep, pickBy } from 'lodash-es';
8
8
  import * as i1$1 from '@c8y/ngx-components/repository/shared';
9
9
  import { PRODUCT_EXPERIENCE_REPOSITORY_SHARED, RepositoryType, RepositorySelectModalComponent, RepositoryItemNameGridColumn, DeviceTypeGridColumn, SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
10
10
  import { Subject, from, pipe } from 'rxjs';
@@ -125,12 +125,12 @@ class DeviceProfileService {
125
125
  if (profileFirmware) {
126
126
  profileItems.push(profileFirmware);
127
127
  }
128
- return this.createProfileComparison(deviceItems, profileItems, 'name', 'version', this.getAlert('firmware'));
128
+ return this.createProfileComparison(deviceItems, profileItems, 'name', 'version', null, this.getAlert('firmware'));
129
129
  }
130
130
  getSoftwareItems(device, selectedProfile) {
131
131
  const deviceSoftware = device.c8y_SoftwareList;
132
132
  const profileSoftware = get(selectedProfile, 'c8y_DeviceProfile.software');
133
- return this.createProfileComparison(deviceSoftware, profileSoftware, 'name', 'version', this.getAlert('software'));
133
+ return this.createProfileComparison(deviceSoftware, profileSoftware, 'name', 'version', 'softwareType', this.getAlert('software'));
134
134
  }
135
135
  getConfigurationItems(device, selectedProfile) {
136
136
  const deviceConfiguration = [];
@@ -140,7 +140,7 @@ class DeviceProfileService {
140
140
  }
141
141
  });
142
142
  const profileConfiguration = get(selectedProfile, 'c8y_DeviceProfile.configuration');
143
- return this.createProfileComparison(deviceConfiguration, profileConfiguration, 'url', 'type', this.getAlert('configuration'));
143
+ return this.createProfileComparison(deviceConfiguration, profileConfiguration, 'url', null, 'type', this.getAlert('configuration'));
144
144
  }
145
145
  getAlert(itemType) {
146
146
  const notInstalled = (comparisionResult) => {
@@ -169,31 +169,33 @@ class DeviceProfileService {
169
169
  return notInstalled;
170
170
  }
171
171
  }
172
- createProfileComparison(deviceItems = [], profileItems = [], mergeByProperty, propertyNameWithDetails, getAlert) {
173
- const comparisonObj = this.createProfileComparisonFromDeviceItems(deviceItems, mergeByProperty, propertyNameWithDetails);
174
- const extendedComparisonObj = this.extendProfileComparisonWithProfileItems(comparisonObj, profileItems, mergeByProperty, propertyNameWithDetails, getAlert);
172
+ createProfileComparison(deviceItems = [], profileItems = [], mergeByProperty, propertyNameWithDetails, propertyNameWithType, getAlert) {
173
+ const comparisonObj = this.createProfileComparisonFromDeviceItems(deviceItems, mergeByProperty, propertyNameWithDetails, propertyNameWithType);
174
+ const extendedComparisonObj = this.extendProfileComparisonWithProfileItems(comparisonObj, profileItems, mergeByProperty, propertyNameWithDetails, propertyNameWithType, getAlert);
175
175
  return sortBy(toArray(extendedComparisonObj), 'name');
176
176
  }
177
- createProfileComparisonFromDeviceItems(deviceItems, mergeByProperty, propertyNameWithDetails) {
177
+ createProfileComparisonFromDeviceItems(deviceItems, mergeByProperty, propertyNameWithDetails, propertyNameWithType) {
178
178
  return deviceItems.reduce((comapritionItem, deviceItem) => Object.assign(comapritionItem, {
179
179
  [deviceItem[mergeByProperty]]: {
180
- device: {
180
+ device: omitBy({
181
181
  itemName: deviceItem.name,
182
182
  itemDetails: deviceItem[propertyNameWithDetails],
183
+ itemType: deviceItem[propertyNameWithType],
183
184
  itemUrl: deviceItem.url
184
- },
185
+ }, isNil),
185
186
  profile: undefined
186
187
  }
187
188
  }), {});
188
189
  }
189
- extendProfileComparisonWithProfileItems(comparisonObj, profileItems, mergeByProperty, propertyNameWithDetails, getAlert) {
190
+ extendProfileComparisonWithProfileItems(comparisonObj, profileItems, mergeByProperty, propertyNameWithDetails, propertyNameWithType, getAlert) {
190
191
  profileItems.forEach(profileItem => {
191
192
  const comparisionResult = {
192
- profile: {
193
+ profile: omitBy({
193
194
  itemName: profileItem.name,
194
195
  itemDetails: profileItem[propertyNameWithDetails],
196
+ itemType: profileItem[propertyNameWithType],
195
197
  itemUrl: profileItem.url
196
- },
198
+ }, isNil),
197
199
  device: comparisonObj[profileItem[mergeByProperty]]
198
200
  ? comparisonObj[profileItem[mergeByProperty]].device
199
201
  : undefined
@@ -461,6 +463,7 @@ class DeviceProfileComponent {
461
463
  name: selectedItem.name,
462
464
  version: selectedItem.version,
463
465
  url: selectedItem.url,
466
+ softwareType: selectedItem.softwareType,
464
467
  action: 'install'
465
468
  };
466
469
  });
@@ -539,7 +542,7 @@ class DeviceProfileComponent {
539
542
  provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
540
543
  useExisting: forwardRef(() => DeviceProfileComponent)
541
544
  }
542
- ], ngImport: i0, template: "<c8y-title>{{ profileName }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n label=\"{{ 'Management' | translate }}\"\n icon=\"c8y-management\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-device-profile'\"\n [label]=\"'Device profiles' | translate\"\n [path]=\"'device-profiles'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item label=\"{{ profileName }}\" icon=\"c8y-device-profile\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div *ngIf=\"deviceProfile\" class=\"row\">\n <div class=\"col-lg-12 col-lg-max\">\n <div class=\"card card--fullpage\" *ngIf=\"deviceProfile\">\n <div class=\"card-block bg-level-1 flex-no-shrink p-t-24 p-b-24 overflow-visible\">\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i class=\"c8y-icon-duocolor icon-48 c8y-icon c8y-icon-device-profile\"></i>\n <p>\n <small class=\"label label-info\">{{ 'Device profile' | translate }}</small>\n </p>\n </div>\n <div class=\"flex-grow col-10\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <form #editNameForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\" translate>Name</label>\n <div class=\"input-group input-group-editable\">\n <input\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"deviceProfile.name\"\n name=\"name\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n data-cy=\"device-profile--add-device-profile-name\"\n size=\"{{ deviceProfile.name?.length || 1 }}\"\n required\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Save' | translate }}\"\n data-cy=\"device-profile--save\"\n (click)=\"\n updateDeviceProfile({ name: deviceProfile.name });\n editNameForm.form.markAsPristine()\n \"\n [disabled]=\"editNameForm.form.invalid\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n <div class=\"col-md-4\">\n <form #editTypeForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"\n (DEVICE_TYPE_POPOVER | translate) +\n (isDeviceProfileEmpty\n ? ' ' + (DEVICE_TYPE_DISABLED_POPOVER | translate)\n : '')\n \"\n triggers=\"focus\"\n container=\"body\"\n placement=\"right\"\n ></button>\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"device-profile--device-type\"\n name=\"type\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n size=\"{{ deviceProfile.c8y_Filter.type?.length || 14 }}\"\n [disabled]=\"isDeviceProfileEmpty\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Save' | translate }}\"\n (click)=\"\n updateDeviceProfile({\n c8y_Filter: { type: deviceProfile.c8y_Filter.type }\n });\n editTypeForm.form.markAsPristine()\n \"\n [disabled]=\"isDeviceProfileEmpty\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator-top-bottom bg-content sticky-top\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'c8y-firmware'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Firmware</div>\n </div>\n <div class=\"card-block p-t-0\" *ngIf=\"deviceProfile.c8y_DeviceProfile.firmware\">\n <c8y-list-group>\n <c8y-li>\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-6\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.name }}\"\n >\n {{ deviceProfile.c8y_DeviceProfile.firmware.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.version }}\"\n >\n <span class=\"text-label-small m-r-4\" translate>Version</span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`firmware`' | translate }}\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`firmware`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`firmware`' | translate\"\n tooltip=\"{{ 'Remove`firmware`' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div class=\"card-block p-t-16\" *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\">\n <c8y-ui-empty-state\n icon=\"c8y-firmware\"\n [horizontal]=\"true\"\n [title]=\"'No firmware defined.' | translate\"\n class=\"p-t-16 d-block\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\" *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"device-profile--Add-firmware-button\"\n title=\"{{ 'Add firmware' | translate }}\"\n (click)=\"addFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add firmware' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom sticky-top bg-component\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'c8y-tools'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Software</div>\n </div>\n <div class=\"card-block p-t-0\" *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length > 0\">\n <c8y-list-group>\n <c8y-li *ngFor=\"let software of deviceProfile.c8y_DeviceProfile.software\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-6\">\n <span class=\"text-truncate-wrap\" title=\"{{ software.name }}\">\n {{ software.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span class=\"text-truncate-wrap\" title=\"{{ software.version }}\">\n <span class=\"text-label-small m-r-8\" translate>Version</span>\n {{ software.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`software`' | translate }}\"\n ((click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`software`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`software`' | translate\"\n tooltip=\"{{ 'Remove`software`' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n (click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\" data-cy=\"device-profile--Remove-icon\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"c8y-tools\"\n [horizontal]=\"true\"\n [title]=\"'No software defined.' | translate\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <button\n class=\"btn btn-default m-b-0\"\n type=\"button\"\n title=\"{{ 'Add software' | translate }}\"\n data-cy=\"device-profile--Add-software-button\"\n (click)=\"addSoftware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add software' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom bg-component sticky-top\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'gears'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Configuration</div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let configuration of deviceProfile.c8y_DeviceProfile.configuration\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'gears'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50\">\n <div class=\"col-6\">\n <span class=\"text-truncate\" title=\"{{ configuration.name }}\">\n {{ configuration.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span class=\"label label-info\">{{ configuration.type }}</span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`configuration`' | translate }}\"\n (click)=\"removeItem(configuration, 'configuration')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`configuration`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`configuration`' | translate\"\n tooltip=\"{{ 'Remove`configuration`' | translate }}\"\n (click)=\"removeItem(configuration, 'configuration')\"\n [delay]=\"500\"\n placement=\"top\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\" data-cy=\"device-profile--Remove-icon\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"gears\"\n [horizontal]=\"true\"\n [title]=\"'No configuration defined.' | translate\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <div class=\"p-t-8\">\n <button\n title=\"{{ 'Add configuration' | translate }}\"\n data-cy=\"device-profile--Add-configuration-button\"\n type=\"button\"\n class=\"btn btn-default m-b-0\"\n (click)=\"addConfiguration()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ 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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.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.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.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: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: i8.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: "directive", type: i9.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
545
+ ], ngImport: i0, template: "<c8y-title>{{ profileName }}</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]=\"'c8y-device-profile'\"\n [label]=\"'Device profiles' | translate\"\n [path]=\"'device-profiles'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ profileName }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div\n class=\"row\"\n *ngIf=\"deviceProfile\"\n>\n <div class=\"col-lg-12 col-lg-max\">\n <div\n class=\"card card--fullpage\"\n *ngIf=\"deviceProfile\"\n >\n <div class=\"card-block bg-level-1 flex-no-shrink p-t-24 p-b-24 overflow-visible\">\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i class=\"c8y-icon-duocolor icon-48 c8y-icon c8y-icon-device-profile\"></i>\n <p>\n <small class=\"label label-info\">{{ 'Device profile' | translate }}</small>\n </p>\n </div>\n <div class=\"flex-grow col-10\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <form #editNameForm=\"ngForm\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n translate\n >\n Name\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n name=\"name\"\n type=\"text\"\n required\n [(ngModel)]=\"deviceProfile.name\"\n data-cy=\"device-profile--add-device-profile-name\"\n size=\"{{ deviceProfile.name?.length || 1 }}\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--save\"\n (click)=\"\n updateDeviceProfile({ name: deviceProfile.name });\n editNameForm.form.markAsPristine()\n \"\n [disabled]=\"editNameForm.form.invalid\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n <div class=\"col-md-4\">\n <form #editTypeForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"\n (DEVICE_TYPE_POPOVER | translate) +\n (isDeviceProfileEmpty\n ? ' ' + (DEVICE_TYPE_DISABLED_POPOVER | translate)\n : '')\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"type\"\n type=\"text\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"device-profile--device-type\"\n size=\"{{ deviceProfile.c8y_Filter.type?.length || 14 }}\"\n [disabled]=\"isDeviceProfileEmpty\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n (click)=\"\n updateDeviceProfile({\n c8y_Filter: { type: deviceProfile.c8y_Filter.type }\n });\n editTypeForm.form.markAsPristine()\n \"\n [disabled]=\"isDeviceProfileEmpty\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator-top-bottom bg-content sticky-top\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'c8y-firmware'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Firmware\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <c8y-list-group>\n <c8y-li>\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.name }}\n </span>\n </div>\n <div class=\"col-4\"></div>\n <div class=\"col-3 d-flex a-i-center\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.version }}\"\n >\n <span\n class=\"text-label-small m-r-4\"\n translate\n >\n Version\n </span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`firmware`' | translate }}\"\n type=\"button\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`firmware`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`firmware`' | translate\"\n tooltip=\"{{ 'Remove`firmware`' | translate }}\"\n placement=\"right\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <c8y-ui-empty-state\n class=\"p-t-16 d-block\"\n icon=\"c8y-firmware\"\n [title]=\"'No firmware defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Add firmware' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-firmware-button\"\n (click)=\"addFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add firmware' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom sticky-top bg-component\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'c8y-tools'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Software\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let software of deviceProfile.c8y_DeviceProfile.software\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ software.name }}\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Type\n </span>\n <span\n class=\"label label-info m-l-4\"\n *ngIf=\"!!software.softwareType\"\n >\n {{ software.softwareType }}\n </span>\n </span>\n </div>\n <div class=\"col-3 d-flex a-i-center\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.version }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Version\n </span>\n {{ software.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`software`' | translate }}\"\n type=\"button\"\n ((click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`software`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`software`' | translate\"\n tooltip=\"{{ 'Remove`software`' | translate }}\"\n placement=\"right\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i\n c8yIcon=\"minus-circle\"\n data-cy=\"device-profile--Remove-icon\"\n ></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"c8y-tools\"\n [title]=\"'No software defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <button\n class=\"btn btn-default m-b-0\"\n title=\"{{ 'Add software' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-software-button\"\n (click)=\"addSoftware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add software' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom bg-component sticky-top\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'gears'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Configuration\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let configuration of deviceProfile.c8y_DeviceProfile.configuration\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'gears'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n title=\"{{ configuration.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ configuration.name }}\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Type\n </span>\n <span class=\"label label-info\">{{ configuration.type }}</span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`configuration`' | translate }}\"\n type=\"button\"\n (click)=\"removeItem(configuration, 'configuration')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`configuration`' | translate }}\n </button>\n </div>\n <div class=\"col-3 d-flex a-i-center\"></div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`configuration`' | translate\"\n tooltip=\"{{ 'Remove`configuration`' | translate }}\"\n placement=\"top\"\n type=\"button\"\n (click)=\"removeItem(configuration, 'configuration')\"\n [delay]=\"500\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i\n c8yIcon=\"minus-circle\"\n data-cy=\"device-profile--Remove-icon\"\n ></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"gears\"\n [title]=\"'No configuration defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-default m-b-0\"\n title=\"{{ 'Add configuration' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-configuration-button\"\n (click)=\"addConfiguration()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ 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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.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.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.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: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: i8.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: "directive", type: i9.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
543
546
  }
544
547
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileComponent, decorators: [{
545
548
  type: Component,
@@ -548,7 +551,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
548
551
  provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
549
552
  useExisting: forwardRef(() => DeviceProfileComponent)
550
553
  }
551
- ], template: "<c8y-title>{{ profileName }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n label=\"{{ 'Management' | translate }}\"\n icon=\"c8y-management\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-device-profile'\"\n [label]=\"'Device profiles' | translate\"\n [path]=\"'device-profiles'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item label=\"{{ profileName }}\" icon=\"c8y-device-profile\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div *ngIf=\"deviceProfile\" class=\"row\">\n <div class=\"col-lg-12 col-lg-max\">\n <div class=\"card card--fullpage\" *ngIf=\"deviceProfile\">\n <div class=\"card-block bg-level-1 flex-no-shrink p-t-24 p-b-24 overflow-visible\">\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i class=\"c8y-icon-duocolor icon-48 c8y-icon c8y-icon-device-profile\"></i>\n <p>\n <small class=\"label label-info\">{{ 'Device profile' | translate }}</small>\n </p>\n </div>\n <div class=\"flex-grow col-10\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <form #editNameForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\" translate>Name</label>\n <div class=\"input-group input-group-editable\">\n <input\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"deviceProfile.name\"\n name=\"name\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n data-cy=\"device-profile--add-device-profile-name\"\n size=\"{{ deviceProfile.name?.length || 1 }}\"\n required\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Save' | translate }}\"\n data-cy=\"device-profile--save\"\n (click)=\"\n updateDeviceProfile({ name: deviceProfile.name });\n editNameForm.form.markAsPristine()\n \"\n [disabled]=\"editNameForm.form.invalid\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n <div class=\"col-md-4\">\n <form #editTypeForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"\n (DEVICE_TYPE_POPOVER | translate) +\n (isDeviceProfileEmpty\n ? ' ' + (DEVICE_TYPE_DISABLED_POPOVER | translate)\n : '')\n \"\n triggers=\"focus\"\n container=\"body\"\n placement=\"right\"\n ></button>\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n type=\"text\"\n class=\"form-control\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"device-profile--device-type\"\n name=\"type\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n size=\"{{ deviceProfile.c8y_Filter.type?.length || 14 }}\"\n [disabled]=\"isDeviceProfileEmpty\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Save' | translate }}\"\n (click)=\"\n updateDeviceProfile({\n c8y_Filter: { type: deviceProfile.c8y_Filter.type }\n });\n editTypeForm.form.markAsPristine()\n \"\n [disabled]=\"isDeviceProfileEmpty\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator-top-bottom bg-content sticky-top\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'c8y-firmware'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Firmware</div>\n </div>\n <div class=\"card-block p-t-0\" *ngIf=\"deviceProfile.c8y_DeviceProfile.firmware\">\n <c8y-list-group>\n <c8y-li>\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-6\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.name }}\"\n >\n {{ deviceProfile.c8y_DeviceProfile.firmware.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.version }}\"\n >\n <span class=\"text-label-small m-r-4\" translate>Version</span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`firmware`' | translate }}\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`firmware`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`firmware`' | translate\"\n tooltip=\"{{ 'Remove`firmware`' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div class=\"card-block p-t-16\" *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\">\n <c8y-ui-empty-state\n icon=\"c8y-firmware\"\n [horizontal]=\"true\"\n [title]=\"'No firmware defined.' | translate\"\n class=\"p-t-16 d-block\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\" *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"device-profile--Add-firmware-button\"\n title=\"{{ 'Add firmware' | translate }}\"\n (click)=\"addFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add firmware' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom sticky-top bg-component\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'c8y-tools'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Software</div>\n </div>\n <div class=\"card-block p-t-0\" *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length > 0\">\n <c8y-list-group>\n <c8y-li *ngFor=\"let software of deviceProfile.c8y_DeviceProfile.software\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-6\">\n <span class=\"text-truncate-wrap\" title=\"{{ software.name }}\">\n {{ software.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span class=\"text-truncate-wrap\" title=\"{{ software.version }}\">\n <span class=\"text-label-small m-r-8\" translate>Version</span>\n {{ software.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`software`' | translate }}\"\n ((click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`software`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`software`' | translate\"\n tooltip=\"{{ 'Remove`software`' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n (click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\" data-cy=\"device-profile--Remove-icon\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"c8y-tools\"\n [horizontal]=\"true\"\n [title]=\"'No software defined.' | translate\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <button\n class=\"btn btn-default m-b-0\"\n type=\"button\"\n title=\"{{ 'Add software' | translate }}\"\n data-cy=\"device-profile--Add-software-button\"\n (click)=\"addSoftware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add software' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom bg-component sticky-top\">\n <div class=\"card-icon\">\n <i [c8yIcon]=\"'gears'\" class=\"c8y-icon-duocolor\"></i>\n </div>\n <div class=\"card-title\" translate>Configuration</div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let configuration of deviceProfile.c8y_DeviceProfile.configuration\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'gears'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50\">\n <div class=\"col-6\">\n <span class=\"text-truncate\" title=\"{{ configuration.name }}\">\n {{ configuration.name }}\n </span>\n </div>\n <div class=\"col-5 d-flex a-i-center\">\n <span class=\"label label-info\">{{ configuration.type }}</span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n type=\"button\"\n title=\"{{ 'Remove`configuration`' | translate }}\"\n (click)=\"removeItem(configuration, 'configuration')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`configuration`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n type=\"button\"\n [attr.aria-label]=\"'Remove`configuration`' | translate\"\n tooltip=\"{{ 'Remove`configuration`' | translate }}\"\n (click)=\"removeItem(configuration, 'configuration')\"\n [delay]=\"500\"\n placement=\"top\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\" data-cy=\"device-profile--Remove-icon\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"gears\"\n [horizontal]=\"true\"\n [title]=\"'No configuration defined.' | translate\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <div class=\"p-t-8\">\n <button\n title=\"{{ 'Add configuration' | translate }}\"\n data-cy=\"device-profile--Add-configuration-button\"\n type=\"button\"\n class=\"btn btn-default m-b-0\"\n (click)=\"addConfiguration()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
554
+ ], template: "<c8y-title>{{ profileName }}</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]=\"'c8y-device-profile'\"\n [label]=\"'Device profiles' | translate\"\n [path]=\"'device-profiles'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ profileName }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div\n class=\"row\"\n *ngIf=\"deviceProfile\"\n>\n <div class=\"col-lg-12 col-lg-max\">\n <div\n class=\"card card--fullpage\"\n *ngIf=\"deviceProfile\"\n >\n <div class=\"card-block bg-level-1 flex-no-shrink p-t-24 p-b-24 overflow-visible\">\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i class=\"c8y-icon-duocolor icon-48 c8y-icon c8y-icon-device-profile\"></i>\n <p>\n <small class=\"label label-info\">{{ 'Device profile' | translate }}</small>\n </p>\n </div>\n <div class=\"flex-grow col-10\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <form #editNameForm=\"ngForm\">\n <c8y-form-group>\n <label\n class=\"control-label\"\n translate\n >\n Name\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n name=\"name\"\n type=\"text\"\n required\n [(ngModel)]=\"deviceProfile.name\"\n data-cy=\"device-profile--add-device-profile-name\"\n size=\"{{ deviceProfile.name?.length || 1 }}\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--save\"\n (click)=\"\n updateDeviceProfile({ name: deviceProfile.name });\n editNameForm.form.markAsPristine()\n \"\n [disabled]=\"editNameForm.form.invalid\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n <div class=\"col-md-4\">\n <form #editTypeForm=\"ngForm\">\n <c8y-form-group>\n <label class=\"control-label\">\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"\n (DEVICE_TYPE_POPOVER | translate) +\n (isDeviceProfileEmpty\n ? ' ' + (DEVICE_TYPE_DISABLED_POPOVER | translate)\n : '')\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </label>\n <div class=\"input-group input-group-editable\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"type\"\n type=\"text\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"device-profile--device-type\"\n size=\"{{ deviceProfile.c8y_Filter.type?.length || 14 }}\"\n [disabled]=\"isDeviceProfileEmpty\"\n />\n <span></span>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n (click)=\"\n updateDeviceProfile({\n c8y_Filter: { type: deviceProfile.c8y_Filter.type }\n });\n editTypeForm.form.markAsPristine()\n \"\n [disabled]=\"isDeviceProfileEmpty\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.SAVE }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </c8y-form-group>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator-top-bottom bg-content sticky-top\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'c8y-firmware'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Firmware\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <c8y-list-group>\n <c8y-li>\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-firmware'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.name }}\n </span>\n </div>\n <div class=\"col-4\"></div>\n <div class=\"col-3 d-flex a-i-center\">\n <span\n class=\"text-truncate\"\n title=\"{{ deviceProfile.c8y_DeviceProfile.firmware.version }}\"\n >\n <span\n class=\"text-label-small m-r-4\"\n translate\n >\n Version\n </span>\n {{ deviceProfile.c8y_DeviceProfile.firmware.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`firmware`' | translate }}\"\n type=\"button\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`firmware`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`firmware`' | translate\"\n tooltip=\"{{ 'Remove`firmware`' | translate }}\"\n placement=\"right\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"removeFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <c8y-ui-empty-state\n class=\"p-t-16 d-block\"\n icon=\"c8y-firmware\"\n [title]=\"'No firmware defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"!deviceProfile.c8y_DeviceProfile.firmware\"\n >\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Add firmware' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-firmware-button\"\n (click)=\"addFirmware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.FIRMWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add firmware' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom sticky-top bg-component\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'c8y-tools'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Software\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let software of deviceProfile.c8y_DeviceProfile.software\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'c8y-tools'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50 m-l-4\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ software.name }}\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Type\n </span>\n <span\n class=\"label label-info m-l-4\"\n *ngIf=\"!!software.softwareType\"\n >\n {{ software.softwareType }}\n </span>\n </span>\n </div>\n <div class=\"col-3 d-flex a-i-center\">\n <span\n class=\"text-truncate-wrap\"\n title=\"{{ software.version }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Version\n </span>\n {{ software.version }}\n </span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`software`' | translate }}\"\n type=\"button\"\n ((click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`software`' | translate }}\n </button>\n </div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`software`' | translate\"\n tooltip=\"{{ 'Remove`software`' | translate }}\"\n placement=\"right\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"removeItem(software, 'software')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i\n c8yIcon=\"minus-circle\"\n data-cy=\"device-profile--Remove-icon\"\n ></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.software?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"c8y-tools\"\n [title]=\"'No software defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <button\n class=\"btn btn-default m-b-0\"\n title=\"{{ 'Add software' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-software-button\"\n (click)=\"addSoftware()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.SOFTWARE\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add software' | translate }}\n </button>\n </div>\n\n <div class=\"card-header separator-top-bottom bg-component sticky-top\">\n <div class=\"card-icon\">\n <i\n class=\"c8y-icon-duocolor\"\n [c8yIcon]=\"'gears'\"\n ></i>\n </div>\n <div\n class=\"card-title\"\n translate\n >\n Configuration\n </div>\n </div>\n <div\n class=\"card-block p-t-0\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length > 0\"\n >\n <c8y-list-group>\n <c8y-li *ngFor=\"let configuration of deviceProfile.c8y_DeviceProfile.configuration\">\n <c8y-li-icon>\n <i [c8yIcon]=\"'gears'\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-50\">\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n title=\"{{ configuration.name }}\"\n >\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Name\n </span>\n {{ configuration.name }}\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-label-small m-r-8\"\n translate\n >\n Type\n </span>\n <span class=\"label label-info\">{{ configuration.type }}</span>\n <button\n class=\"btn btn-danger btn-xs visible-xs m-l-auto m-r-8 m-t-8\"\n title=\"{{ 'Remove`configuration`' | translate }}\"\n type=\"button\"\n (click)=\"removeItem(configuration, 'configuration')\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n {{ 'Remove`configuration`' | translate }}\n </button>\n </div>\n <div class=\"col-3 d-flex a-i-center\"></div>\n <div class=\"m-l-auto p-r-8 hidden-xs\">\n <button\n class=\"btn btn-dot showOnHover text-danger\"\n [attr.aria-label]=\"'Remove`configuration`' | translate\"\n tooltip=\"{{ 'Remove`configuration`' | translate }}\"\n placement=\"top\"\n type=\"button\"\n (click)=\"removeItem(configuration, 'configuration')\"\n [delay]=\"500\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.REMOVE,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i\n c8yIcon=\"minus-circle\"\n data-cy=\"device-profile--Remove-icon\"\n ></i>\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n </div>\n <div\n class=\"card-block p-t-16\"\n *ngIf=\"deviceProfile.c8y_DeviceProfile.configuration?.length === 0\"\n >\n <c8y-ui-empty-state\n icon=\"gears\"\n [title]=\"'No configuration defined.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div class=\"card-footer p-t-0\">\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-default m-b-0\"\n title=\"{{ 'Add configuration' | translate }}\"\n type=\"button\"\n data-cy=\"device-profile--Add-configuration-button\"\n (click)=\"addConfiguration()\"\n c8yProductExperience\n inherit\n [actionData]=\"{\n action: PRODUCT_EXPERIENCE.ACTIONS.ADD,\n fragment: PRODUCT_EXPERIENCE.FRAGMENTS.CONFGIURATION\n }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
552
555
  }], ctorParameters: () => [{ type: i5.ActivatedRoute }, { type: i2.AlertService }, { type: i1.InventoryService }, { type: i4.BsModalService }, { type: i1$1.RepositoryService }] });
553
556
 
554
557
  class AddDeviceProfileComponent {
@@ -794,11 +797,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
794
797
 
795
798
  class DeviceProfileItemListComponent {
796
799
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
797
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceProfileItemListComponent, selector: "c8y-device-profile-item-list", inputs: { icon: "icon", comparisonResults: "comparisonResults", showProfileItems: "showProfileItems", showTextLabel: "showTextLabel" }, ngImport: i0, template: "<div *ngFor=\"let comparisonResult of comparisonResults\" class=\"d-contents\">\n <div class=\"p-l-16 p-r-16\" *ngIf=\"showProfileItems\">\n <div class=\"c8y-list__item fit-h\">\n <div class=\"c8y-list__item__block\" *ngIf=\"comparisonResult.profile\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container *ngTemplateOutlet=\"comparisonResultInfo;context:comparisonResult.profile\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-1\">\n <div\n class=\"c8y-list__item bg-level-1\"\n [ngClass]=\"{\n 'has-warning': !!comparisonResult.comparisonAlert\n }\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container *ngTemplateOutlet=\"comparisonResultInfo;context:comparisonResult.device ? comparisonResult.device : comparisonResult.profile\"></ng-container>\n <c8y-messages\n class=\"m-0\"\n style=\"margin-bottom: calc(var(--margin-base, 8px) * -1);\"\n *ngIf=\"comparisonResult.comparisonAlert\"\n >\n <c8y-message>\n {{ comparisonResult.comparisonAlert | translate }}\n </c8y-message>\n </c8y-messages>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-0 hidden-xs hidden-sm\" *ngIf=\"!showProfileItems\"></div>\n</div>\n\n<ng-template #comparisonResultInfo let-name=\"itemName\" let-details=\"itemDetails\">\n <div class=\"content-flex-40\">\n <div class=\"col-7\">\n <span class=\"text-truncate\">\n <span class=\"text-label-small m-r-4\">Name</span>\n <span title=\"{{ name }}\">\n {{ name }}\n </span>\n </span>\n </div>\n <div class=\"col-5\">\n <span *ngIf=\"showTextLabel && details; else showInfoLabel\" class=\"text-truncate\">\n <span translate class=\"text-label-small m-r-4\">Version</span>\n <span title=\"{{details}}\">{{ details }}</span>\n </span>\n <ng-template #showInfoLabel>\n <span class=\"label label-info\">{{ details }}</span>\n </ng-template>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
800
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceProfileItemListComponent, selector: "c8y-device-profile-item-list", inputs: { icon: "icon", comparisonResults: "comparisonResults", showProfileItems: "showProfileItems", showTextLabel: "showTextLabel" }, ngImport: i0, template: "<div\n class=\"d-contents\"\n *ngFor=\"let comparisonResult of comparisonResults\"\n>\n <div\n class=\"p-l-16 p-r-16\"\n *ngIf=\"showProfileItems\"\n >\n <div class=\"c8y-list__item fit-h\">\n <div\n class=\"c8y-list__item__block\"\n *ngIf=\"comparisonResult.profile\"\n >\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container\n *ngTemplateOutlet=\"comparisonResultInfo; context: comparisonResult.profile\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-1\">\n <div\n class=\"c8y-list__item bg-level-1\"\n [ngClass]=\"{\n 'has-warning': !!comparisonResult.comparisonAlert\n }\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container\n *ngTemplateOutlet=\"\n comparisonResultInfo;\n context: comparisonResult.device ? comparisonResult.device : comparisonResult.profile\n \"\n ></ng-container>\n <c8y-messages\n class=\"m-0\"\n style=\"margin-bottom: calc(var(--margin-base, 8px) * -1)\"\n *ngIf=\"comparisonResult.comparisonAlert\"\n >\n <c8y-message>\n {{ comparisonResult.comparisonAlert | translate }}\n </c8y-message>\n </c8y-messages>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"p-l-16 p-r-16 bg-level-0 hidden-xs hidden-sm\"\n *ngIf=\"!showProfileItems\"\n ></div>\n</div>\n\n<ng-template\n #comparisonResultInfo\n let-name=\"itemName\"\n let-details=\"itemDetails\"\n let-type=\"itemType\"\n>\n <div class=\"content-flex-40\">\n <div class=\"col-5\">\n <span class=\"text-truncate\">\n <span class=\"text-label-small m-r-4\">Name</span>\n <span title=\"{{ name }}\">\n {{ name }}\n </span>\n </span>\n </div>\n <div class=\"col-3\">\n <span\n class=\"text-truncate\"\n *ngIf=\"!!type\"\n >\n <span class=\"text-label-small m-r-4\">Type</span>\n <span title=\"{{ type }}\">\n <span class=\"label label-info m-l-4\">\n {{ type }}\n </span>\n </span>\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n *ngIf=\"showTextLabel && details; else showInfoLabel\"\n >\n <span\n class=\"text-label-small m-r-4\"\n translate\n >\n Version\n </span>\n <span title=\"{{ details }}\">{{ details }}</span>\n </span>\n <ng-template #showInfoLabel>\n <span class=\"label label-info\">{{ details }}</span>\n </ng-template>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
798
801
  }
799
802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileItemListComponent, decorators: [{
800
803
  type: Component,
801
- args: [{ selector: 'c8y-device-profile-item-list', template: "<div *ngFor=\"let comparisonResult of comparisonResults\" class=\"d-contents\">\n <div class=\"p-l-16 p-r-16\" *ngIf=\"showProfileItems\">\n <div class=\"c8y-list__item fit-h\">\n <div class=\"c8y-list__item__block\" *ngIf=\"comparisonResult.profile\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container *ngTemplateOutlet=\"comparisonResultInfo;context:comparisonResult.profile\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-1\">\n <div\n class=\"c8y-list__item bg-level-1\"\n [ngClass]=\"{\n 'has-warning': !!comparisonResult.comparisonAlert\n }\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container *ngTemplateOutlet=\"comparisonResultInfo;context:comparisonResult.device ? comparisonResult.device : comparisonResult.profile\"></ng-container>\n <c8y-messages\n class=\"m-0\"\n style=\"margin-bottom: calc(var(--margin-base, 8px) * -1);\"\n *ngIf=\"comparisonResult.comparisonAlert\"\n >\n <c8y-message>\n {{ comparisonResult.comparisonAlert | translate }}\n </c8y-message>\n </c8y-messages>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-0 hidden-xs hidden-sm\" *ngIf=\"!showProfileItems\"></div>\n</div>\n\n<ng-template #comparisonResultInfo let-name=\"itemName\" let-details=\"itemDetails\">\n <div class=\"content-flex-40\">\n <div class=\"col-7\">\n <span class=\"text-truncate\">\n <span class=\"text-label-small m-r-4\">Name</span>\n <span title=\"{{ name }}\">\n {{ name }}\n </span>\n </span>\n </div>\n <div class=\"col-5\">\n <span *ngIf=\"showTextLabel && details; else showInfoLabel\" class=\"text-truncate\">\n <span translate class=\"text-label-small m-r-4\">Version</span>\n <span title=\"{{details}}\">{{ details }}</span>\n </span>\n <ng-template #showInfoLabel>\n <span class=\"label label-info\">{{ details }}</span>\n </ng-template>\n </div>\n </div>\n</ng-template>\n" }]
804
+ args: [{ selector: 'c8y-device-profile-item-list', template: "<div\n class=\"d-contents\"\n *ngFor=\"let comparisonResult of comparisonResults\"\n>\n <div\n class=\"p-l-16 p-r-16\"\n *ngIf=\"showProfileItems\"\n >\n <div class=\"c8y-list__item fit-h\">\n <div\n class=\"c8y-list__item__block\"\n *ngIf=\"comparisonResult.profile\"\n >\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container\n *ngTemplateOutlet=\"comparisonResultInfo; context: comparisonResult.profile\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n <div class=\"p-l-16 p-r-16 bg-level-1\">\n <div\n class=\"c8y-list__item bg-level-1\"\n [ngClass]=\"{\n 'has-warning': !!comparisonResult.comparisonAlert\n }\"\n >\n <div class=\"c8y-list__item__block\">\n <div class=\"c8y-list__item__icon\">\n <i [c8yIcon]=\"icon\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <ng-container\n *ngTemplateOutlet=\"\n comparisonResultInfo;\n context: comparisonResult.device ? comparisonResult.device : comparisonResult.profile\n \"\n ></ng-container>\n <c8y-messages\n class=\"m-0\"\n style=\"margin-bottom: calc(var(--margin-base, 8px) * -1)\"\n *ngIf=\"comparisonResult.comparisonAlert\"\n >\n <c8y-message>\n {{ comparisonResult.comparisonAlert | translate }}\n </c8y-message>\n </c8y-messages>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"p-l-16 p-r-16 bg-level-0 hidden-xs hidden-sm\"\n *ngIf=\"!showProfileItems\"\n ></div>\n</div>\n\n<ng-template\n #comparisonResultInfo\n let-name=\"itemName\"\n let-details=\"itemDetails\"\n let-type=\"itemType\"\n>\n <div class=\"content-flex-40\">\n <div class=\"col-5\">\n <span class=\"text-truncate\">\n <span class=\"text-label-small m-r-4\">Name</span>\n <span title=\"{{ name }}\">\n {{ name }}\n </span>\n </span>\n </div>\n <div class=\"col-3\">\n <span\n class=\"text-truncate\"\n *ngIf=\"!!type\"\n >\n <span class=\"text-label-small m-r-4\">Type</span>\n <span title=\"{{ type }}\">\n <span class=\"label label-info m-l-4\">\n {{ type }}\n </span>\n </span>\n </span>\n </div>\n <div class=\"col-4\">\n <span\n class=\"text-truncate\"\n *ngIf=\"showTextLabel && details; else showInfoLabel\"\n >\n <span\n class=\"text-label-small m-r-4\"\n translate\n >\n Version\n </span>\n <span title=\"{{ details }}\">{{ details }}</span>\n </span>\n <ng-template #showInfoLabel>\n <span class=\"label label-info\">{{ details }}</span>\n </ng-template>\n </div>\n </div>\n</ng-template>\n" }]
802
805
  }], propDecorators: { icon: [{
803
806
  type: Input
804
807
  }], comparisonResults: [{
@@ -877,7 +880,7 @@ class DeviceTabProfileComponent {
877
880
  this.reloading = false;
878
881
  }
879
882
  selectProfile(mo) {
880
- this.selectedProfile = mo;
883
+ this.selectedProfile = this.toProfileForDevice(mo);
881
884
  this.updateProfileItems(this.device, this.selectedProfile);
882
885
  }
883
886
  async createOperation() {
@@ -918,6 +921,21 @@ class DeviceTabProfileComponent {
918
921
  this.operation = operation;
919
922
  });
920
923
  }
924
+ toProfileForDevice(profile) {
925
+ if (Array.from(profile?.c8y_DeviceProfile?.software || []).length === 0 ||
926
+ has(this.device, 'c8y_SupportedSoftwareTypes')) {
927
+ return profile;
928
+ }
929
+ else {
930
+ return {
931
+ ...profile,
932
+ c8y_DeviceProfile: {
933
+ ...profile.c8y_DeviceProfile,
934
+ software: profile.c8y_DeviceProfile.software.map(sw => pickBy(sw, (_, key) => key !== 'softwareType'))
935
+ }
936
+ };
937
+ }
938
+ }
921
939
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileComponent, deps: [{ token: i2.ManagedObjectRealtimeService }, { token: DeviceProfileService }, { token: i5.ActivatedRoute }, { token: i2.OperationRealtimeService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
922
940
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceTabProfileComponent, selector: "c8y-device-tab-profile", providers: [
923
941
  ManagedObjectRealtimeService,
@@ -925,7 +943,7 @@ class DeviceTabProfileComponent {
925
943
  provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
926
944
  useExisting: forwardRef(() => DeviceTabProfileComponent)
927
945
  }
928
- ], ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"getDeviceProfilesAndUpdateProfileItems()\"\n >\n <i c8yIcon=\"refresh\" [ngClass]=\"{ 'icon-spin': reloading }\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n<c8y-action-bar-item [placement]=\"'right'\">\n <c8y-realtime-btn [service]=\"deviceRealtime\"></c8y-realtime-btn>\n</c8y-action-bar-item>\n\n<div class=\"card card--grid--fullpage card--grid--fullpage card--grid grid__row--2-10--md\">\n <div class=\"card--grid grid__col--6-6--md\">\n <!-- AVAILABLE PROFILES -->\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Device profile</div>\n </div>\n <div class=\"p-16\">\n <form #deviceProfileForm=\"ngForm\">\n <div class=\"input-group\">\n <c8y-typeahead\n class=\"flex-grow\"\n name=\"selectProfile\"\n data-cy=\"device-tab-profile--select-device-profile\"\n [(ngModel)]=\"selectedProfile\"\n placeholder=\"{{ 'Select device profile' | translate }}\"\n (onSearch)=\"setPipe($event)\"\n [allowFreeEntries]=\"false\"\n >\n <c8y-li\n *c8yFor=\"let profile of deviceProfiles; pipe: filterPipe\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selectProfile(profile); setPipe('')\"\n >\n <c8y-highlight\n [text]=\"profile.name || '&#45;&#45;'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n (click)=\"createOperation()\"\n data-cy=\"device-tab-profile--Assign-device-profile-button\"\n title=\"{{ 'Assign device profile' | translate }}\"\n type=\"button\"\n [disabled]=\"!selectedProfile?.id\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.ASSIGN_DEVICE_PROFILE }\"\n >\n <span>{{ 'Assign device profile' | translate }}</span>\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- INSTALL PROFILE OPERATION -->\n <div class=\"bg-level-1\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Currently installed</div>\n </div>\n <div class=\"card-block\">\n <c8y-operation-details\n [operation]=\"operation\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n ></c8y-operation-details>\n </div>\n </div>\n </div>\n <div class=\"card--grid__inner-scroll d-col no-align-items\">\n <div class=\"d-contents\">\n <!-- FIRMWARE -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Firmware' | translate\"\n [sectionIcon]=\"'c8y-firmware'\"\n [emptyStateText]=\"'No firmware to display.' | translate\"\n [emptyStateDetails]=\"'No firmware assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"firmwareItems\"\n [isEmpty]=\"!selectedProfile?.c8y_DeviceProfile?.firmware?.name\"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- SOFTWARE -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Software' | translate\"\n [sectionIcon]=\"'c8y-tools'\"\n [emptyStateText]=\"'No software to display.' | translate\"\n [emptyStateDetails]=\"'No software assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"softwareItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.software ||\n selectedProfile?.c8y_DeviceProfile?.software?.length === 0\n \"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- CONFIGURATION -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Configuration' | translate\"\n [sectionIcon]=\"'gears'\"\n [emptyStateText]=\"'No configuration to display' | translate\"\n [emptyStateDetails]=\"'No configuration assigned' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"configurationItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.configuration ||\n selectedProfile?.c8y_DeviceProfile?.configuration?.length === 0\n \"\n [showTextLabel]=\"false\"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <!-- fill in the remanining vertical space when empty -->\n <div class=\"card--grid grid__col--6-6--md flex-grow\">\n <div class=\"bg-level-0\"></div>\n <div class=\"bg-level-1\"></div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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", "highlightFirstItem"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i2.RealtimeButtonComponent, selector: "c8y-realtime-btn", inputs: ["service", "label", "title", "disabled"], outputs: ["onToggle"] }, { kind: "component", type: i6.OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "component", type: DeviceTabProfileDetailComponent, selector: "c8y-device-tab-profile-detail", inputs: ["sectionTitle", "sectionIcon", "emptyStateText", "emptyStateDetails", "isProfileSelected", "isEmpty", "items", "showTextLabel"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
946
+ ], ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"getDeviceProfilesAndUpdateProfileItems()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n<c8y-action-bar-item [placement]=\"'right'\">\n <c8y-realtime-btn [service]=\"deviceRealtime\"></c8y-realtime-btn>\n</c8y-action-bar-item>\n\n<div class=\"card card--grid--fullpage card--grid--fullpage card--grid grid__row--2-10--md\">\n <div class=\"card--grid grid__col--6-6--md\">\n <!-- AVAILABLE PROFILES -->\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Device profile\n </div>\n </div>\n <div class=\"p-16\">\n <form #deviceProfileForm=\"ngForm\">\n <div class=\"input-group\">\n <c8y-typeahead\n class=\"flex-grow\"\n placeholder=\"{{ 'Select device profile' | translate }}\"\n name=\"selectProfile\"\n data-cy=\"device-tab-profile--select-device-profile\"\n [(ngModel)]=\"selectedProfile\"\n (onSearch)=\"setPipe($event)\"\n [allowFreeEntries]=\"false\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let profile of deviceProfiles; pipe: filterPipe\"\n (click)=\"selectProfile(profile); setPipe('')\"\n >\n <c8y-highlight\n [text]=\"profile.name || '&#45;&#45;'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Assign device profile' | translate }}\"\n type=\"button\"\n (click)=\"createOperation()\"\n data-cy=\"device-tab-profile--Assign-device-profile-button\"\n [disabled]=\"!selectedProfile?.id\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.ASSIGN_DEVICE_PROFILE }\"\n >\n <span>{{ 'Assign device profile' | translate }}</span>\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- INSTALL PROFILE OPERATION -->\n <div class=\"bg-level-1\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Currently installed\n </div>\n </div>\n <div class=\"card-block\">\n <c8y-operation-details\n [operation]=\"operation\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n ></c8y-operation-details>\n </div>\n </div>\n </div>\n <div class=\"card--grid__inner-scroll d-col no-align-items\">\n <div class=\"d-contents\">\n <!-- FIRMWARE -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'c8y-firmware'\"\n [sectionTitle]=\"'Firmware' | translate\"\n [emptyStateText]=\"'No firmware to display.' | translate\"\n [emptyStateDetails]=\"'No firmware assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"firmwareItems\"\n [isEmpty]=\"!selectedProfile?.c8y_DeviceProfile?.firmware?.name\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- SOFTWARE -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'c8y-tools'\"\n [sectionTitle]=\"'Software' | translate\"\n [emptyStateText]=\"'No software to display.' | translate\"\n [emptyStateDetails]=\"'No software assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"softwareItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.software ||\n selectedProfile?.c8y_DeviceProfile?.software?.length === 0\n \"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- CONFIGURATION -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'gears'\"\n [sectionTitle]=\"'Configuration' | translate\"\n [emptyStateText]=\"'No configuration to display' | translate\"\n [emptyStateDetails]=\"'No configuration assigned' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"configurationItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.configuration ||\n selectedProfile?.c8y_DeviceProfile?.configuration?.length === 0\n \"\n ></c8y-device-tab-profile-detail>\n </div>\n <!-- fill in the remanining vertical space when empty -->\n <div class=\"card--grid grid__col--6-6--md flex-grow\">\n <div class=\"bg-level-0\"></div>\n <div class=\"bg-level-1\"></div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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", "highlightFirstItem"], outputs: ["onSearch", "onIconClick"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i2.RealtimeButtonComponent, selector: "c8y-realtime-btn", inputs: ["service", "label", "title", "disabled"], outputs: ["onToggle"] }, { kind: "component", type: i6.OperationDetailsComponent, selector: "c8y-operation-details", inputs: ["operation"] }, { kind: "component", type: DeviceTabProfileDetailComponent, selector: "c8y-device-tab-profile-detail", inputs: ["sectionTitle", "sectionIcon", "emptyStateText", "emptyStateDetails", "isProfileSelected", "isEmpty", "items", "showTextLabel"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
929
947
  }
930
948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileComponent, decorators: [{
931
949
  type: Component,
@@ -935,7 +953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
935
953
  provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
936
954
  useExisting: forwardRef(() => DeviceTabProfileComponent)
937
955
  }
938
- ], template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"getDeviceProfilesAndUpdateProfileItems()\"\n >\n <i c8yIcon=\"refresh\" [ngClass]=\"{ 'icon-spin': reloading }\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n<c8y-action-bar-item [placement]=\"'right'\">\n <c8y-realtime-btn [service]=\"deviceRealtime\"></c8y-realtime-btn>\n</c8y-action-bar-item>\n\n<div class=\"card card--grid--fullpage card--grid--fullpage card--grid grid__row--2-10--md\">\n <div class=\"card--grid grid__col--6-6--md\">\n <!-- AVAILABLE PROFILES -->\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Device profile</div>\n </div>\n <div class=\"p-16\">\n <form #deviceProfileForm=\"ngForm\">\n <div class=\"input-group\">\n <c8y-typeahead\n class=\"flex-grow\"\n name=\"selectProfile\"\n data-cy=\"device-tab-profile--select-device-profile\"\n [(ngModel)]=\"selectedProfile\"\n placeholder=\"{{ 'Select device profile' | translate }}\"\n (onSearch)=\"setPipe($event)\"\n [allowFreeEntries]=\"false\"\n >\n <c8y-li\n *c8yFor=\"let profile of deviceProfiles; pipe: filterPipe\"\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n (click)=\"selectProfile(profile); setPipe('')\"\n >\n <c8y-highlight\n [text]=\"profile.name || '&#45;&#45;'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n (click)=\"createOperation()\"\n data-cy=\"device-tab-profile--Assign-device-profile-button\"\n title=\"{{ 'Assign device profile' | translate }}\"\n type=\"button\"\n [disabled]=\"!selectedProfile?.id\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.ASSIGN_DEVICE_PROFILE }\"\n >\n <span>{{ 'Assign device profile' | translate }}</span>\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- INSTALL PROFILE OPERATION -->\n <div class=\"bg-level-1\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Currently installed</div>\n </div>\n <div class=\"card-block\">\n <c8y-operation-details\n [operation]=\"operation\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n ></c8y-operation-details>\n </div>\n </div>\n </div>\n <div class=\"card--grid__inner-scroll d-col no-align-items\">\n <div class=\"d-contents\">\n <!-- FIRMWARE -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Firmware' | translate\"\n [sectionIcon]=\"'c8y-firmware'\"\n [emptyStateText]=\"'No firmware to display.' | translate\"\n [emptyStateDetails]=\"'No firmware assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"firmwareItems\"\n [isEmpty]=\"!selectedProfile?.c8y_DeviceProfile?.firmware?.name\"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- SOFTWARE -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Software' | translate\"\n [sectionIcon]=\"'c8y-tools'\"\n [emptyStateText]=\"'No software to display.' | translate\"\n [emptyStateDetails]=\"'No software assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"softwareItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.software ||\n selectedProfile?.c8y_DeviceProfile?.software?.length === 0\n \"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- CONFIGURATION -->\n <c8y-device-tab-profile-detail\n [sectionTitle]=\"'Configuration' | translate\"\n [sectionIcon]=\"'gears'\"\n [emptyStateText]=\"'No configuration to display' | translate\"\n [emptyStateDetails]=\"'No configuration assigned' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"configurationItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.configuration ||\n selectedProfile?.c8y_DeviceProfile?.configuration?.length === 0\n \"\n [showTextLabel]=\"false\"\n class=\"d-contents\"\n ></c8y-device-tab-profile-detail>\n </div>\n <!-- fill in the remanining vertical space when empty -->\n <div class=\"card--grid grid__col--6-6--md flex-grow\">\n <div class=\"bg-level-0\"></div>\n <div class=\"bg-level-1\"></div>\n </div>\n </div>\n</div>\n" }]
956
+ ], template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"getDeviceProfilesAndUpdateProfileItems()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n<c8y-action-bar-item [placement]=\"'right'\">\n <c8y-realtime-btn [service]=\"deviceRealtime\"></c8y-realtime-btn>\n</c8y-action-bar-item>\n\n<div class=\"card card--grid--fullpage card--grid--fullpage card--grid grid__row--2-10--md\">\n <div class=\"card--grid grid__col--6-6--md\">\n <!-- AVAILABLE PROFILES -->\n <div class=\"bg-level-0\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Device profile\n </div>\n </div>\n <div class=\"p-16\">\n <form #deviceProfileForm=\"ngForm\">\n <div class=\"input-group\">\n <c8y-typeahead\n class=\"flex-grow\"\n placeholder=\"{{ 'Select device profile' | translate }}\"\n name=\"selectProfile\"\n data-cy=\"device-tab-profile--select-device-profile\"\n [(ngModel)]=\"selectedProfile\"\n (onSearch)=\"setPipe($event)\"\n [allowFreeEntries]=\"false\"\n >\n <c8y-li\n class=\"p-l-8 p-r-8 c8y-list__item--link\"\n *c8yFor=\"let profile of deviceProfiles; pipe: filterPipe\"\n (click)=\"selectProfile(profile); setPipe('')\"\n >\n <c8y-highlight\n [text]=\"profile.name || '&#45;&#45;'\"\n [pattern]=\"pattern\"\n ></c8y-highlight>\n </c8y-li>\n </c8y-typeahead>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Assign device profile' | translate }}\"\n type=\"button\"\n (click)=\"createOperation()\"\n data-cy=\"device-tab-profile--Assign-device-profile-button\"\n [disabled]=\"!selectedProfile?.id\"\n c8yProductExperience\n inherit\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.ASSIGN_DEVICE_PROFILE }\"\n >\n <span>{{ 'Assign device profile' | translate }}</span>\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- INSTALL PROFILE OPERATION -->\n <div class=\"bg-level-1\">\n <div class=\"card-header separator\">\n <div\n class=\"card-title\"\n translate\n >\n Currently installed\n </div>\n </div>\n <div class=\"card-block\">\n <c8y-operation-details\n [operation]=\"operation\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n ></c8y-operation-details>\n </div>\n </div>\n </div>\n <div class=\"card--grid__inner-scroll d-col no-align-items\">\n <div class=\"d-contents\">\n <!-- FIRMWARE -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'c8y-firmware'\"\n [sectionTitle]=\"'Firmware' | translate\"\n [emptyStateText]=\"'No firmware to display.' | translate\"\n [emptyStateDetails]=\"'No firmware assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"firmwareItems\"\n [isEmpty]=\"!selectedProfile?.c8y_DeviceProfile?.firmware?.name\"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- SOFTWARE -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'c8y-tools'\"\n [sectionTitle]=\"'Software' | translate\"\n [emptyStateText]=\"'No software to display.' | translate\"\n [emptyStateDetails]=\"'No software assigned.' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"softwareItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.software ||\n selectedProfile?.c8y_DeviceProfile?.software?.length === 0\n \"\n ></c8y-device-tab-profile-detail>\n </div>\n <div class=\"d-contents\">\n <!-- CONFIGURATION -->\n <c8y-device-tab-profile-detail\n class=\"d-contents\"\n [sectionIcon]=\"'gears'\"\n [sectionTitle]=\"'Configuration' | translate\"\n [emptyStateText]=\"'No configuration to display' | translate\"\n [emptyStateDetails]=\"'No configuration assigned' | translate\"\n [isProfileSelected]=\"!!selectedProfile\"\n [items]=\"configurationItems\"\n [isEmpty]=\"\n !selectedProfile?.c8y_DeviceProfile?.configuration ||\n selectedProfile?.c8y_DeviceProfile?.configuration?.length === 0\n \"\n ></c8y-device-tab-profile-detail>\n </div>\n <!-- fill in the remanining vertical space when empty -->\n <div class=\"card--grid grid__col--6-6--md flex-grow\">\n <div class=\"bg-level-0\"></div>\n <div class=\"bg-level-1\"></div>\n </div>\n </div>\n</div>\n" }]
939
957
  }], ctorParameters: () => [{ type: i2.ManagedObjectRealtimeService }, { type: DeviceProfileService }, { type: i5.ActivatedRoute }, { type: i2.OperationRealtimeService }, { type: i2.AlertService }] });
940
958
 
941
959
  const deviceProfilesRoutes = [