Browse Source
getConnectivityInfo assembled each transport as an ObjectNode with string keys that settings.models.ts had to mirror. It now builds a ResolvedDeviceConnectivityInfo record (enabled, host, port, hostSource), so the response shape is in one place. DeviceConnectivityInfo stays the model of the stored settings. getConnectivityInfo(String baseUrl) is back as a default overload that delegates with hostSource REQUEST, so existing callers keep compiling. Tests: the response has exactly the fields the UI reads, and the overload reports REQUEST.feature/lts-4.2/iot-hub-devices
4 changed files with 49 additions and 9 deletions
@ -0,0 +1,11 @@ |
|||
// SPDX-FileCopyrightText: Copyright The Thingsboard Authors
|
|||
// SPDX-License-Identifier: Apache-2.0
|
|||
package org.thingsboard.server.dao.device; |
|||
|
|||
/** |
|||
* Host and port of an enabled transport as returned by {@link DeviceConnectivityService#getConnectivityInfo}, |
|||
* with the source of the host. Kept apart from {@link DeviceConnectivityInfo}, which models the stored settings. |
|||
*/ |
|||
public record ResolvedDeviceConnectivityInfo(boolean enabled, String host, String port, |
|||
DeviceConnectivityHostSource hostSource) { |
|||
} |
|||
Loading…
Reference in new issue