增加关键位显示

This commit is contained in:
dekun
2026-05-22 10:51:57 +08:00
parent 493b4ff3fb
commit d144cb592a
4 changed files with 41 additions and 11 deletions
+10
View File
@@ -206,11 +206,21 @@ async def api_monitor_board():
snap = await _fetch_flask_json(client, ex, "/api/price_snapshot")
if isinstance(snap, dict):
key_prices = snap.get("key_prices")
flask_ok = isinstance(hub_mon, dict) and hub_mon.get("ok") is not False
flask_err = None
if isinstance(hub_mon, dict) and hub_mon.get("ok") is False:
flask_err = (
hub_mon.get("msg")
or hub_mon.get("error")
or (str(hub_mon.get("text") or "")[:200] or None)
)
out.append(
{
**agent_row,
"review_url": ex.get("review_url") or "",
"hub_monitor": hub_mon,
"flask_ok": flask_ok,
"flask_error": flask_err,
"meta": (meta or {}).get("meta") if isinstance(meta, dict) else meta,
"key_prices": key_prices,
}