feat: 设备型号采集展示(devices 表 model 列+getprop 采集+管理页型号列/采集按钮+监控页兜底)+ fix: 监控页设备列错位(离线标签残留 td)、appver 端点误删恢复、appver 只查在线设备用轻量连接防挂起

This commit is contained in:
2026-08-19 13:53:27 +08:00
parent eda71c8e5f
commit 6f6093842c
8 changed files with 227 additions and 21 deletions
+5 -3
View File
@@ -824,9 +824,11 @@ class TaskManager:
except Exception:
online = set()
try:
names = {d["serial"]: d["name"] for d in device_pool.list_devices()}
pool_rows = device_pool.list_devices()
names = {d["serial"]: d["name"] for d in pool_rows}
models = {d["serial"]: d["model"] for d in pool_rows}
except Exception:
names = {}
names, models = {}, {}
# 清理陈旧状态:serial 已不在设备池、且没有在跑 worker 的条目,
# 避免设备被删除后其失败记录仍残留在"异常汇总"里
@@ -845,7 +847,7 @@ class TaskManager:
r = running.get(serial, {})
result.append({
"serial": serial,
"model": w.get("model", ""),
"model": w.get("model") or models.get(serial, ""),
"device_name": names.get(serial, ""),
"present": is_online,
"ready": is_online, # 阶段 1:ready 概念并入在线状态