feat: show machine name

fix: host node registry not uploaded
This commit is contained in:
wznln
2025-04-29 14:39:14 +08:00
parent e5749a8058
commit ea6f25d1ce
4 changed files with 31 additions and 8 deletions

View File

@@ -34,6 +34,7 @@ def get_host_node_info() -> Dict[str, Any]:
"namespace": namespace,
"is_online": f"{namespace}/{device_id}" in host_node._online_devices,
"key": f"{namespace}/{device_id}" if namespace.startswith("/") else f"/{namespace}/{device_id}",
"machine_name": host_node.device_machine_names.get(device_id, "未知"),
}
for device_id, namespace in host_node.devices_names.items()
}
@@ -41,9 +42,7 @@ def get_host_node_info() -> Dict[str, Any]:
host_info["subscribed_topics"] = sorted(list(host_node._subscribed_topics))
# 获取动作客户端信息
for action_id, client in host_node._action_clients.items():
host_info["action_clients"] = {
action_id: get_action_info(client, full_name=action_id)
}
host_info["action_clients"] = {action_id: get_action_info(client, full_name=action_id)}
# 获取设备状态
host_info["device_status"] = host_node.device_status