Browse Source

UI: LwM2M device profile add new setting compositeOperationsSupport

pull/4840/head
Vladyslav_Prykhodko 5 years ago
committed by Andrew Shvayka
parent
commit
a0c504ade6
  1. 2
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html
  2. 4
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.scss
  3. 6
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
  4. 4
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-config.models.ts
  5. 3
      ui-ngx/src/assets/locale/locale.constant-en_US.json

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

@ -168,6 +168,8 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</fieldset> </fieldset>
<mat-slide-toggle class="mat-slider"
formControlName="compositeOperationsSupport">{{ 'device-profile.lwm2m.composite-operations-support' | translate }}</mat-slide-toggle>
<!-- <mat-accordion multi="true">--> <!-- <mat-accordion multi="true">-->
<!-- <div *ngIf="false">--> <!-- <div *ngIf="false">-->
<!-- <mat-expansion-panel>--> <!-- <mat-expansion-panel>-->

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

@ -24,4 +24,8 @@
color: rgba(0, 0, 0, .7); color: rgba(0, 0, 0, .7);
} }
} }
.mat-slider {
margin: 8px 0 8px 10px;
}
} }

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

@ -117,7 +117,8 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
swUpdateStrategy: [1, []], swUpdateStrategy: [1, []],
fwUpdateResource: [{value: '', disabled: true}, []], fwUpdateResource: [{value: '', disabled: true}, []],
swUpdateResource: [{value: '', disabled: true}, []], swUpdateResource: [{value: '', disabled: true}, []],
powerMode: [null, Validators.required] powerMode: [PowerMode.DRX, Validators.required],
compositeOperationsSupport: [false]
}) })
}); });
this.lwm2mDeviceConfigFormGroup = this.fb.group({ this.lwm2mDeviceConfigFormGroup = this.fb.group({
@ -258,7 +259,8 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
swUpdateStrategy: this.configurationValue.clientLwM2mSettings.swUpdateStrategy || 1, swUpdateStrategy: this.configurationValue.clientLwM2mSettings.swUpdateStrategy || 1,
fwUpdateResource: fwResource, fwUpdateResource: fwResource,
swUpdateResource: swResource, swUpdateResource: swResource,
powerMode: this.configurationValue.clientLwM2mSettings.powerMode powerMode: this.configurationValue.clientLwM2mSettings.powerMode || PowerMode.DRX,
compositeOperationsSupport: this.configurationValue.clientLwM2mSettings.compositeOperationsSupport || false
} }
}, },
{emitEvent: false}); {emitEvent: false});

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

@ -175,6 +175,7 @@ export interface ClientLwM2mSettings {
fwUpdateResource: string; fwUpdateResource: string;
swUpdateResource: string; swUpdateResource: string;
powerMode: PowerMode; powerMode: PowerMode;
compositeOperationsSupport: boolean;
} }
export interface ObservableAttributes { export interface ObservableAttributes {
@ -231,7 +232,8 @@ export function getDefaultProfileClientLwM2mSettingsConfig(): ClientLwM2mSetting
swUpdateStrategy: 1, swUpdateStrategy: 1,
fwUpdateResource: DEFAULT_FW_UPDATE_RESOURCE, fwUpdateResource: DEFAULT_FW_UPDATE_RESOURCE,
swUpdateResource: DEFAULT_SW_UPDATE_RESOURCE, swUpdateResource: DEFAULT_SW_UPDATE_RESOURCE,
powerMode: PowerMode.DRX powerMode: PowerMode.DRX,
compositeOperationsSupport: false
}; };
} }

3
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -1328,7 +1328,8 @@
"step": "Step", "step": "Step",
"min-evaluation-period": "Minimum evaluation period", "min-evaluation-period": "Minimum evaluation period",
"max-evaluation-period": "Maximum evaluation period" "max-evaluation-period": "Maximum evaluation period"
} },
"composite-operations-support": "Supports composite Read/Write/Observe operations"
}, },
"snmp": { "snmp": {
"add-communication-config": "Add communication config", "add-communication-config": "Add communication config",

Loading…
Cancel
Save