Browse Source

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

pull/3985/head
Igor Kulikov 5 years ago
parent
commit
4e3a7ed897
  1. 2
      rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js
  2. 12
      ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html
  3. 2
      ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/device/device.component.ts

2
rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js

File diff suppressed because one or more lines are too long

12
ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.html

@ -108,9 +108,15 @@
</tb-queue-type-list>
</div>
</div>
<mat-checkbox formControlName="gateway" style="padding-bottom: 16px;">
{{ 'device.is-gateway' | translate }}
</mat-checkbox>
<div fxLayout="row" fxLayoutGap="16px" style="padding-bottom: 16px;">
<mat-checkbox formControlName="gateway">
{{ 'device.is-gateway' | translate }}
</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-label translate>device.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>

2
ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts

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

2
ui-ngx/src/app/modules/home/pages/device/device.component.ts

@ -84,7 +84,7 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> {
additionalInfo: this.fb.group(
{
gateway: [entity && entity.additionalInfo ? entity.additionalInfo.gateway : false],
overwriteActivityTime: [entity && entity.additionalInfo ? entity.additionalInfo.overwriteActivityTime: false],
overwriteActivityTime: [entity && entity.additionalInfo ? entity.additionalInfo.overwriteActivityTime : false],
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''],
}
)

Loading…
Cancel
Save