Browse Source

Merge pull request #13258 from thingsboard/fix_bug_update_ota_object19

lwm2m_fix_bug_object19_For_Ota
pull/13152/merge
Andrew Shvayka 1 year ago
committed by GitHub
parent
commit
f99aef4d3c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      application/src/test/java/org/thingsboard/server/transport/lwm2m/ota/AbstractOtaLwM2MIntegrationTest.java
  2. 2
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html
  3. 4
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
  4. 2
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-config.models.ts

2
application/src/test/java/org/thingsboard/server/transport/lwm2m/ota/AbstractOtaLwM2MIntegrationTest.java

@ -120,7 +120,7 @@ public abstract class AbstractOtaLwM2MIntegrationTest extends AbstractLwM2MInteg
public static final String CLIENT_LWM2M_SETTINGS_19 =
" {\n" +
" \"useObject19ForOta\": true,\n" +
" \"useObject19ForOtaInfo\": true,\n" +
" \"edrxCycle\": null,\n" +
" \"powerMode\": \"DRX\",\n" +
" \"fwUpdateResource\": null,\n" +

2
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html

@ -53,7 +53,7 @@
<section formGroupName="clientLwM2mSettings">
<fieldset class="fields-group">
<legend class="group-title" translate>device-profile.lwm2m.ota-update</legend>
<mat-checkbox formControlName="useObject19ForOta">
<mat-checkbox formControlName="useObject19ForOtaInfo">
<span tb-hint-tooltip-icon="{{ 'device-profile.lwm2m.use-object-19-for-ota-update-hint' | translate }}">
{{ 'device-profile.lwm2m.use-object-19-for-ota-update' | translate }}
</span>

4
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts

@ -104,7 +104,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
bootstrap: [[]],
clientLwM2mSettings: this.fb.group({
clientOnlyObserveAfterConnect: [1, []],
useObject19ForOta: [false],
useObject19ForOtaInfo: [false],
fwUpdateStrategy: [1, []],
swUpdateStrategy: [1, []],
fwUpdateResource: [{value: '', disabled: true}, []],
@ -263,7 +263,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
bootstrapServerUpdateEnable: this.configurationValue.bootstrapServerUpdateEnable || false,
clientLwM2mSettings: {
clientOnlyObserveAfterConnect: this.configurationValue.clientLwM2mSettings.clientOnlyObserveAfterConnect,
useObject19ForOta: this.configurationValue.clientLwM2mSettings.useObject19ForOta ?? false,
useObject19ForOtaInfo: this.configurationValue.clientLwM2mSettings.useObject19ForOtaInfo ?? false,
fwUpdateStrategy: this.configurationValue.clientLwM2mSettings.fwUpdateStrategy || 1,
swUpdateStrategy: this.configurationValue.clientLwM2mSettings.swUpdateStrategy || 1,
fwUpdateResource: this.configurationValue.clientLwM2mSettings.fwUpdateResource || '',

2
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-config.models.ts

@ -169,7 +169,7 @@ export interface Lwm2mProfileConfigModels {
export interface ClientLwM2mSettings {
clientOnlyObserveAfterConnect: number;
useObject19ForOta?: boolean;
useObject19ForOtaInfo?: boolean;
fwUpdateStrategy: number;
swUpdateStrategy: number;
fwUpdateResource?: string;

Loading…
Cancel
Save