@c8y/ngx-components 1021.2.1 → 1021.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets-navigator/asset-selector/asset-selector-node.component.d.ts +2 -1
- package/assets-navigator/asset-selector/asset-selector-node.component.d.ts.map +1 -1
- package/assets-navigator/asset-selector/asset-selector.component.d.ts +2 -1
- package/assets-navigator/asset-selector/asset-selector.component.d.ts.map +1 -1
- package/auth-configuration/sso-configuration/template-parts/basic-configuration.component.d.ts +1 -0
- package/auth-configuration/sso-configuration/template-parts/basic-configuration.component.d.ts.map +1 -1
- package/cockpit-config/cockpit-config.service.d.ts.map +1 -1
- package/cockpit-config/cockpit-configuration.component.d.ts +1 -0
- package/cockpit-config/cockpit-configuration.component.d.ts.map +1 -1
- package/cockpit-config/root-node-config.component.d.ts +2 -1
- package/cockpit-config/root-node-config.component.d.ts.map +1 -1
- package/context-dashboard/context-dashboard.service.d.ts.map +1 -1
- package/core/common/get-group-icon.pipe.d.ts.map +1 -1
- package/core/common/global-config.service.d.ts +1 -1
- package/core/common/global-config.service.d.ts.map +1 -1
- package/core/login/login.component.d.ts.map +1 -1
- package/core/login/login.service.d.ts +1 -1
- package/core/login/login.service.d.ts.map +1 -1
- package/device-profile/device-profile-list.component.d.ts +31 -14
- package/device-profile/device-profile-list.component.d.ts.map +1 -1
- package/esm2022/assets-navigator/asset-selector/asset-selector-node.component.mjs +6 -3
- package/esm2022/assets-navigator/asset-selector/asset-selector.component.mjs +7 -4
- package/esm2022/assets-navigator/asset-selector/miller-view.component.mjs +1 -1
- package/esm2022/auth-configuration/sso-configuration/template-parts/access-mapping/inventory-roles-modal.component.mjs +1 -1
- package/esm2022/auth-configuration/sso-configuration/template-parts/basic-configuration.component.mjs +5 -3
- package/esm2022/cockpit-config/cockpit-config.service.mjs +7 -3
- package/esm2022/cockpit-config/cockpit-configuration.component.mjs +6 -3
- package/esm2022/cockpit-config/root-node-config.component.mjs +8 -4
- package/esm2022/cockpit-config/setup/cockpit-setup-step3.component.mjs +1 -1
- package/esm2022/context-dashboard/context-dashboard.service.mjs +3 -2
- package/esm2022/core/common/get-group-icon.pipe.mjs +4 -1
- package/esm2022/core/common/global-config.service.mjs +3 -2
- package/esm2022/core/login/login.component.mjs +8 -3
- package/esm2022/core/login/login.service.mjs +5 -2
- package/esm2022/device-grid/columns/group.filtering-form-renderer.component.mjs +1 -1
- package/esm2022/device-profile/device-profile-list.component.mjs +102 -27
- package/esm2022/protocol-lwm2m/components/configuration/typed-forms/firmware-settings.component.mjs +11 -2
- package/esm2022/repository/shared/repository.model.mjs +2 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +12 -6
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +5 -3
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +19 -9
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +110 -35
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs +10 -1
- package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +1 -0
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +16 -4
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +20 -2
- package/package.json +1 -1
- package/protocol-lwm2m/components/configuration/typed-forms/firmware-settings.component.d.ts +10 -0
- package/protocol-lwm2m/components/configuration/typed-forms/firmware-settings.component.d.ts.map +1 -1
- package/repository/shared/repository.model.d.ts +2 -1
- package/repository/shared/repository.model.d.ts.map +1 -1
- package/repository/shared/repository.service.d.ts +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, forwardRef, Component, Input, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
4
|
-
import { NavigatorNode, gettext, PRODUCT_EXPERIENCE_EVENT_SOURCE, ModalSelectionMode, Status, ManagedObjectRealtimeService, ViewContext, CoreModule, CommonModule, hookNavigator, hookRoute } from '@c8y/ngx-components';
|
|
3
|
+
import * as i2 from '@c8y/ngx-components';
|
|
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
7
|
import { get, sortBy, toArray, assign, concat, uniqWith, isEqual, has, isEmpty, cloneDeep } from 'lodash-es';
|
|
8
8
|
import * as i1$1 from '@c8y/ngx-components/repository/shared';
|
|
9
|
-
import { PRODUCT_EXPERIENCE_REPOSITORY_SHARED, RepositoryType, RepositorySelectModalComponent, SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
|
|
10
|
-
import { Subject,
|
|
11
|
-
import { switchMap, map, take, distinctUntilChanged, shareReplay,
|
|
12
|
-
import * as i2 from '@angular/common';
|
|
9
|
+
import { PRODUCT_EXPERIENCE_REPOSITORY_SHARED, RepositoryType, RepositorySelectModalComponent, RepositoryItemNameGridColumn, DeviceTypeGridColumn, SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
|
|
10
|
+
import { Subject, from, pipe } from 'rxjs';
|
|
11
|
+
import { switchMap, map, take, distinctUntilChanged, shareReplay, filter } from 'rxjs/operators';
|
|
12
|
+
import * as i2$1 from '@angular/common';
|
|
13
13
|
import * as i5 from '@angular/router';
|
|
14
14
|
import { RouterModule } from '@angular/router';
|
|
15
15
|
import * as i2$2 from 'ngx-bootstrap/dropdown';
|
|
@@ -22,7 +22,7 @@ import { ButtonsModule } from 'ngx-bootstrap/buttons';
|
|
|
22
22
|
import * as i7 from '@angular/forms';
|
|
23
23
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
24
24
|
import * as i4 from 'ngx-bootstrap/modal';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i4$1 from '@ngx-translate/core';
|
|
26
26
|
import * as i6 from '@c8y/ngx-components/operations/operation-details';
|
|
27
27
|
import { OperationDetailsModule } from '@c8y/ngx-components/operations/operation-details';
|
|
28
28
|
|
|
@@ -203,12 +203,12 @@ class DeviceProfileService {
|
|
|
203
203
|
});
|
|
204
204
|
return comparisonObj;
|
|
205
205
|
}
|
|
206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileService, deps: [{ token: i1.InventoryService }, { token: i1.OperationService }, { token:
|
|
206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileService, deps: [{ token: i1.InventoryService }, { token: i1.OperationService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
207
207
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileService }); }
|
|
208
208
|
}
|
|
209
209
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileService, decorators: [{
|
|
210
210
|
type: Injectable
|
|
211
|
-
}], ctorParameters: () => [{ type: i1.InventoryService }, { type: i1.OperationService }, { type:
|
|
211
|
+
}], ctorParameters: () => [{ type: i1.InventoryService }, { type: i1.OperationService }, { type: i2.AlertService }] });
|
|
212
212
|
|
|
213
213
|
class SelectConfigurationModalComponent {
|
|
214
214
|
constructor(repositoryService) {
|
|
@@ -272,7 +272,7 @@ class SelectConfigurationModalComponent {
|
|
|
272
272
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
273
273
|
useExisting: forwardRef(() => SelectConfigurationModalComponent)
|
|
274
274
|
}
|
|
275
|
-
], ngImport: i0, template: "<c8y-select-modal\n [icon]=\"'gears'\"\n [title]=\"title\"\n [items]=\"configurations | async\"\n [mode]=\"'multi'\"\n (result)=\"result($event)\"\n (search)=\"search($event)\"\n [disableSelected]=\"true\"\n [labels]=\"labels\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.SHARED.COMPONENTS.SELECT_CONFIGURATION_MODAL }\"\n></c8y-select-modal>\n", dependencies: [{ kind: "component", type:
|
|
275
|
+
], ngImport: i0, template: "<c8y-select-modal\n [icon]=\"'gears'\"\n [title]=\"title\"\n [items]=\"configurations | async\"\n [mode]=\"'multi'\"\n (result)=\"result($event)\"\n (search)=\"search($event)\"\n [disableSelected]=\"true\"\n [labels]=\"labels\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.SHARED.COMPONENTS.SELECT_CONFIGURATION_MODAL }\"\n></c8y-select-modal>\n", dependencies: [{ kind: "component", type: i2.SelectModalComponent, selector: "c8y-select-modal", inputs: ["icon", "title", "subTitle", "items", "mode", "disableSelected", "showFilter", "additionalFilterTemplate", "areMoreEntries", "labels", "noItemsMessage", "hideEmptyItems"], outputs: ["result", "search", "onChoiceUpdated"] }, { kind: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] }); }
|
|
276
276
|
}
|
|
277
277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SelectConfigurationModalComponent, decorators: [{
|
|
278
278
|
type: Component,
|
|
@@ -533,13 +533,13 @@ class DeviceProfileComponent {
|
|
|
533
533
|
}
|
|
534
534
|
return {};
|
|
535
535
|
}
|
|
536
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileComponent, deps: [{ token: i5.ActivatedRoute }, { token:
|
|
536
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileComponent, deps: [{ token: i5.ActivatedRoute }, { token: i2.AlertService }, { token: i1.InventoryService }, { token: i4.BsModalService }, { token: i1$1.RepositoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
537
537
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceProfileComponent, selector: "c8y-device-profile", providers: [
|
|
538
538
|
{
|
|
539
539
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
540
540
|
useExisting: forwardRef(() => DeviceProfileComponent)
|
|
541
541
|
}
|
|
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: i3.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i3.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i3.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.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: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i3.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i3.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i3.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i3.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: i3.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: i3.C8yTranslatePipe, name: "translate" }] }); }
|
|
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" }] }); }
|
|
543
543
|
}
|
|
544
544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileComponent, decorators: [{
|
|
545
545
|
type: Component,
|
|
@@ -549,7 +549,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
549
549
|
useExisting: forwardRef(() => DeviceProfileComponent)
|
|
550
550
|
}
|
|
551
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" }]
|
|
552
|
-
}], ctorParameters: () => [{ type: i5.ActivatedRoute }, { type:
|
|
552
|
+
}], ctorParameters: () => [{ type: i5.ActivatedRoute }, { type: i2.AlertService }, { type: i1.InventoryService }, { type: i4.BsModalService }, { type: i1$1.RepositoryService }] });
|
|
553
553
|
|
|
554
554
|
class AddDeviceProfileComponent {
|
|
555
555
|
constructor(modal, deviceProfileService) {
|
|
@@ -582,7 +582,7 @@ class AddDeviceProfileComponent {
|
|
|
582
582
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
583
583
|
useExisting: forwardRef(() => AddDeviceProfileComponent)
|
|
584
584
|
}
|
|
585
|
-
], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-device-profile'\"></i>\n <div\n class=\"modal-title\"\n id=\"addDeviceProfileModalTitle\"\n translate\n >\n Add device profile\n </div>\n </div>\n\n <form\n #createDeviceProfile=\"ngForm\"\n (ngSubmit)=\"createDeviceProfile.form.valid && create()\"\n >\n <div class=\"modal-inner-scroll\">\n <div\n class=\"modal-body\"\n id=\"addDeviceProfileModalDescription\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n name=\"name\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"deviceProfile.name\"\n data-cy=\"add-device-profile--device-profile-name\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label>\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ DEVICE_TYPE_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n </label>\n <input\n class=\"form-control\"\n id=\"deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"add-device-profile--device-type\"\n />\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.CANCEL }\"\n >\n {{ 'Cancel' | translate }}\n </button>\n\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Continue' | translate }}\"\n type=\"submit\"\n [disabled]=\"createDeviceProfile.form.invalid\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.CREATE }\"\n >\n {{ 'Continue' | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type:
|
|
585
|
+
], ngImport: i0, template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-device-profile'\"></i>\n <div\n class=\"modal-title\"\n id=\"addDeviceProfileModalTitle\"\n translate\n >\n Add device profile\n </div>\n </div>\n\n <form\n #createDeviceProfile=\"ngForm\"\n (ngSubmit)=\"createDeviceProfile.form.valid && create()\"\n >\n <div class=\"modal-inner-scroll\">\n <div\n class=\"modal-body\"\n id=\"addDeviceProfileModalDescription\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n placeholder=\"{{ 'e.g. My device profile' | translate }}\"\n name=\"name\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"deviceProfile.name\"\n data-cy=\"add-device-profile--device-profile-name\"\n />\n </c8y-form-group>\n <c8y-form-group>\n <label>\n {{ 'Device type' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ DEVICE_TYPE_POPOVER | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n type=\"button\"\n ></button>\n </label>\n <input\n class=\"form-control\"\n id=\"deviceType\"\n placeholder=\"{{ 'e.g.' | translate }} c8y_Linux\"\n name=\"deviceType\"\n [(ngModel)]=\"deviceProfile.c8y_Filter.type\"\n data-cy=\"add-device-profile--device-type\"\n />\n </c8y-form-group>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.CANCEL }\"\n >\n {{ 'Cancel' | translate }}\n </button>\n\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Continue' | translate }}\"\n type=\"submit\"\n [disabled]=\"createDeviceProfile.form.invalid\"\n c8yProductExperience\n inherit\n suppressDataOverriding\n [actionData]=\"{ action: PRODUCT_EXPERIENCE.ACTIONS.CREATE }\"\n >\n {{ 'Continue' | translate }}\n </button>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: 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: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { 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" }] }); }
|
|
586
586
|
}
|
|
587
587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AddDeviceProfileComponent, decorators: [{
|
|
588
588
|
type: Component,
|
|
@@ -595,29 +595,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
595
595
|
}], ctorParameters: () => [{ type: i4.BsModalRef }, { type: DeviceProfileService }] });
|
|
596
596
|
|
|
597
597
|
class DeviceProfileListComponent {
|
|
598
|
-
constructor(
|
|
599
|
-
this.
|
|
600
|
-
this.
|
|
598
|
+
constructor(repositoryService, gridService, modalService, bsModalService, translateService, alertService, router, activatedRoute, deviceProfileService) {
|
|
599
|
+
this.repositoryService = repositoryService;
|
|
600
|
+
this.gridService = gridService;
|
|
601
601
|
this.modalService = modalService;
|
|
602
|
-
this.alertService = alertService;
|
|
603
602
|
this.bsModalService = bsModalService;
|
|
603
|
+
this.translateService = translateService;
|
|
604
|
+
this.alertService = alertService;
|
|
604
605
|
this.router = router;
|
|
606
|
+
this.activatedRoute = activatedRoute;
|
|
605
607
|
this.deviceProfileService = deviceProfileService;
|
|
606
|
-
this.
|
|
607
|
-
this.
|
|
608
|
-
this.
|
|
608
|
+
this.sizeRequestDone = false;
|
|
609
|
+
this.refresh$ = new EventEmitter();
|
|
610
|
+
this.isDataPresent$ = from(this.repositoryService.listRepositoryEntries(RepositoryType.PROFILE, { skipLegacy: true })).pipe(map(({ data }) => data.length > 0));
|
|
611
|
+
this.columns = [
|
|
612
|
+
new RepositoryItemNameGridColumn({
|
|
613
|
+
filterLabel: gettext('Filter device profile by name'),
|
|
614
|
+
placeholder: gettext('ubuntu core')
|
|
615
|
+
}),
|
|
616
|
+
new DeviceTypeGridColumn({ filterLabel: gettext('Filter device profile by device type') })
|
|
617
|
+
];
|
|
618
|
+
this.actionControls = [];
|
|
619
|
+
this.pagination = {
|
|
620
|
+
pageSize: 50,
|
|
621
|
+
currentPage: 1
|
|
622
|
+
};
|
|
609
623
|
this.productExperienceEvent = {
|
|
610
624
|
eventName: PRODUCT_EXPERIENCE_DEVICE_PROFILE.EVENTS.REPOSITORY,
|
|
611
625
|
data: {
|
|
612
626
|
component: PRODUCT_EXPERIENCE_DEVICE_PROFILE.COMPONENTS.DEVICE_PROFILE_LIST
|
|
613
627
|
}
|
|
614
628
|
};
|
|
629
|
+
this.noResultsMessage = gettext('No results to display.');
|
|
630
|
+
this.noDataMessage = gettext('No device profiles to display.');
|
|
631
|
+
this.noResultsSubtitle = gettext('Refine your search terms or check your spelling.');
|
|
632
|
+
this.noDataSubtitle = gettext('Add a new device profile by clicking below.');
|
|
633
|
+
this.serverSideDataCallback = this.onDataSourceModifier.bind(this);
|
|
615
634
|
}
|
|
616
635
|
ngOnInit() {
|
|
617
|
-
this.
|
|
636
|
+
this.actionControls.push({
|
|
637
|
+
type: BuiltInActionType.Edit,
|
|
638
|
+
callback: this.editDeviceProfile.bind(this)
|
|
639
|
+
});
|
|
640
|
+
this.actionControls.push({
|
|
641
|
+
type: 'duplicate',
|
|
642
|
+
icon: 'copy',
|
|
643
|
+
text: gettext('Duplicate'),
|
|
644
|
+
callback: this.duplicateDeviceProfile.bind(this)
|
|
645
|
+
});
|
|
646
|
+
this.actionControls.push({
|
|
647
|
+
type: BuiltInActionType.Delete,
|
|
648
|
+
callback: this.deleteDeviceProfile.bind(this)
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
async onDataSourceModifier(dataSourceModifier) {
|
|
652
|
+
const dataRequest = this.repositoryService.listRepositoryEntries(RepositoryType.PROFILE, {
|
|
653
|
+
query: this.gridService.getQueryObj(dataSourceModifier.columns),
|
|
654
|
+
skipDefaultOrder: true,
|
|
655
|
+
params: {
|
|
656
|
+
pageSize: dataSourceModifier.pagination.pageSize,
|
|
657
|
+
currentPage: dataSourceModifier.pagination.currentPage
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
const filtererdSizeRequest = this.repositoryService
|
|
661
|
+
.listRepositoryEntries(RepositoryType.PROFILE, {
|
|
662
|
+
skipDefaultOrder: true,
|
|
663
|
+
query: this.gridService.getQueryObj(dataSourceModifier.columns),
|
|
664
|
+
params: { pageSize: 1 }
|
|
665
|
+
})
|
|
666
|
+
.then(response => response?.paging?.totalPages);
|
|
667
|
+
this.sizeRequest = this.repositoryService
|
|
668
|
+
.listRepositoryEntries(RepositoryType.PROFILE, {
|
|
669
|
+
skipDefaultOrder: true,
|
|
670
|
+
params: { pageSize: 1 }
|
|
671
|
+
})
|
|
672
|
+
.then(response => {
|
|
673
|
+
this.sizeRequestDone = true;
|
|
674
|
+
return response?.paging?.totalPages;
|
|
675
|
+
});
|
|
676
|
+
const [dataResponse, size, filteredSize] = await Promise.all([
|
|
677
|
+
dataRequest,
|
|
678
|
+
this.sizeRequest,
|
|
679
|
+
filtererdSizeRequest
|
|
680
|
+
]);
|
|
681
|
+
const { res, data, paging } = dataResponse;
|
|
682
|
+
const serverSideDataResult = {
|
|
683
|
+
res,
|
|
684
|
+
data,
|
|
685
|
+
paging,
|
|
686
|
+
filteredSize,
|
|
687
|
+
size
|
|
688
|
+
};
|
|
689
|
+
return serverSideDataResult;
|
|
618
690
|
}
|
|
619
|
-
|
|
620
|
-
this.
|
|
691
|
+
editDeviceProfile(deviceProfile) {
|
|
692
|
+
this.router.navigate([deviceProfile.id], { relativeTo: this.activatedRoute });
|
|
621
693
|
}
|
|
622
694
|
async createDeviceProfile() {
|
|
623
695
|
const modal = this.bsModalService.show(AddDeviceProfileComponent, {
|
|
@@ -662,28 +734,31 @@ class DeviceProfileListComponent {
|
|
|
662
734
|
ok: gettext('Delete')
|
|
663
735
|
}, {}, this.productExperienceEvent);
|
|
664
736
|
await this.delete(deviceProfile.id);
|
|
665
|
-
this.
|
|
737
|
+
this.refresh$.next();
|
|
666
738
|
}
|
|
667
739
|
catch (ex) {
|
|
668
740
|
// do nothing
|
|
669
741
|
}
|
|
670
742
|
}
|
|
743
|
+
trackByName(_index, column) {
|
|
744
|
+
return column.name;
|
|
745
|
+
}
|
|
671
746
|
async delete(profileId) {
|
|
672
747
|
try {
|
|
673
|
-
await this.
|
|
748
|
+
await this.repositoryService.delete(profileId);
|
|
674
749
|
this.alertService.success(gettext('Device profile deleted.'));
|
|
675
750
|
}
|
|
676
751
|
catch (ex) {
|
|
677
752
|
this.alertService.addServerFailure(ex);
|
|
678
753
|
}
|
|
679
754
|
}
|
|
680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileListComponent, deps: [{ token: i1.
|
|
755
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileListComponent, deps: [{ token: i1$1.RepositoryService }, { token: i2.DataGridService }, { token: i2.ModalService }, { token: i4.BsModalService }, { token: i4$1.TranslateService }, { token: i2.AlertService }, { token: i5.Router }, { token: i5.ActivatedRoute }, { token: DeviceProfileService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
681
756
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceProfileListComponent, selector: "c8y-device-profile-list", providers: [
|
|
682
757
|
{
|
|
683
758
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
684
759
|
useExisting: forwardRef(() => DeviceProfileListComponent)
|
|
685
760
|
}
|
|
686
|
-
], ngImport: i0, template: "<c8y-title>{{ 'Device profiles' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ 'Device profiles' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add device profile' | translate }}\"\n data-cy=\"device-profile-list--Add-device-profile\"\n (click)=\"createDeviceProfile()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add device profile' | translate }}\n </button>\n</c8y-action-bar-item>\n
|
|
761
|
+
], ngImport: i0, template: "<c8y-title>{{ 'Device profiles' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ 'Device profiles' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add device profile' | translate }}\"\n data-cy=\"device-profile-list--Add-device-profile\"\n (click)=\"createDeviceProfile()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add device profile' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-device-profiles\"\n></c8y-help>\n\n<div class=\"content-fullpage border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Device profiles' | translate\"\n [refresh]=\"refresh$\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'c8y-tools'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add device profile' | translate }}\"\n type=\"button\"\n (click)=\"createDeviceProfile()\"\n >\n {{ 'Add device profile' | translate }}\n </button>\n </p>\n </c8y-ui-empty-state>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByName\">\n <c8y-column [name]=\"column.name\"></c8y-column>\n </ng-container>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2$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.ColumnDirective, selector: "c8y-column", inputs: ["name"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: i2.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
687
762
|
}
|
|
688
763
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileListComponent, decorators: [{
|
|
689
764
|
type: Component,
|
|
@@ -692,8 +767,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
692
767
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
693
768
|
useExisting: forwardRef(() => DeviceProfileListComponent)
|
|
694
769
|
}
|
|
695
|
-
], template: "<c8y-title>{{ 'Device profiles' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ 'Device profiles' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add device profile' | translate }}\"\n data-cy=\"device-profile-list--Add-device-profile\"\n (click)=\"createDeviceProfile()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add device profile' | translate }}\n </button>\n</c8y-action-bar-item>\n
|
|
696
|
-
}], ctorParameters: () => [{ type: i1.
|
|
770
|
+
], template: "<c8y-title>{{ 'Device profiles' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n icon=\"c8y-management\"\n label=\"{{ 'Management' | translate }}\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n icon=\"c8y-device-profile\"\n label=\"{{ 'Device profiles' | translate }}\"\n ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add device profile' | translate }}\"\n data-cy=\"device-profile-list--Add-device-profile\"\n (click)=\"createDeviceProfile()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add device profile' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help\n src=\"/docs/device-management-application/managing-device-data/#managing-device-profiles\"\n></c8y-help>\n\n<div class=\"content-fullpage border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Device profiles' | translate\"\n [refresh]=\"refresh$\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'c8y-tools'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add device profile' | translate }}\"\n type=\"button\"\n (click)=\"createDeviceProfile()\"\n >\n {{ 'Add device profile' | translate }}\n </button>\n </p>\n </c8y-ui-empty-state>\n <ng-container *ngFor=\"let column of columns; trackBy: trackByName\">\n <c8y-column [name]=\"column.name\"></c8y-column>\n </ng-container>\n </c8y-data-grid>\n</div>\n" }]
|
|
771
|
+
}], ctorParameters: () => [{ type: i1$1.RepositoryService }, { type: i2.DataGridService }, { type: i2.ModalService }, { type: i4.BsModalService }, { type: i4$1.TranslateService }, { type: i2.AlertService }, { type: i5.Router }, { type: i5.ActivatedRoute }, { type: DeviceProfileService }] });
|
|
697
772
|
|
|
698
773
|
class DeviceProfileGuard {
|
|
699
774
|
canActivate(route) {
|
|
@@ -719,7 +794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
719
794
|
|
|
720
795
|
class DeviceProfileItemListComponent {
|
|
721
796
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
722
|
-
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:
|
|
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" }] }); }
|
|
723
798
|
}
|
|
724
799
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceProfileItemListComponent, decorators: [{
|
|
725
800
|
type: Component,
|
|
@@ -741,7 +816,7 @@ class DeviceTabProfileDetailComponent {
|
|
|
741
816
|
this.showTextLabel = true;
|
|
742
817
|
}
|
|
743
818
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
744
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceTabProfileDetailComponent, selector: "c8y-device-tab-profile-detail", inputs: { sectionTitle: "sectionTitle", sectionIcon: "sectionIcon", emptyStateText: "emptyStateText", emptyStateDetails: "emptyStateDetails", isProfileSelected: "isProfileSelected", isEmpty: "isEmpty", items: "items", showTextLabel: "showTextLabel" }, ngImport: i0, template: "<div class=\"card--grid grid__col--6-6--md\">\n <div class=\"bg-level-0 card-block sticky-top\">\n <h5 class=\"legend form-block\">{{ sectionTitle | translate }}</h5>\n </div>\n <div class=\"bg-level-1 card-block sticky-top hidden-xs hidden-sm\">\n <h5 class=\"legend form-block\">{{ sectionTitle | translate }}</h5>\n </div>\n <div class=\"bg-level-0 p-l-16 p-r-16\">\n <hr class=\"m-0\" />\n </div>\n <div class=\"bg-level-1 p-l-16 p-r-16\">\n <hr class=\"m-0\" />\n </div>\n <div class=\"d-contents\" *ngIf=\"!isProfileSelected || isEmpty\">\n <div class=\"p-l-16 p-r-16\">\n <div class=\"c8y-empty-state text-left\">\n <h1 [c8yIcon]=\"sectionIcon\" class=\"c8y-icon-duocolor\"></h1>\n <p>\n <span>{{ emptyStateText | translate }}</span\n ><br />\n <small *ngIf=\"isProfileSelected; else noItems\">\n {{ emptyStateDetails | translate }}\n </small>\n <ng-template #noItems>\n <small translate>No device profile selected</small>\n </ng-template>\n </p>\n </div>\n </div>\n </div>\n <div class=\"bg-level-1\" *ngIf=\"items.length === 0\"></div>\n <c8y-device-profile-item-list\n *ngIf=\"items.length > 0\"\n [icon]=\"sectionIcon\"\n [comparisonResults]=\"items\"\n [showProfileItems]=\"isProfileSelected && !isEmpty\"\n [showTextLabel]=\"showTextLabel\"\n class=\"d-contents\"\n ></c8y-device-profile-item-list>\n <div class=\"bg-level-0 p-t-24\" *ngIf=\"isProfileSelected && !isEmpty\"></div>\n <div class=\"bg-level-1 p-t-24\" *ngIf=\"isProfileSelected && !isEmpty\"></div>\n</div>\n", dependencies: [{ kind: "directive", type:
|
|
819
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceTabProfileDetailComponent, selector: "c8y-device-tab-profile-detail", inputs: { sectionTitle: "sectionTitle", sectionIcon: "sectionIcon", emptyStateText: "emptyStateText", emptyStateDetails: "emptyStateDetails", isProfileSelected: "isProfileSelected", isEmpty: "isEmpty", items: "items", showTextLabel: "showTextLabel" }, ngImport: i0, template: "<div class=\"card--grid grid__col--6-6--md\">\n <div class=\"bg-level-0 card-block sticky-top\">\n <h5 class=\"legend form-block\">{{ sectionTitle | translate }}</h5>\n </div>\n <div class=\"bg-level-1 card-block sticky-top hidden-xs hidden-sm\">\n <h5 class=\"legend form-block\">{{ sectionTitle | translate }}</h5>\n </div>\n <div class=\"bg-level-0 p-l-16 p-r-16\">\n <hr class=\"m-0\" />\n </div>\n <div class=\"bg-level-1 p-l-16 p-r-16\">\n <hr class=\"m-0\" />\n </div>\n <div class=\"d-contents\" *ngIf=\"!isProfileSelected || isEmpty\">\n <div class=\"p-l-16 p-r-16\">\n <div class=\"c8y-empty-state text-left\">\n <h1 [c8yIcon]=\"sectionIcon\" class=\"c8y-icon-duocolor\"></h1>\n <p>\n <span>{{ emptyStateText | translate }}</span\n ><br />\n <small *ngIf=\"isProfileSelected; else noItems\">\n {{ emptyStateDetails | translate }}\n </small>\n <ng-template #noItems>\n <small translate>No device profile selected</small>\n </ng-template>\n </p>\n </div>\n </div>\n </div>\n <div class=\"bg-level-1\" *ngIf=\"items.length === 0\"></div>\n <c8y-device-profile-item-list\n *ngIf=\"items.length > 0\"\n [icon]=\"sectionIcon\"\n [comparisonResults]=\"items\"\n [showProfileItems]=\"isProfileSelected && !isEmpty\"\n [showTextLabel]=\"showTextLabel\"\n class=\"d-contents\"\n ></c8y-device-profile-item-list>\n <div class=\"bg-level-0 p-t-24\" *ngIf=\"isProfileSelected && !isEmpty\"></div>\n <div class=\"bg-level-1 p-t-24\" *ngIf=\"isProfileSelected && !isEmpty\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DeviceProfileItemListComponent, selector: "c8y-device-profile-item-list", inputs: ["icon", "comparisonResults", "showProfileItems", "showTextLabel"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
745
820
|
}
|
|
746
821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileDetailComponent, decorators: [{
|
|
747
822
|
type: Component,
|
|
@@ -843,14 +918,14 @@ class DeviceTabProfileComponent {
|
|
|
843
918
|
this.operation = operation;
|
|
844
919
|
});
|
|
845
920
|
}
|
|
846
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileComponent, deps: [{ token:
|
|
921
|
+
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 }); }
|
|
847
922
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DeviceTabProfileComponent, selector: "c8y-device-tab-profile", providers: [
|
|
848
923
|
ManagedObjectRealtimeService,
|
|
849
924
|
{
|
|
850
925
|
provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
|
|
851
926
|
useExisting: forwardRef(() => DeviceTabProfileComponent)
|
|
852
927
|
}
|
|
853
|
-
], 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 || '--'\"\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:
|
|
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 || '--'\"\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" }] }); }
|
|
854
929
|
}
|
|
855
930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DeviceTabProfileComponent, decorators: [{
|
|
856
931
|
type: Component,
|
|
@@ -861,7 +936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
861
936
|
useExisting: forwardRef(() => DeviceTabProfileComponent)
|
|
862
937
|
}
|
|
863
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 || '--'\"\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" }]
|
|
864
|
-
}], ctorParameters: () => [{ type:
|
|
939
|
+
}], ctorParameters: () => [{ type: i2.ManagedObjectRealtimeService }, { type: DeviceProfileService }, { type: i5.ActivatedRoute }, { type: i2.OperationRealtimeService }, { type: i2.AlertService }] });
|
|
865
940
|
|
|
866
941
|
const deviceProfilesRoutes = [
|
|
867
942
|
{
|