Add overwriteActivityTime checkbox to device wizard. Update rule node ui.

This commit is contained in:
Igor Kulikov 2021-01-22 18:33:51 +02:00
parent 90334db157
commit 4e3a7ed897
4 changed files with 13 additions and 5 deletions

View File

@ -108,9 +108,15 @@
</tb-queue-type-list> </tb-queue-type-list>
</div> </div>
</div> </div>
<mat-checkbox formControlName="gateway" style="padding-bottom: 16px;"> <div fxLayout="row" fxLayoutGap="16px" style="padding-bottom: 16px;">
<mat-checkbox formControlName="gateway">
{{ 'device.is-gateway' | translate }} {{ 'device.is-gateway' | translate }}
</mat-checkbox> </mat-checkbox>
<mat-checkbox *ngIf="deviceWizardFormGroup.get('gateway').value"
formControlName="overwriteActivityTime">
{{ 'device.overwrite-activity-time' | translate }}
</mat-checkbox>
</div>
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>device.description</mat-label> <mat-label translate>device.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>

View File

@ -108,6 +108,7 @@ export class DeviceWizardDialogComponent extends
name: ['', Validators.required], name: ['', Validators.required],
label: [''], label: [''],
gateway: [false], gateway: [false],
overwriteActivityTime: [false],
transportType: [DeviceTransportType.DEFAULT, Validators.required], transportType: [DeviceTransportType.DEFAULT, Validators.required],
addProfileType: [0], addProfileType: [0],
deviceProfileId: [null, Validators.required], deviceProfileId: [null, Validators.required],
@ -314,6 +315,7 @@ export class DeviceWizardDialogComponent extends
deviceProfileId: profileId, deviceProfileId: profileId,
additionalInfo: { additionalInfo: {
gateway: this.deviceWizardFormGroup.get('gateway').value, gateway: this.deviceWizardFormGroup.get('gateway').value,
overwriteActivityTime: this.deviceWizardFormGroup.get('overwriteActivityTime').value,
description: this.deviceWizardFormGroup.get('description').value description: this.deviceWizardFormGroup.get('description').value
}, },
customerId: null customerId: null