Added image field for device profile and description field for widget bundle
This commit is contained in:
parent
a50282f1ea
commit
6702aabc31
@ -25,6 +25,8 @@ import org.thingsboard.server.gen.edge.v1.DeviceProfileUpdateMsg;
|
|||||||
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
|
import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
|
||||||
import org.thingsboard.server.queue.util.TbCoreComponent;
|
import org.thingsboard.server.queue.util.TbCoreComponent;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@TbCoreComponent
|
@TbCoreComponent
|
||||||
public class DeviceProfileMsgConstructor {
|
public class DeviceProfileMsgConstructor {
|
||||||
@ -61,6 +63,9 @@ public class DeviceProfileMsgConstructor {
|
|||||||
if (deviceProfile.getProvisionDeviceKey() != null) {
|
if (deviceProfile.getProvisionDeviceKey() != null) {
|
||||||
builder.setProvisionDeviceKey(deviceProfile.getProvisionDeviceKey());
|
builder.setProvisionDeviceKey(deviceProfile.getProvisionDeviceKey());
|
||||||
}
|
}
|
||||||
|
if (deviceProfile.getImage() != null) {
|
||||||
|
builder.setImage(ByteString.copyFrom(deviceProfile.getImage().getBytes(StandardCharsets.UTF_8)));
|
||||||
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,9 @@ public class WidgetsBundleMsgConstructor {
|
|||||||
if (widgetsBundle.getImage() != null) {
|
if (widgetsBundle.getImage() != null) {
|
||||||
builder.setImage(ByteString.copyFrom(widgetsBundle.getImage().getBytes(StandardCharsets.UTF_8)));
|
builder.setImage(ByteString.copyFrom(widgetsBundle.getImage().getBytes(StandardCharsets.UTF_8)));
|
||||||
}
|
}
|
||||||
|
if (widgetsBundle.getDescription() != null) {
|
||||||
|
builder.setDescription(widgetsBundle.getDescription());
|
||||||
|
}
|
||||||
if (widgetsBundle.getTenantId().equals(TenantId.SYS_TENANT_ID)) {
|
if (widgetsBundle.getTenantId().equals(TenantId.SYS_TENANT_ID)) {
|
||||||
builder.setIsSystem(true);
|
builder.setIsSystem(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,6 +210,7 @@ message DeviceProfileUpdateMsg {
|
|||||||
string defaultQueueName = 12;
|
string defaultQueueName = 12;
|
||||||
bytes profileDataBytes = 13;
|
bytes profileDataBytes = 13;
|
||||||
string provisionDeviceKey = 14;
|
string provisionDeviceKey = 14;
|
||||||
|
bytes image = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeviceCredentialsUpdateMsg {
|
message DeviceCredentialsUpdateMsg {
|
||||||
@ -312,6 +313,7 @@ message WidgetsBundleUpdateMsg {
|
|||||||
string alias = 5;
|
string alias = 5;
|
||||||
bytes image = 6;
|
bytes image = 6;
|
||||||
bool isSystem = 7;
|
bool isSystem = 7;
|
||||||
|
string description = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WidgetTypeUpdateMsg {
|
message WidgetTypeUpdateMsg {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user