diff --git a/ui-ngx/src/app/modules/home/components/profile/device/device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/device-profile-transport-configuration.component.ts
index 7d1ab27ebd..998235aefd 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/device-profile-transport-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/device-profile-transport-configuration.component.ts
@@ -23,12 +23,10 @@ import {
UntypedFormControl,
UntypedFormGroup,
ValidationErrors,
- Validator,
- Validators
+ Validator
} from '@angular/forms';
import { Store } from '@ngrx/store';
import { AppState } from '@app/core/core.state';
-import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { DeviceProfileTransportConfiguration, DeviceTransportType } from '@shared/models/device.models';
import { deepClone } from '@core/utils';
@@ -55,15 +53,6 @@ export class DeviceProfileTransportConfigurationComponent implements ControlValu
deviceProfileTransportConfigurationFormGroup: UntypedFormGroup;
- private requiredValue: boolean;
- get required(): boolean {
- return this.requiredValue;
- }
- @Input()
- set required(value: boolean) {
- this.requiredValue = coerceBooleanProperty(value);
- }
-
@Input()
disabled: boolean;
@@ -87,7 +76,7 @@ export class DeviceProfileTransportConfigurationComponent implements ControlValu
ngOnInit() {
this.deviceProfileTransportConfigurationFormGroup = this.fb.group({
- configuration: [null, Validators.required]
+ configuration: [null]
});
this.deviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => {
this.updateModel();
@@ -110,7 +99,7 @@ export class DeviceProfileTransportConfigurationComponent implements ControlValu
delete configuration.type;
}
setTimeout(() => {
- this.deviceProfileTransportConfigurationFormGroup.patchValue({configuration}, {emitEvent: false});
+ this.deviceProfileTransportConfigurationFormGroup.patchValue({configuration});
}, 0);
}
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
index a6f6e3a467..0bda4c08c2 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts
@@ -25,7 +25,6 @@ import {
Validator,
Validators
} from '@angular/forms';
-import { coerceBooleanProperty } from '@angular/cdk/coercion';
import {
ATTRIBUTE,
DEFAULT_EDRX_CYCLE,
@@ -47,7 +46,7 @@ import {
ObjectIDVerTranslationMap
} from './lwm2m-profile-config.models';
import { DeviceProfileService } from '@core/http/device-profile.service';
-import { deepClone, isDefinedAndNotNull, isEmpty, isUndefined } from '@core/utils';
+import { deepClone, isDefinedAndNotNull, isEmpty } from '@core/utils';
import { Direction } from '@shared/models/page/sort-order';
import _ from 'lodash';
import { Subject } from 'rxjs';
@@ -77,7 +76,6 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
public disabled = false;
public isTransportWasRunWithBootstrap = true;
public isBootstrapServerUpdateEnable: boolean;
- private requiredValue: boolean;
private destroy$ = new Subject
();
lwm2mDeviceProfileFormGroup: UntypedFormGroup;
@@ -88,15 +86,6 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
sortFunction: (key: string, value: object) => object;
- get required(): boolean {
- return this.requiredValue;
- }
-
- @Input()
- set required(value: boolean) {
- this.requiredValue = coerceBooleanProperty(value);
- }
-
@Input()
isAdd: boolean;
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts
index 1566904258..3cabb2a541 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts
@@ -29,7 +29,6 @@ import {
} from '@angular/forms';
import { Store } from '@ngrx/store';
import { AppState } from '@app/core/core.state';
-import { coerceBooleanProperty } from '@angular/cdk/coercion';
import {
defaultAttributesSchema,
defaultRpcRequestSchema,
@@ -70,16 +69,6 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
mqttDeviceProfileTransportConfigurationFormGroup: UntypedFormGroup;
private destroy$ = new Subject();
- private requiredValue: boolean;
-
- get required(): boolean {
- return this.requiredValue;
- }
-
- @Input()
- set required(value: boolean) {
- this.requiredValue = coerceBooleanProperty(value);
- }
@Input()
disabled: boolean;
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-transport-configuration.component.ts
index f81422943a..202fdca49b 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-transport-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/snmp/snmp-device-profile-transport-configuration.component.ts
@@ -25,7 +25,6 @@ import {
Validator,
Validators
} from '@angular/forms';
-import { coerceBooleanProperty } from '@angular/cdk/coercion';
import {
DeviceTransportType,
SnmpDeviceProfileTransportConfiguration
@@ -63,16 +62,6 @@ export class SnmpDeviceProfileTransportConfigurationComponent implements OnInit,
snmpDeviceProfileTransportConfigurationFormGroup: UntypedFormGroup;
private destroy$ = new Subject();
- private requiredValue: boolean;
-
- get required(): boolean {
- return this.requiredValue;
- }
-
- @Input()
- set required(value: boolean) {
- this.requiredValue = coerceBooleanProperty(value);
- }
@Input()
disabled: boolean;
diff --git a/ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html b/ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html
index fc71dbedcb..aa928687ad 100644
--- a/ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html
+++ b/ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html
@@ -35,8 +35,7 @@
+ [isAdd]="isTransportTypeChanged">
@@ -65,8 +64,7 @@