Browse Source

fix typos

pull/5441/head
ShvaykaD 5 years ago
parent
commit
0f71d0d8fc
  1. 12
      common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java
  2. 1
      common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java
  3. 30
      ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts

12
common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java

@ -40,7 +40,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToPostTelemetry(ctx, inbound);
} catch (AdaptorException e) {
log.trace("failed to process post telemetry request msg {} due to: ", inbound, e);
log.trace("failed to process post telemetry request msg: {} due to: ", inbound, e);
return jsonAdaptor.convertToPostTelemetry(ctx, inbound);
}
}
@ -50,7 +50,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToPostAttributes(ctx, inbound);
} catch (AdaptorException e) {
log.trace("failed to process post attributes request msg {} due to: ", inbound, e);
log.trace("failed to process post attributes request msg: {} due to: ", inbound, e);
return jsonAdaptor.convertToPostAttributes(ctx, inbound);
}
}
@ -60,7 +60,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToGetAttributes(ctx, inbound, topicBase);
} catch (AdaptorException e) {
log.trace("failed to process get attributes request msg {} due to: ", inbound, e);
log.trace("failed to process get attributes request msg: {} due to: ", inbound, e);
return jsonAdaptor.convertToGetAttributes(ctx, inbound, topicBase);
}
}
@ -70,7 +70,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToDeviceRpcResponse(ctx, mqttMsg, topicBase);
} catch (AdaptorException e) {
log.trace("failed to process to device rpc response msg {} due to: ", mqttMsg, e);
log.trace("failed to process to device rpc response msg: {} due to: ", mqttMsg, e);
return jsonAdaptor.convertToDeviceRpcResponse(ctx, mqttMsg, topicBase);
}
}
@ -80,7 +80,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToServerRpcRequest(ctx, mqttMsg, topicBase);
} catch (AdaptorException e) {
log.trace("failed to process to server rpc request msg {} due to: ", mqttMsg, e);
log.trace("failed to process to server rpc request msg: {} due to: ", mqttMsg, e);
return jsonAdaptor.convertToServerRpcRequest(ctx, mqttMsg, topicBase);
}
}
@ -90,7 +90,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor {
try {
return protoAdaptor.convertToClaimDevice(ctx, inbound);
} catch (AdaptorException e) {
log.trace("failed to process claim device request msg {} due to: ", inbound, e);
log.trace("failed to process claim device request msg: {} due to: ", inbound, e);
return jsonAdaptor.convertToClaimDevice(ctx, inbound);
}
}

1
common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java

@ -85,7 +85,6 @@ public class DeviceSessionCtx extends MqttDeviceAwareSessionContext {
private volatile boolean jsonPayloadFormatCompatibilityEnabled;
private volatile boolean useJsonPayloadFormatForDefaultDownlinkTopics;
@Getter
@Setter
private TransportPayloadType provisionPayloadType = payloadType;

30
ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts

@ -162,36 +162,6 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
this.propagateChange(configuration);
}
private updateTest(type: TransportPayloadType, forceUpdated = false) {
const transportPayloadTypeForm = this.mqttDeviceProfileTransportConfigurationFormGroup
.get('transportPayloadTypeConfiguration') as FormGroup;
if (forceUpdated) {
transportPayloadTypeForm.patchValue({
deviceTelemetryProtoSchema: defaultTelemetrySchema,
deviceAttributesProtoSchema: defaultAttributesSchema,
deviceRpcRequestProtoSchema: defaultRpcRequestSchema,
deviceRpcResponseProtoSchema: defaultRpcResponseSchema,
enableCompatibilityWithJsonPayloadFormat: false,
useJsonPayloadFormatForDefaultDownlinkTopics: false
}, {emitEvent: false});
}
if (type === TransportPayloadType.PROTOBUF && !this.disabled) {
transportPayloadTypeForm.get('deviceTelemetryProtoSchema').enable({emitEvent: false});
transportPayloadTypeForm.get('deviceAttributesProtoSchema').enable({emitEvent: false});
transportPayloadTypeForm.get('deviceRpcRequestProtoSchema').enable({emitEvent: false});
transportPayloadTypeForm.get('deviceRpcResponseProtoSchema').enable({emitEvent: false});
transportPayloadTypeForm.get('enableCompatibilityWithJsonPayloadFormat').enable({emitEvent: false});
transportPayloadTypeForm.get('useJsonPayloadFormatForDefaultDownlinkTopics').enable({emitEvent: false});
} else {
transportPayloadTypeForm.get('deviceTelemetryProtoSchema').disable({emitEvent: false});
transportPayloadTypeForm.get('deviceAttributesProtoSchema').disable({emitEvent: false});
transportPayloadTypeForm.get('deviceRpcRequestProtoSchema').disable({emitEvent: false});
transportPayloadTypeForm.get('deviceRpcResponseProtoSchema').disable({emitEvent: false});
transportPayloadTypeForm.get('enableCompatibilityWithJsonPayloadFormat').disable({emitEvent: false});
transportPayloadTypeForm.get('useJsonPayloadFormatForDefaultDownlinkTopics').disable({emitEvent: false});
}
}
private updateTransportPayloadBasedControls(type: TransportPayloadType, forceUpdated = false) {
const transportPayloadTypeForm = this.mqttDeviceProfileTransportConfigurationFormGroup
.get('transportPayloadTypeConfiguration') as FormGroup;

Loading…
Cancel
Save