|
|
|
@ -38,7 +38,6 @@ import org.springframework.web.bind.annotation.ResponseStatus; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.context.request.async.DeferredResult; |
|
|
|
import org.thingsboard.rule.engine.api.msg.DeviceCredentialsUpdateNotificationMsg; |
|
|
|
import org.thingsboard.rule.engine.api.msg.DeviceEdgeUpdateMsg; |
|
|
|
import org.thingsboard.server.common.data.ClaimRequest; |
|
|
|
import org.thingsboard.server.common.data.Customer; |
|
|
|
import org.thingsboard.server.common.data.DataConstants; |
|
|
|
@ -875,9 +874,6 @@ public class DeviceController extends BaseController { |
|
|
|
|
|
|
|
Device savedDevice = checkNotNull(deviceService.assignDeviceToEdge(getCurrentUser().getTenantId(), deviceId, edgeId)); |
|
|
|
|
|
|
|
tbClusterService.pushMsgToCore(new DeviceEdgeUpdateMsg(savedDevice.getTenantId(), |
|
|
|
savedDevice.getId(), edgeId), null); |
|
|
|
|
|
|
|
logEntityAction(deviceId, savedDevice, |
|
|
|
savedDevice.getCustomerId(), |
|
|
|
ActionType.ASSIGNED_TO_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
|
@ -918,9 +914,6 @@ public class DeviceController extends BaseController { |
|
|
|
|
|
|
|
Device savedDevice = checkNotNull(deviceService.unassignDeviceFromEdge(getCurrentUser().getTenantId(), deviceId, edgeId)); |
|
|
|
|
|
|
|
tbClusterService.pushMsgToCore(new DeviceEdgeUpdateMsg(savedDevice.getTenantId(), |
|
|
|
savedDevice.getId(), null), null); |
|
|
|
|
|
|
|
logEntityAction(deviceId, device, |
|
|
|
device.getCustomerId(), |
|
|
|
ActionType.UNASSIGNED_FROM_EDGE, null, strDeviceId, strEdgeId, edge.getName()); |
|
|
|
|