UI: LwM2M device profile add new setting compositeOperationsSupport

This commit is contained in:
Vladyslav_Prykhodko 2021-06-30 12:06:30 +03:00 committed by Andrew Shvayka
parent eb9b0f8433
commit a0c504ade6
5 changed files with 15 additions and 4 deletions

View File

@ -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>-->

View File

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

View File

@ -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});

View File

@ -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
}; };
} }

View File

@ -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",