|
|
@ -25,6 +25,7 @@ import { |
|
|
createDeviceProfileConfiguration, |
|
|
createDeviceProfileConfiguration, |
|
|
createDeviceProfileTransportConfiguration, |
|
|
createDeviceProfileTransportConfiguration, |
|
|
DeviceProfile, |
|
|
DeviceProfile, |
|
|
|
|
|
DeviceProfileInfo, |
|
|
DeviceProfileType, |
|
|
DeviceProfileType, |
|
|
DeviceProvisionConfiguration, |
|
|
DeviceProvisionConfiguration, |
|
|
DeviceProvisionType, |
|
|
DeviceProvisionType, |
|
|
@ -91,6 +92,7 @@ export class DeviceWizardDialogComponent extends |
|
|
serviceType = ServiceType.TB_RULE_ENGINE; |
|
|
serviceType = ServiceType.TB_RULE_ENGINE; |
|
|
|
|
|
|
|
|
private subscriptions: Subscription[] = []; |
|
|
private subscriptions: Subscription[] = []; |
|
|
|
|
|
private currentDeviceProfileTransportType = DeviceTransportType.DEFAULT; |
|
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
constructor(protected store: Store<AppState>, |
|
|
protected router: Router, |
|
|
protected router: Router, |
|
|
@ -265,6 +267,20 @@ export class DeviceWizardDialogComponent extends |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
get deviceTransportType(): DeviceTransportType { |
|
|
|
|
|
if (this.deviceWizardFormGroup.get('addProfileType').value) { |
|
|
|
|
|
return this.transportConfigFormGroup.get('transportType').value; |
|
|
|
|
|
} else { |
|
|
|
|
|
return this.currentDeviceProfileTransportType; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
deviceProfileChanged(deviceProfile: DeviceProfileInfo) { |
|
|
|
|
|
if (deviceProfile) { |
|
|
|
|
|
this.currentDeviceProfileTransportType = deviceProfile.transportType; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private createDeviceProfile(): Observable<EntityId> { |
|
|
private createDeviceProfile(): Observable<EntityId> { |
|
|
if (this.deviceWizardFormGroup.get('addProfileType').value) { |
|
|
if (this.deviceWizardFormGroup.get('addProfileType').value) { |
|
|
const deviceProvisionConfiguration: DeviceProvisionConfiguration = this.provisionConfigFormGroup.get('provisionConfiguration').value; |
|
|
const deviceProvisionConfiguration: DeviceProvisionConfiguration = this.provisionConfigFormGroup.get('provisionConfiguration').value; |
|
|
|