Label dashboard positions from monitor sources with priority.

Match hedge/roll/trend/order/key monitors for source badges, show option target monitors in green, and refresh the dashboard with the board 5s cycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 14:25:36 +08:00
parent 0bda44248f
commit c4c8ad172a
11 changed files with 290 additions and 28 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
"""中控数据看板:三户当日总览(无 AI,纯数据聚合)."""
from __future__ import annotations
import os
from datetime import datetime, timezone
from typing import Any, Optional
@@ -14,7 +15,8 @@ from hub_ai.config import trading_day_reset_hour
from lib.hub.hub_trades_lib import current_trading_day
LOSS_ALERT_PCT = 5.0
DASHBOARD_POLL_INTERVAL_SEC = 60
# 与监控区 board 默认 5s 对齐,看板持仓来源跟监控同步.
DASHBOARD_POLL_INTERVAL_SEC = float(os.getenv("DASHBOARD_POLL_INTERVAL_SEC", "5"))
def _safe_float(v: Any) -> Optional[float]: