@c8y/ngx-components 1017.0.71 → 1017.0.73

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.
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-protocol-lwm2m-bootstrap-parameters.mjs","sources":["../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.guard.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.service.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.model.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.component.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.component.html","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.module.ts","../../protocol-lwm2m/bootstrap-parameters/c8y-ngx-components-protocol-lwm2m-bootstrap-parameters.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate } from '@angular/router';\nimport { TenantUiService, Permissions } from '@c8y/ngx-components';\n\n@Injectable()\nexport class Lwm2mBootstrapParametersGuard implements CanActivate {\n constructor(private tenantService: TenantUiService, private permissions: Permissions) {}\n\n canActivate(route: ActivatedRouteSnapshot) {\n const contextData = (route.data as any).contextData || (route.parent.data as any).contextData;\n if (contextData?.type !== 'c8y_lwm2m') {\n return false;\n }\n return (\n this.tenantService.isMicroserviceSubscribedInCurrentTenant('lwm2m-agent') &&\n this.permissions.hasRole('ROLE_INVENTORY_READ')\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FetchClient, IResult } from '@c8y/client';\nimport { Lwm2mClientService } from '@c8y/ngx-components/protocol-lwm2m/shared';\nimport { Lwm2mBootstrapParameters } from './lwm2m-bootstrap-parameters.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Lwm2mBootstrapParametersService extends Lwm2mClientService<Lwm2mBootstrapParameters> {\n constructor(client: FetchClient) {\n super(client);\n }\n\n detail(id: string): Promise<IResult<Lwm2mBootstrapParameters | any>> {\n return super.detail(id);\n }\n\n update(entity: Lwm2mBootstrapParameters): Promise<IResult<Lwm2mBootstrapParameters | any>> {\n return super.update(entity);\n }\n\n onBeforeUpdate(entity: Lwm2mBootstrapParameters): Lwm2mBootstrapParameters {\n delete entity.id;\n return entity;\n }\n\n getDetailUrl(entity: Lwm2mBootstrapParameters): string {\n return `${this.listUrl}/${super.getEntityId(entity)}/bootstrapParams`;\n }\n}\n","export interface Lwm2mBootstrapParameters {\n bindingMode?: BindingMode;\n bootstrapId?: string;\n bootstrapKey?: string;\n bootstrapShortServerId?: number;\n defaultMaximumPeriod?: number;\n defaultMinimumPeriod?: number;\n securityMode?: SecurityMode;\n endpoint?: string;\n generateBootstrapServerConfig?: boolean;\n lwm2mShortServerId?: number;\n serverUri?: string;\n registrationLifeTime?: number;\n serverPublicKey?: string;\n securityInstanceOffset?: number;\n publicKeyOrId?: string;\n secretKey?: string;\n id?: string;\n}\n\nexport enum SecurityMode {\n NO_SEC = 'NO_SEC',\n PSK = 'PSK'\n}\n\nexport enum BindingMode {\n U = 'U',\n UQ = 'UQ'\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { gettext, AlertService, Permissions, Alert } from '@c8y/ngx-components';\nimport { FormlyFieldConfig, FormlyFormBuilder, FormlyFormOptions } from '@ngx-formly/core';\nimport { Lwm2mBootstrapParametersService } from './lwm2m-bootstrap-parameters.service';\nimport {\n BindingMode,\n Lwm2mBootstrapParameters,\n SecurityMode\n} from './lwm2m-bootstrap-parameters.model';\n\n@Component({\n selector: 'c8y-lwm2m-bootstrap-parameters',\n templateUrl: './lwm2m-bootstrap-parameters.component.html'\n})\nexport class Lwm2mBootstrapParametersComponent implements OnInit, OnDestroy {\n fields: FormlyFieldConfig[];\n form: FormGroup = new FormGroup({});\n model = {};\n options: FormlyFormOptions = {\n formState: {\n disabled: false,\n mainModel: this.model\n }\n };\n\n private readonly writePermissionMissingAlert: Alert = {\n text: gettext('You do not have write permissions. This form is read-only.'),\n type: 'info'\n };\n\n private readonly DISABLED_HINT_TEXT: string = gettext(\n 'Change the security mode to enable this field.'\n );\n private readonly pattern: RegExp = /^([a-fA-F0-9]{2})+$/;\n private deviceId: string;\n\n constructor(\n private alertService: AlertService,\n private permissions: Permissions,\n private builder: FormlyFormBuilder,\n private lwm2mBootstrapParametersSvc: Lwm2mBootstrapParametersService,\n private route: ActivatedRoute\n ) {\n this.deviceId = this.route?.snapshot?.parent?.params?.id;\n }\n\n async ngOnInit() {\n const parameters: Lwm2mBootstrapParameters = await this.getBootstrapParameters();\n const {\n bindingMode,\n bootstrapId,\n bootstrapKey,\n bootstrapShortServerId,\n defaultMaximumPeriod,\n defaultMinimumPeriod,\n securityMode,\n endpoint,\n generateBootstrapServerConfig,\n lwm2mShortServerId,\n serverUri,\n registrationLifeTime,\n serverPublicKey,\n securityInstanceOffset,\n publicKeyOrId,\n secretKey\n }: Lwm2mBootstrapParameters = parameters;\n\n const leftFields: FormlyFieldConfig[] = [\n {\n key: 'endpoint',\n id: 'bs-endpoint',\n type: 'string',\n defaultValue: endpoint,\n templateOptions: {\n label: gettext('Endpoint'),\n placeholder: 'urn:imei:012345678901234',\n readonly: true\n }\n },\n {\n key: 'securityMode',\n id: 'bs-securityMode',\n type: 'select',\n templateOptions: {\n label: gettext('Security mode'),\n initValue: securityMode || SecurityMode.NO_SEC,\n options: [\n { label: SecurityMode.NO_SEC, value: SecurityMode.NO_SEC },\n { label: SecurityMode.PSK, value: SecurityMode.PSK }\n ],\n required: true\n }\n },\n {\n key: 'bootstrapId',\n id: 'bs-bootstrapId',\n type: 'string',\n templateOptions: {\n label: gettext('Bootstrap PSK ID'),\n description: this.DISABLED_HINT_TEXT,\n required: true\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(bootstrapId);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'bootstrapKey',\n id: 'bs-bootstrapKey',\n type: 'string',\n templateOptions: {\n label: gettext('Bootstrap pre-shared key'),\n description: this.DISABLED_HINT_TEXT,\n placeholder: '0123456789abcdef',\n required: true,\n pattern: this.pattern\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(bootstrapKey);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'securityInstanceOffset',\n id: 'bs-securityInstanceOffset',\n type: 'number',\n defaultValue: securityInstanceOffset,\n templateOptions: {\n label: gettext('Security instance offset'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'bootstrapShortServerId',\n id: 'bs-bootstrapShortServerId',\n type: 'number',\n defaultValue: bootstrapShortServerId,\n templateOptions: {\n label: gettext('LWM2M bootstrap short server ID'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'registrationLifeTime',\n id: 'bs-registrationLifeTime',\n type: 'number',\n defaultValue: registrationLifeTime,\n templateOptions: {\n label: gettext('Registration lifetime'),\n description: gettext('in seconds'),\n placeholder: '600',\n min: 0\n }\n },\n {\n key: 'bindingMode',\n id: 'bs-bindingMode',\n type: 'select',\n templateOptions: {\n label: gettext('Binding mode'),\n initValue: bindingMode || BindingMode.U,\n options: [\n { label: gettext('UDP'), value: BindingMode.U },\n { label: gettext('UDP with queue mode'), value: BindingMode.UQ }\n ]\n }\n }\n ];\n\n const rightFields: FormlyFieldConfig[] = [\n {\n key: 'serverPublicKey',\n id: 'bs-serverPublicKey',\n type: 'string',\n defaultValue: serverPublicKey,\n templateOptions: {\n label: gettext('Server public key'),\n placeholder: 'AAAAB3NzaC1yc2E…'\n }\n },\n {\n key: 'serverUri',\n id: 'bs-serverUri',\n type: 'string',\n defaultValue: serverUri,\n templateOptions: {\n label: gettext('LWM2M server URI'),\n placeholder: 'coaps://<LWM2M-server-domain>:<coaps-port>'\n }\n },\n {\n key: 'publicKeyOrId',\n id: 'bs-publicKeyOrId',\n type: 'string',\n templateOptions: {\n label: gettext('LWM2M PSK ID'),\n description: this.DISABLED_HINT_TEXT,\n required: true\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(publicKeyOrId);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'secretKey',\n id: 'bs-secretKey',\n type: 'string',\n templateOptions: {\n label: gettext('LWM2M pre-shared key'),\n description: this.DISABLED_HINT_TEXT,\n placeholder: '0123456789abcdef',\n required: true,\n pattern: this.pattern\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(secretKey);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'lwm2mShortServerId',\n id: 'bs-lwm2mShortServerId',\n type: 'number',\n defaultValue: lwm2mShortServerId,\n templateOptions: {\n label: gettext('LWM2M short server ID'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'generateBootstrapServerConfig',\n id: 'bs-generateBootstrapServerConfig',\n type: 'select',\n templateOptions: {\n label: gettext('Generate bootstrap server config'),\n initValue: generateBootstrapServerConfig || false,\n options: [\n { label: gettext('Yes'), value: true },\n { label: gettext('No'), value: false }\n ]\n }\n },\n {\n key: 'defaultMinimumPeriod',\n id: 'bs-defaultMinimumPeriod',\n type: 'number',\n defaultValue: defaultMinimumPeriod,\n templateOptions: {\n label: gettext('Default minimum period'),\n description: gettext('in seconds'),\n placeholder: '10',\n min: 0\n }\n },\n {\n key: 'defaultMaximumPeriod',\n id: 'bs-defaultMaximumPeriod',\n type: 'number',\n defaultValue: defaultMaximumPeriod,\n templateOptions: {\n label: gettext('Default maximum period'),\n description: gettext('in seconds'),\n placeholder: '60',\n min: 0\n }\n }\n ];\n\n this.fields = [\n {\n fieldGroupClassName: 'card-block d-grid grid__col--6-6',\n fieldGroup: [\n {\n fieldGroupClassName: 'form-group p-24 p-t-8 p-b-8 m-b-0',\n fieldGroup: leftFields\n },\n {\n fieldGroupClassName: 'form-group p-24 p-t-8 p-b-8 m-b-0',\n fieldGroup: rightFields\n }\n ]\n }\n ];\n\n this.builder.buildForm(this.form, this.fields, this.model, this.options);\n\n const userHasWritePermission = this.permissions.hasRole('ROLE_INVENTORY_ADMIN');\n\n if (Object.keys(parameters).length === 0 || !userHasWritePermission) {\n this.form.disable();\n\n this.options.formState.disabled = true;\n }\n\n if (!userHasWritePermission) {\n this.alertService.info(this.writePermissionMissingAlert.text as string);\n }\n }\n\n ngOnDestroy() {\n // alertService checks if given alert exists.\n // save to remove it without additional checks\n this.alertService.remove(this.writePermissionMissingAlert);\n }\n\n disablePSKField(\n formState: { disabled: boolean; mainModel: Lwm2mBootstrapParameters },\n field: FormlyFieldConfig\n ) {\n if (formState.disabled) {\n delete field.templateOptions.description;\n return true;\n } else if (\n !formState.mainModel.securityMode ||\n formState.mainModel.securityMode === SecurityMode.NO_SEC\n ) {\n field.templateOptions.description = this.DISABLED_HINT_TEXT;\n field.formControl.patchValue(null);\n return true;\n }\n delete field.templateOptions.description;\n return false;\n }\n\n async save() {\n try {\n await this.lwm2mBootstrapParametersSvc.update({ ...this.model, ...{ id: this.deviceId } });\n this.alertService.success(gettext('Bootstrap parameters updated'));\n // disables save button\n this.form.markAsPristine();\n this.form.updateValueAndValidity();\n } catch (error) {\n this.alertService.addServerFailure({ ...error });\n }\n }\n\n async getBootstrapParameters(): Promise<Lwm2mBootstrapParameters> {\n try {\n return (await this.lwm2mBootstrapParametersSvc.detail(this.deviceId))\n .data as Lwm2mBootstrapParameters;\n } catch (error) {\n this.alertService.addServerFailure({ ...error });\n return {};\n }\n }\n}\n","<form (ngSubmit)=\"save()\">\n <div class=\"card content-fullpage fit-h\">\n <div class=\"card-header separator grid__col--fullspan\">\n <h1 class=\"card-title\">{{ 'LWM2M bootstrap parameters' | translate }}</h1>\n </div>\n <div class=\"inner-scroll\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n ></formly-form>\n </div>\n <div\n [hidden]=\"options.formState.disabled\"\n class=\"card-footer separator grid__col--fullspan sticky-bottom\"\n >\n <button\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"form.invalid || !form.dirty\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n</form>\n","import { NgModule } from '@angular/core';\nimport { CommonModule, CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { Lwm2mBootstrapParametersGuard } from './lwm2m-bootstrap-parameters.guard';\nimport { Lwm2mBootstrapParametersComponent } from './lwm2m-bootstrap-parameters.component';\nimport { Lwm2mBootstrapParametersService } from './lwm2m-bootstrap-parameters.service';\nimport { SharedLwm2mModule } from '@c8y/ngx-components/protocol-lwm2m/shared';\n\n@NgModule({\n imports: [CommonModule, CoreModule, SharedLwm2mModule],\n declarations: [Lwm2mBootstrapParametersComponent],\n providers: [\n Lwm2mBootstrapParametersService,\n Lwm2mBootstrapParametersGuard,\n hookRoute({\n path: 'lwm2m-bootstrap-parameters',\n context: ViewContext.Device,\n component: Lwm2mBootstrapParametersComponent,\n label: gettext('LWM2M bootstrap parameters'),\n icon: 'c8y-device-protocols',\n canActivate: [Lwm2mBootstrapParametersGuard]\n })\n ]\n})\nexport class Lwm2mBootstrapParametersModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3.Lwm2mBootstrapParametersService"],"mappings":";;;;;;;;;;;MAKa,6BAA6B,CAAA;IACxC,WAAoB,CAAA,aAA8B,EAAU,WAAwB,EAAA;QAAhE,IAAa,CAAA,aAAA,GAAb,aAAa,CAAiB;QAAU,IAAW,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B,QAAA,SAAS,CAAC;AACR,YAAA,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,YAAA,SAAS,EAAE,iCAAiC;AAC5C,YAAA,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC;AAC5C,YAAA,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,CAAC,6BAA6B,CAAC;SAC7C,CAAC;AACH,KAAA,EAAA,OAAA,EAAA,CAbS,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAe1C,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAhB1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAC;oBACtD,YAAY,EAAE,CAAC,iCAAiC,CAAC;AACjD,oBAAA,SAAS,EAAE;wBACT,+BAA+B;wBAC/B,6BAA6B;AAC7B,wBAAA,SAAS,CAAC;AACR,4BAAA,IAAI,EAAE,4BAA4B;4BAClC,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,4BAAA,SAAS,EAAE,iCAAiC;AAC5C,4BAAA,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC;AAC5C,4BAAA,IAAI,EAAE,sBAAsB;4BAC5B,WAAW,EAAE,CAAC,6BAA6B,CAAC;yBAC7C,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-protocol-lwm2m-bootstrap-parameters.mjs","sources":["../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.service.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.guard.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.model.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.component.ts","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.component.html","../../protocol-lwm2m/bootstrap-parameters/lwm2m-bootstrap-parameters.module.ts","../../protocol-lwm2m/bootstrap-parameters/c8y-ngx-components-protocol-lwm2m-bootstrap-parameters.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { FetchClient, IResult } from '@c8y/client';\nimport { Lwm2mClientService } from '@c8y/ngx-components/protocol-lwm2m/shared';\nimport { Lwm2mBootstrapParameters } from './lwm2m-bootstrap-parameters.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Lwm2mBootstrapParametersService extends Lwm2mClientService<Lwm2mBootstrapParameters> {\n constructor(client: FetchClient) {\n super(client);\n }\n\n detail(id: string): Promise<IResult<Lwm2mBootstrapParameters | any>> {\n return super.detail(id);\n }\n\n update(entity: Lwm2mBootstrapParameters): Promise<IResult<Lwm2mBootstrapParameters | any>> {\n return super.update(entity);\n }\n\n onBeforeUpdate(entity: Lwm2mBootstrapParameters): Lwm2mBootstrapParameters {\n delete entity.id;\n return entity;\n }\n\n getDetailUrl(entity: Lwm2mBootstrapParameters): string {\n return `${this.listUrl}/${super.getEntityId(entity)}/bootstrapParams`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate } from '@angular/router';\nimport { TenantUiService, Permissions } from '@c8y/ngx-components';\nimport { Lwm2mManagedObject } from '@c8y/ngx-components/protocol-lwm2m/shared';\nimport { Lwm2mBootstrapParametersService } from './lwm2m-bootstrap-parameters.service';\n\n@Injectable()\nexport class Lwm2mBootstrapParametersGuard implements CanActivate {\n constructor(\n private tenantService: TenantUiService,\n private permissions: Permissions,\n private lwm2mService: Lwm2mBootstrapParametersService\n ) {}\n\n canActivate(route: ActivatedRouteSnapshot) {\n const contextData =\n ((route.data as any).contextData as Lwm2mManagedObject) ||\n ((route.parent.data as any).contextData as Lwm2mManagedObject);\n\n return (\n this.lwm2mService.isLwm2mDevice(contextData) &&\n this.tenantService.isMicroserviceSubscribedInCurrentTenant('lwm2m-agent') &&\n this.permissions.hasRole('ROLE_INVENTORY_READ')\n );\n }\n}\n","export interface Lwm2mBootstrapParameters {\n bindingMode?: BindingMode;\n bootstrapId?: string;\n bootstrapKey?: string;\n bootstrapShortServerId?: number;\n defaultMaximumPeriod?: number;\n defaultMinimumPeriod?: number;\n securityMode?: SecurityMode;\n endpoint?: string;\n generateBootstrapServerConfig?: boolean;\n lwm2mShortServerId?: number;\n serverUri?: string;\n registrationLifeTime?: number;\n serverPublicKey?: string;\n securityInstanceOffset?: number;\n publicKeyOrId?: string;\n secretKey?: string;\n id?: string;\n}\n\nexport enum SecurityMode {\n NO_SEC = 'NO_SEC',\n PSK = 'PSK'\n}\n\nexport enum BindingMode {\n U = 'U',\n UQ = 'UQ'\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { gettext, AlertService, Permissions, Alert } from '@c8y/ngx-components';\nimport { FormlyFieldConfig, FormlyFormBuilder, FormlyFormOptions } from '@ngx-formly/core';\nimport { Lwm2mBootstrapParametersService } from './lwm2m-bootstrap-parameters.service';\nimport {\n BindingMode,\n Lwm2mBootstrapParameters,\n SecurityMode\n} from './lwm2m-bootstrap-parameters.model';\n\n@Component({\n selector: 'c8y-lwm2m-bootstrap-parameters',\n templateUrl: './lwm2m-bootstrap-parameters.component.html'\n})\nexport class Lwm2mBootstrapParametersComponent implements OnInit, OnDestroy {\n fields: FormlyFieldConfig[];\n form: FormGroup = new FormGroup({});\n model = {};\n options: FormlyFormOptions = {\n formState: {\n disabled: false,\n mainModel: this.model\n }\n };\n\n private readonly writePermissionMissingAlert: Alert = {\n text: gettext('You do not have write permissions. This form is read-only.'),\n type: 'info'\n };\n\n private readonly DISABLED_HINT_TEXT: string = gettext(\n 'Change the security mode to enable this field.'\n );\n private readonly pattern: RegExp = /^([a-fA-F0-9]{2})+$/;\n private deviceId: string;\n\n constructor(\n private alertService: AlertService,\n private permissions: Permissions,\n private builder: FormlyFormBuilder,\n private lwm2mBootstrapParametersSvc: Lwm2mBootstrapParametersService,\n private route: ActivatedRoute\n ) {\n this.deviceId = this.route?.snapshot?.parent?.params?.id;\n }\n\n async ngOnInit() {\n const parameters: Lwm2mBootstrapParameters = await this.getBootstrapParameters();\n const {\n bindingMode,\n bootstrapId,\n bootstrapKey,\n bootstrapShortServerId,\n defaultMaximumPeriod,\n defaultMinimumPeriod,\n securityMode,\n endpoint,\n generateBootstrapServerConfig,\n lwm2mShortServerId,\n serverUri,\n registrationLifeTime,\n serverPublicKey,\n securityInstanceOffset,\n publicKeyOrId,\n secretKey\n }: Lwm2mBootstrapParameters = parameters;\n\n const leftFields: FormlyFieldConfig[] = [\n {\n key: 'endpoint',\n id: 'bs-endpoint',\n type: 'string',\n defaultValue: endpoint,\n templateOptions: {\n label: gettext('Endpoint'),\n placeholder: 'urn:imei:012345678901234',\n readonly: true\n }\n },\n {\n key: 'securityMode',\n id: 'bs-securityMode',\n type: 'select',\n templateOptions: {\n label: gettext('Security mode'),\n initValue: securityMode || SecurityMode.NO_SEC,\n options: [\n { label: SecurityMode.NO_SEC, value: SecurityMode.NO_SEC },\n { label: SecurityMode.PSK, value: SecurityMode.PSK }\n ],\n required: true\n }\n },\n {\n key: 'bootstrapId',\n id: 'bs-bootstrapId',\n type: 'string',\n templateOptions: {\n label: gettext('Bootstrap PSK ID'),\n description: this.DISABLED_HINT_TEXT,\n required: true\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(bootstrapId);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'bootstrapKey',\n id: 'bs-bootstrapKey',\n type: 'string',\n templateOptions: {\n label: gettext('Bootstrap pre-shared key'),\n description: this.DISABLED_HINT_TEXT,\n placeholder: '0123456789abcdef',\n required: true,\n pattern: this.pattern\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(bootstrapKey);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'securityInstanceOffset',\n id: 'bs-securityInstanceOffset',\n type: 'number',\n defaultValue: securityInstanceOffset,\n templateOptions: {\n label: gettext('Security instance offset'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'bootstrapShortServerId',\n id: 'bs-bootstrapShortServerId',\n type: 'number',\n defaultValue: bootstrapShortServerId,\n templateOptions: {\n label: gettext('LWM2M bootstrap short server ID'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'registrationLifeTime',\n id: 'bs-registrationLifeTime',\n type: 'number',\n defaultValue: registrationLifeTime,\n templateOptions: {\n label: gettext('Registration lifetime'),\n description: gettext('in seconds'),\n placeholder: '600',\n min: 0\n }\n },\n {\n key: 'bindingMode',\n id: 'bs-bindingMode',\n type: 'select',\n templateOptions: {\n label: gettext('Binding mode'),\n initValue: bindingMode || BindingMode.U,\n options: [\n { label: gettext('UDP'), value: BindingMode.U },\n { label: gettext('UDP with queue mode'), value: BindingMode.UQ }\n ]\n }\n }\n ];\n\n const rightFields: FormlyFieldConfig[] = [\n {\n key: 'serverPublicKey',\n id: 'bs-serverPublicKey',\n type: 'string',\n defaultValue: serverPublicKey,\n templateOptions: {\n label: gettext('Server public key'),\n placeholder: 'AAAAB3NzaC1yc2E…'\n }\n },\n {\n key: 'serverUri',\n id: 'bs-serverUri',\n type: 'string',\n defaultValue: serverUri,\n templateOptions: {\n label: gettext('LWM2M server URI'),\n placeholder: 'coaps://<LWM2M-server-domain>:<coaps-port>'\n }\n },\n {\n key: 'publicKeyOrId',\n id: 'bs-publicKeyOrId',\n type: 'string',\n templateOptions: {\n label: gettext('LWM2M PSK ID'),\n description: this.DISABLED_HINT_TEXT,\n required: true\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(publicKeyOrId);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'secretKey',\n id: 'bs-secretKey',\n type: 'string',\n templateOptions: {\n label: gettext('LWM2M pre-shared key'),\n description: this.DISABLED_HINT_TEXT,\n placeholder: '0123456789abcdef',\n required: true,\n pattern: this.pattern\n },\n hooks: {\n onInit: (field: FormlyFieldConfig) => {\n field.formControl.patchValue(secretKey);\n }\n },\n expressionProperties: {\n 'templateOptions.disabled': (model: any, formState: any, field: FormlyFieldConfig) =>\n this.disablePSKField(formState, field)\n }\n },\n {\n key: 'lwm2mShortServerId',\n id: 'bs-lwm2mShortServerId',\n type: 'number',\n defaultValue: lwm2mShortServerId,\n templateOptions: {\n label: gettext('LWM2M short server ID'),\n placeholder: '0',\n min: 0\n }\n },\n {\n key: 'generateBootstrapServerConfig',\n id: 'bs-generateBootstrapServerConfig',\n type: 'select',\n templateOptions: {\n label: gettext('Generate bootstrap server config'),\n initValue: generateBootstrapServerConfig || false,\n options: [\n { label: gettext('Yes'), value: true },\n { label: gettext('No'), value: false }\n ]\n }\n },\n {\n key: 'defaultMinimumPeriod',\n id: 'bs-defaultMinimumPeriod',\n type: 'number',\n defaultValue: defaultMinimumPeriod,\n templateOptions: {\n label: gettext('Default minimum period'),\n description: gettext('in seconds'),\n placeholder: '10',\n min: 0\n }\n },\n {\n key: 'defaultMaximumPeriod',\n id: 'bs-defaultMaximumPeriod',\n type: 'number',\n defaultValue: defaultMaximumPeriod,\n templateOptions: {\n label: gettext('Default maximum period'),\n description: gettext('in seconds'),\n placeholder: '60',\n min: 0\n }\n }\n ];\n\n this.fields = [\n {\n fieldGroupClassName: 'card-block d-grid grid__col--6-6',\n fieldGroup: [\n {\n fieldGroupClassName: 'form-group p-24 p-t-8 p-b-8 m-b-0',\n fieldGroup: leftFields\n },\n {\n fieldGroupClassName: 'form-group p-24 p-t-8 p-b-8 m-b-0',\n fieldGroup: rightFields\n }\n ]\n }\n ];\n\n this.builder.buildForm(this.form, this.fields, this.model, this.options);\n\n const userHasWritePermission = this.permissions.hasRole('ROLE_INVENTORY_ADMIN');\n\n if (Object.keys(parameters).length === 0 || !userHasWritePermission) {\n this.form.disable();\n\n this.options.formState.disabled = true;\n }\n\n if (!userHasWritePermission) {\n this.alertService.info(this.writePermissionMissingAlert.text as string);\n }\n }\n\n ngOnDestroy() {\n // alertService checks if given alert exists.\n // save to remove it without additional checks\n this.alertService.remove(this.writePermissionMissingAlert);\n }\n\n disablePSKField(\n formState: { disabled: boolean; mainModel: Lwm2mBootstrapParameters },\n field: FormlyFieldConfig\n ) {\n if (formState.disabled) {\n delete field.templateOptions.description;\n return true;\n } else if (\n !formState.mainModel.securityMode ||\n formState.mainModel.securityMode === SecurityMode.NO_SEC\n ) {\n field.templateOptions.description = this.DISABLED_HINT_TEXT;\n field.formControl.patchValue(null);\n return true;\n }\n delete field.templateOptions.description;\n return false;\n }\n\n async save() {\n try {\n await this.lwm2mBootstrapParametersSvc.update({ ...this.model, ...{ id: this.deviceId } });\n this.alertService.success(gettext('Bootstrap parameters updated'));\n // disables save button\n this.form.markAsPristine();\n this.form.updateValueAndValidity();\n } catch (error) {\n this.alertService.addServerFailure({ ...error });\n }\n }\n\n async getBootstrapParameters(): Promise<Lwm2mBootstrapParameters> {\n try {\n return (await this.lwm2mBootstrapParametersSvc.detail(this.deviceId))\n .data as Lwm2mBootstrapParameters;\n } catch (error) {\n this.alertService.addServerFailure({ ...error });\n return {};\n }\n }\n}\n","<form (ngSubmit)=\"save()\">\n <div class=\"card content-fullpage fit-h\">\n <div class=\"card-header separator grid__col--fullspan\">\n <h1 class=\"card-title\">{{ 'LWM2M bootstrap parameters' | translate }}</h1>\n </div>\n <div class=\"inner-scroll\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n ></formly-form>\n </div>\n <div\n [hidden]=\"options.formState.disabled\"\n class=\"card-footer separator grid__col--fullspan sticky-bottom\"\n >\n <button\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"form.invalid || !form.dirty\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n</form>\n","import { NgModule } from '@angular/core';\nimport { CommonModule, CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { Lwm2mBootstrapParametersGuard } from './lwm2m-bootstrap-parameters.guard';\nimport { Lwm2mBootstrapParametersComponent } from './lwm2m-bootstrap-parameters.component';\nimport { Lwm2mBootstrapParametersService } from './lwm2m-bootstrap-parameters.service';\nimport { SharedLwm2mModule } from '@c8y/ngx-components/protocol-lwm2m/shared';\n\n@NgModule({\n imports: [CommonModule, CoreModule, SharedLwm2mModule],\n declarations: [Lwm2mBootstrapParametersComponent],\n providers: [\n Lwm2mBootstrapParametersService,\n Lwm2mBootstrapParametersGuard,\n hookRoute({\n path: 'lwm2m-bootstrap-parameters',\n context: ViewContext.Device,\n component: Lwm2mBootstrapParametersComponent,\n label: gettext('LWM2M bootstrap parameters'),\n icon: 'c8y-device-protocols',\n canActivate: [Lwm2mBootstrapParametersGuard]\n })\n ]\n})\nexport class Lwm2mBootstrapParametersModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.Lwm2mBootstrapParametersService","i3.Lwm2mBootstrapParametersService"],"mappings":";;;;;;;;;;;AAQM,MAAO,+BAAgC,SAAQ,kBAA4C,CAAA;AAC/F,IAAA,WAAA,CAAY,MAAmB,EAAA;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AAED,IAAA,MAAM,CAAC,EAAU,EAAA;AACf,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;KACzB;AAED,IAAA,MAAM,CAAC,MAAgC,EAAA;AACrC,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KAC7B;AAED,IAAA,cAAc,CAAC,MAAg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OAAO,CAAC,4BAA4B,CAAC;AAC5C,YAAA,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,CAAC,6BAA6B,CAAC;SAC7C,CAAC;AACH,KAAA,EAAA,OAAA,EAAA,CAbS,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAe1C,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAhB1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAC;oBACtD,YAAY,EAAE,CAAC,iCAAiC,CAAC;AACjD,oBAAA,SAAS,EAAE;wBACT,+BAA+B;wBAC/B,6BAA6B;AAC7B,wBAAA,SAAS,CAAC;AACR,4BAAA,IAAI,EAAE,4BAA4B;4BAClC,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,4BAAA,SAAS,EAAE,iCAAiC;AAC5C,4BAAA,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC;AAC5C,4BAAA,IAAI,EAAE,sBAAsB;4BAC5B,WAAW,EAAE,CAAC,6BAA6B,CAAC;yBAC7C,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -9,6 +9,10 @@ class Lwm2mClientService extends Service {
9
9
  super(client);
10
10
  this.listUrl = 'device';
11
11
  this.baseUrl = '/service/lwm2m-agent';
12
+ this.type = 'c8y_lwm2m';
13
+ }
14
+ isLwm2mDevice(mo) {
15
+ return (!!mo?.c8y_IsLwm2mDevice || mo?.c8y_DeviceTypes?.includes(this.type) || mo?.type === this.type);
12
16
  }
13
17
  detail(entityOrId, filter = {}) {
14
18
  return super.detail(entityOrId, filter);
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-protocol-lwm2m-shared.mjs","sources":["../../protocol-lwm2m/shared/lwm2m-client.service.ts","../../protocol-lwm2m/shared/shared-lwm2m.module.ts","../../protocol-lwm2m/shared/c8y-ngx-components-protocol-lwm2m-shared.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n FetchClient,\n IFetchOptions,\n IFetchResponse,\n IIdentified,\n IResult,\n Service\n} from '@c8y/client';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Lwm2mClientService<T extends IIdentified> extends Service<IIdentified> {\n protected listUrl: string = 'device';\n protected baseUrl: string = '/service/lwm2m-agent';\n\n constructor(client: FetchClient) {\n super(client);\n }\n\n detail(entityOrId: string | number | T, filter: object = {}): Promise<IResult<T | any>> {\n return super.detail(entityOrId, filter) as Promise<IResult<T | any>>;\n }\n\n update(entity: T): Promise<IResult<T | any>> {\n return super.update(entity) as Promise<IResult<T | any>>;\n }\n\n fetch(url: string, init?: IFetchOptions): Promise<IFetchResponse> {\n return super.fetch(url, init);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule, CoreModule } from '@c8y/ngx-components';\nimport { Lwm2mClientService } from './lwm2m-client.service';\n\n@NgModule({\n imports: [CommonModule, CoreModule],\n providers: [Lwm2mClientService]\n})\nexport class SharedLwm2mModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,MAAO,kBAA0C,SAAQ,OAAoB,CAAA;AAIjF,IAAA,WAAA,CAAY,MAAmB,EAAA;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;QAJN,IAAO,CAAA,OAAA,GAAW,QAAQ,CAAC;QAC3B,IAAO,CAAA,OAAA,GAAW,sBAAsB,CAAC;KAIlD;AAED,IAAA,MAAM,CAAC,UAA+B,EAAE,MAAA,GAAiB,EAAE,EAAA;QACzD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAA8B,CAAC;KACtE;AAED,IAAA,MAAM,CAAC,MAAS,EAAA;AACd,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAA8B,CAAC;KAC1D;IAED,KAAK,CAAC,GAAW,EAAE,IAAoB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;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-protocol-lwm2m-shared.mjs","sources":["../../protocol-lwm2m/shared/lwm2m-client.service.ts","../../protocol-lwm2m/shared/shared-lwm2m.module.ts","../../protocol-lwm2m/shared/c8y-ngx-components-protocol-lwm2m-shared.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n FetchClient,\n IFetchOptions,\n IFetchResponse,\n IIdentified,\n IResult,\n Service\n} from '@c8y/client';\nimport { Lwm2mManagedObject } from './lwm2m.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Lwm2mClientService<T extends IIdentified> extends Service<IIdentified> {\n protected listUrl = 'device';\n protected baseUrl = '/service/lwm2m-agent';\n private readonly type = 'c8y_lwm2m';\n\n constructor(client: FetchClient) {\n super(client);\n }\n\n isLwm2mDevice(mo: Lwm2mManagedObject) {\n return (\n !!mo?.c8y_IsLwm2mDevice || mo?.c8y_DeviceTypes?.includes(this.type) || mo?.type === this.type\n );\n }\n\n detail(entityOrId: string | number | T, filter: object = {}): Promise<IResult<T | any>> {\n return super.detail(entityOrId, filter) as Promise<IResult<T | any>>;\n }\n\n update(entity: T): Promise<IResult<T | any>> {\n return super.update(entity) as Promise<IResult<T | any>>;\n }\n\n fetch(url: string, init?: IFetchOptions): Promise<IFetchResponse> {\n return super.fetch(url, init);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule, CoreModule } from '@c8y/ngx-components';\nimport { Lwm2mClientService } from './lwm2m-client.service';\n\n@NgModule({\n imports: [CommonModule, CoreModule],\n providers: [Lwm2mClientService]\n})\nexport class SharedLwm2mModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAcM,MAAO,kBAA0C,SAAQ,OAAoB,CAAA;AAKjF,IAAA,WAAA,CAAY,MAAmB,EAAA;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;QALN,IAAO,CAAA,OAAA,GAAG,QAAQ,CAAC;QACn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A,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,OAAA,EAAA,CAHlB,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;AAGvB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,aAFjB,CAAC,kBAAkB,CAAC,EADrB,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAGvB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;oBACnC,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,37 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, NgModule, ViewChild } from '@angular/core';
3
- import * as i1 from '@c8y/ngx-components';
3
+ import * as i1$1 from '@c8y/ngx-components';
4
4
  import { gettext, CommonModule, CoreModule, hookRoute, ViewContext, NavigatorNode, hookNavigator } from '@c8y/ngx-components';
5
+ import * as i1 from '@c8y/client';
6
+ import { Lwm2mClientService, SharedLwm2mModule } from '@c8y/ngx-components/protocol-lwm2m/shared';
5
7
  import * as i4$1 from '@angular/forms';
6
8
  import { FormGroup } from '@angular/forms';
7
9
  import * as i4 from '@angular/router';
8
10
  import * as i2 from '@ngx-formly/core';
9
- import * as i1$1 from '@c8y/client';
10
- import { Lwm2mClientService, SharedLwm2mModule } from '@c8y/ngx-components/protocol-lwm2m/shared';
11
11
  import { gettext as gettext$1 } from '@c8y/client/src/gettext';
12
12
  import * as i3 from '@angular/common';
13
13
  import { PopoverModule } from 'ngx-bootstrap/popover';
14
14
 
15
- class Lwm2mBootstrapParametersGuard {
16
- constructor(tenantService, permissions) {
17
- this.tenantService = tenantService;
18
- this.permissions = permissions;
19
- }
20
- canActivate(route) {
21
- const contextData = route.data.contextData || route.parent.data.contextData;
22
- if (contextData?.type !== 'c8y_lwm2m') {
23
- return false;
24
- }
25
- return (this.tenantService.isMicroserviceSubscribedInCurrentTenant('lwm2m-agent') &&
26
- this.permissions.hasRole('ROLE_INVENTORY_READ'));
27
- }
28
- }
29
- Lwm2mBootstrapParametersGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard, deps: [{ token: i1.TenantUiService }, { token: i1.Permissions }], target: i0.ɵɵFactoryTarget.Injectable });
30
- Lwm2mBootstrapParametersGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard, decorators: [{
32
- type: Injectable
33
- }], ctorParameters: function () { return [{ type: i1.TenantUiService }, { type: i1.Permissions }]; } });
34
-
35
15
  class Lwm2mBootstrapParametersService extends Lwm2mClientService {
36
16
  constructor(client) {
37
17
  super(client);
@@ -50,14 +30,34 @@ class Lwm2mBootstrapParametersService extends Lwm2mClientService {
50
30
  return `${this.listUrl}/${super.getEntityId(entity)}/bootstrapParams`;
51
31
  }
52
32
  }
53
- Lwm2mBootstrapParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersService, deps: [{ token: i1$1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable });
33
+ Lwm2mBootstrapParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersService, deps: [{ token: i1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable });
54
34
  Lwm2mBootstrapParametersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersService, providedIn: 'root' });
55
35
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersService, decorators: [{
56
36
  type: Injectable,
57
37
  args: [{
58
38
  providedIn: 'root'
59
39
  }]
60
- }], ctorParameters: function () { return [{ type: i1$1.FetchClient }]; } });
40
+ }], ctorParameters: function () { return [{ type: i1.FetchClient }]; } });
41
+
42
+ class Lwm2mBootstrapParametersGuard {
43
+ constructor(tenantService, permissions, lwm2mService) {
44
+ this.tenantService = tenantService;
45
+ this.permissions = permissions;
46
+ this.lwm2mService = lwm2mService;
47
+ }
48
+ canActivate(route) {
49
+ const contextData = route.data.contextData ||
50
+ route.parent.data.contextData;
51
+ return (this.lwm2mService.isLwm2mDevice(contextData) &&
52
+ this.tenantService.isMicroserviceSubscribedInCurrentTenant('lwm2m-agent') &&
53
+ this.permissions.hasRole('ROLE_INVENTORY_READ'));
54
+ }
55
+ }
56
+ Lwm2mBootstrapParametersGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard, deps: [{ token: i1$1.TenantUiService }, { token: i1$1.Permissions }, { token: Lwm2mBootstrapParametersService }], target: i0.ɵɵFactoryTarget.Injectable });
57
+ Lwm2mBootstrapParametersGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersGuard, decorators: [{
59
+ type: Injectable
60
+ }], ctorParameters: function () { return [{ type: i1$1.TenantUiService }, { type: i1$1.Permissions }, { type: Lwm2mBootstrapParametersService }]; } });
61
61
 
62
62
  var SecurityMode;
63
63
  (function (SecurityMode) {
@@ -383,12 +383,12 @@ class Lwm2mBootstrapParametersComponent {
383
383
  }
384
384
  }
385
385
  }
386
- Lwm2mBootstrapParametersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersComponent, deps: [{ token: i1.AlertService }, { token: i1.Permissions }, { token: i2.FormlyFormBuilder }, { token: Lwm2mBootstrapParametersService }, { token: i4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
387
- Lwm2mBootstrapParametersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: Lwm2mBootstrapParametersComponent, selector: "c8y-lwm2m-bootstrap-parameters", ngImport: i0, template: "<form (ngSubmit)=\"save()\">\n <div class=\"card content-fullpage fit-h\">\n <div class=\"card-header separator grid__col--fullspan\">\n <h1 class=\"card-title\">{{ 'LWM2M bootstrap parameters' | translate }}</h1>\n </div>\n <div class=\"inner-scroll\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n ></formly-form>\n </div>\n <div\n [hidden]=\"options.formState.disabled\"\n class=\"card-footer separator grid__col--fullspan sticky-bottom\"\n >\n <button\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"form.invalid || !form.dirty\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormlyForm, selector: "formly-form", inputs: ["model", "fields", "options", "form"], outputs: ["modelChange"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] });
386
+ Lwm2mBootstrapParametersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersComponent, deps: [{ token: i1$1.AlertService }, { token: i1$1.Permissions }, { token: i2.FormlyFormBuilder }, { token: Lwm2mBootstrapParametersService }, { token: i4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
387
+ Lwm2mBootstrapParametersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: Lwm2mBootstrapParametersComponent, selector: "c8y-lwm2m-bootstrap-parameters", ngImport: i0, template: "<form (ngSubmit)=\"save()\">\n <div class=\"card content-fullpage fit-h\">\n <div class=\"card-header separator grid__col--fullspan\">\n <h1 class=\"card-title\">{{ 'LWM2M bootstrap parameters' | translate }}</h1>\n </div>\n <div class=\"inner-scroll\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n ></formly-form>\n </div>\n <div\n [hidden]=\"options.formState.disabled\"\n class=\"card-footer separator grid__col--fullspan sticky-bottom\"\n >\n <button\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"form.invalid || !form.dirty\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.FormlyForm, selector: "formly-form", inputs: ["model", "fields", "options", "form"], outputs: ["modelChange"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }] });
388
388
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Lwm2mBootstrapParametersComponent, decorators: [{
389
389
  type: Component,
390
390
  args: [{ selector: 'c8y-lwm2m-bootstrap-parameters', template: "<form (ngSubmit)=\"save()\">\n <div class=\"card content-fullpage fit-h\">\n <div class=\"card-header separator grid__col--fullspan\">\n <h1 class=\"card-title\">{{ 'LWM2M bootstrap parameters' | translate }}</h1>\n </div>\n <div class=\"inner-scroll\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n ></formly-form>\n </div>\n <div\n [hidden]=\"options.formState.disabled\"\n class=\"card-footer separator grid__col--fullspan sticky-bottom\"\n >\n <button\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"form.invalid || !form.dirty\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n</form>\n" }]
391
- }], ctorParameters: function () { return [{ type: i1.AlertService }, { type: i1.Permissions }, { type: i2.FormlyFormBuilder }, { type: Lwm2mBootstrapParametersService }, { type: i4.ActivatedRoute }]; } });
391
+ }], ctorParameters: function () { return [{ type: i1$1.AlertService }, { type: i1$1.Permissions }, { type: i2.FormlyFormBuilder }, { type: Lwm2mBootstrapParametersService }, { type: i4.ActivatedRoute }]; } });
392
392
 
393
393
  class Lwm2mBootstrapParametersModule {
394
394
  }
@@ -443,14 +443,14 @@ class LWM2MPostOperationsParametersService extends Lwm2mClientService {
443
443
  });
444
444
  }
445
445
  }
446
- LWM2MPostOperationsParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsParametersService, deps: [{ token: i1$1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable });
446
+ LWM2MPostOperationsParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsParametersService, deps: [{ token: i1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable });
447
447
  LWM2MPostOperationsParametersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsParametersService, providedIn: 'root' });
448
448
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsParametersService, decorators: [{
449
449
  type: Injectable,
450
450
  args: [{
451
451
  providedIn: 'root'
452
452
  }]
453
- }], ctorParameters: function () { return [{ type: i1$1.FetchClient }]; } });
453
+ }], ctorParameters: function () { return [{ type: i1.FetchClient }]; } });
454
454
 
455
455
  class LWM2MPostOperationsComponent {
456
456
  constructor(lwm2mPostOperationsSvc, alertService) {
@@ -518,12 +518,12 @@ class LWM2MPostOperationsComponent {
518
518
  }
519
519
  }
520
520
  }
521
- LWM2MPostOperationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsComponent, deps: [{ token: LWM2MPostOperationsParametersService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
522
- LWM2MPostOperationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: LWM2MPostOperationsComponent, selector: "lwm2m-post-operations", viewQueries: [{ propertyName: "commandsForm", first: true, predicate: ["commandsForm"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'LWM2M post-operations' | translate }}</c8y-title>\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [label]=\"'Device types' | translate\"\n [icon]=\"'c8y-device-protocols'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'LWM2M post-operations' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"card content-fullpage card--grid grid__col--7-5--md grid__row--auto-min-content\">\n <div class=\"inner-scroll bg-white\">\n <div class=\"card-header large-padding separator sticky-top\">\n <div class=\"h4 m-r-16\" id=\"commands\">\n {{ 'Commands' | translate }}\n </div>\n </div>\n <div class=\"card-block large-padding\">\n <form\n #commandsForm=\"ngForm\"\n id=\"commandsForm\"\n class=\"d-flex d-col flex-grow fit-h\"\n (ngSubmit)=\"save(operations)\"\n >\n <div class=\"form-group\">\n <textarea\n [(ngModel)]=\"operations.commands\"\n class=\"form-control\"\n aria-labelledby=\"commands\"\n name=\"commands\"\n rows=\"20\"\n ></textarea>\n </div>\n </form>\n </div>\n </div>\n\n <div class=\"inner-scroll bg-level-1\" tabindex=\"0\">\n <div class=\"card-block large-padding\">\n <p class=\"m-b-16\">\n <i class=\"text-info m-r-4 text-14\" c8yIcon=\"info-circle\"></i>\n {{\n 'You can enter a set of LWM2M shell commands. Each command will be sent to every newly registered LWM2M device. Each command must be entered in a new line. Use the following syntax for specifying post-registration actions:'\n | translate\n }}\n </p>\n <pre class=\"bg-level-0 text-pre-normal m-b-0\">\n <ul class=\"list-unstyled m-b-0\">\n <li class=\"m-16\" *ngFor=\"let c of exampleCommands\">\n <p class=\"text-muted\"># {{c.description | translate}}</p>\n <span class=\"text-danger\">{{c.command}}</span>\n <span class=\"text-muted\">{{c.resource}}</span>\n </li>\n </ul>\n </pre>\n </div>\n </div>\n\n <div class=\"card-footer large-padding separator grid__col--fullspan\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n form=\"commandsForm\"\n [disabled]=\"commandsForm.valid && !commandsForm.dirty\"\n [attr.aria-label]=\"'Save' | translate\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i1.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i1.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i1.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] });
521
+ LWM2MPostOperationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsComponent, deps: [{ token: LWM2MPostOperationsParametersService }, { token: i1$1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
522
+ LWM2MPostOperationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: LWM2MPostOperationsComponent, selector: "lwm2m-post-operations", viewQueries: [{ propertyName: "commandsForm", first: true, predicate: ["commandsForm"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'LWM2M post-operations' | translate }}</c8y-title>\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [label]=\"'Device types' | translate\"\n [icon]=\"'c8y-device-protocols'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'LWM2M post-operations' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"card content-fullpage card--grid grid__col--7-5--md grid__row--auto-min-content\">\n <div class=\"inner-scroll bg-white\">\n <div class=\"card-header large-padding separator sticky-top\">\n <div class=\"h4 m-r-16\" id=\"commands\">\n {{ 'Commands' | translate }}\n </div>\n </div>\n <div class=\"card-block large-padding\">\n <form\n #commandsForm=\"ngForm\"\n id=\"commandsForm\"\n class=\"d-flex d-col flex-grow fit-h\"\n (ngSubmit)=\"save(operations)\"\n >\n <div class=\"form-group\">\n <textarea\n [(ngModel)]=\"operations.commands\"\n class=\"form-control\"\n aria-labelledby=\"commands\"\n name=\"commands\"\n rows=\"20\"\n ></textarea>\n </div>\n </form>\n </div>\n </div>\n\n <div class=\"inner-scroll bg-level-1\" tabindex=\"0\">\n <div class=\"card-block large-padding\">\n <p class=\"m-b-16\">\n <i class=\"text-info m-r-4 text-14\" c8yIcon=\"info-circle\"></i>\n {{\n 'You can enter a set of LWM2M shell commands. Each command will be sent to every newly registered LWM2M device. Each command must be entered in a new line. Use the following syntax for specifying post-registration actions:'\n | translate\n }}\n </p>\n <pre class=\"bg-level-0 text-pre-normal m-b-0\">\n <ul class=\"list-unstyled m-b-0\">\n <li class=\"m-16\" *ngFor=\"let c of exampleCommands\">\n <p class=\"text-muted\"># {{c.description | translate}}</p>\n <span class=\"text-danger\">{{c.command}}</span>\n <span class=\"text-muted\">{{c.resource}}</span>\n </li>\n </ul>\n </pre>\n </div>\n </div>\n\n <div class=\"card-footer large-padding separator grid__col--fullspan\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n form=\"commandsForm\"\n [disabled]=\"commandsForm.valid && !commandsForm.dirty\"\n [attr.aria-label]=\"'Save' | translate\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i1$1.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i1$1.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i1$1.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }] });
523
523
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsComponent, decorators: [{
524
524
  type: Component,
525
525
  args: [{ selector: 'lwm2m-post-operations', template: "<c8y-title>{{ 'LWM2M post-operations' | translate }}</c8y-title>\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [label]=\"'Device types' | translate\"\n [icon]=\"'c8y-device-protocols'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'LWM2M post-operations' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"card content-fullpage card--grid grid__col--7-5--md grid__row--auto-min-content\">\n <div class=\"inner-scroll bg-white\">\n <div class=\"card-header large-padding separator sticky-top\">\n <div class=\"h4 m-r-16\" id=\"commands\">\n {{ 'Commands' | translate }}\n </div>\n </div>\n <div class=\"card-block large-padding\">\n <form\n #commandsForm=\"ngForm\"\n id=\"commandsForm\"\n class=\"d-flex d-col flex-grow fit-h\"\n (ngSubmit)=\"save(operations)\"\n >\n <div class=\"form-group\">\n <textarea\n [(ngModel)]=\"operations.commands\"\n class=\"form-control\"\n aria-labelledby=\"commands\"\n name=\"commands\"\n rows=\"20\"\n ></textarea>\n </div>\n </form>\n </div>\n </div>\n\n <div class=\"inner-scroll bg-level-1\" tabindex=\"0\">\n <div class=\"card-block large-padding\">\n <p class=\"m-b-16\">\n <i class=\"text-info m-r-4 text-14\" c8yIcon=\"info-circle\"></i>\n {{\n 'You can enter a set of LWM2M shell commands. Each command will be sent to every newly registered LWM2M device. Each command must be entered in a new line. Use the following syntax for specifying post-registration actions:'\n | translate\n }}\n </p>\n <pre class=\"bg-level-0 text-pre-normal m-b-0\">\n <ul class=\"list-unstyled m-b-0\">\n <li class=\"m-16\" *ngFor=\"let c of exampleCommands\">\n <p class=\"text-muted\"># {{c.description | translate}}</p>\n <span class=\"text-danger\">{{c.command}}</span>\n <span class=\"text-muted\">{{c.resource}}</span>\n </li>\n </ul>\n </pre>\n </div>\n </div>\n\n <div class=\"card-footer large-padding separator grid__col--fullspan\">\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n form=\"commandsForm\"\n [disabled]=\"commandsForm.valid && !commandsForm.dirty\"\n [attr.aria-label]=\"'Save' | translate\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</div>\n" }]
526
- }], ctorParameters: function () { return [{ type: LWM2MPostOperationsParametersService }, { type: i1.AlertService }]; }, propDecorators: { commandsForm: [{
526
+ }], ctorParameters: function () { return [{ type: LWM2MPostOperationsParametersService }, { type: i1$1.AlertService }]; }, propDecorators: { commandsForm: [{
527
527
  type: ViewChild,
528
528
  args: ['commandsForm']
529
529
  }] } });
@@ -536,11 +536,11 @@ class LWM2MPostOperationsGuard {
536
536
  return this.tenantService.isMicroserviceSubscribedInCurrentTenant('lwm2m-agent');
537
537
  }
538
538
  }
539
- LWM2MPostOperationsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsGuard, deps: [{ token: i1.TenantUiService }], target: i0.ɵɵFactoryTarget.Injectable });
539
+ LWM2MPostOperationsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsGuard, deps: [{ token: i1$1.TenantUiService }], target: i0.ɵɵFactoryTarget.Injectable });
540
540
  LWM2MPostOperationsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsGuard });
541
541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: LWM2MPostOperationsGuard, decorators: [{
542
542
  type: Injectable
543
- }], ctorParameters: function () { return [{ type: i1.TenantUiService }]; } });
543
+ }], ctorParameters: function () { return [{ type: i1$1.TenantUiService }]; } });
544
544
 
545
545
  class LWM2MPostOpertaionsNavigationFactory {
546
546
  constructor(guard) {