新增实例数据统计页:复盘 KPI 上、资金曲线下,系统设置可关。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 15:28:25 +08:00
parent 48b919bb2b
commit 23bd59c87f
12 changed files with 666 additions and 50 deletions
+5 -4
View File
@@ -15,7 +15,7 @@ DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
"show_nav_strategy": False,
"show_nav_strategy_records": False,
"show_nav_records": False, # 永续交易记录与复盘已移除
"show_nav_stats": False,
"show_nav_stats": True, # 数据统计(复盘 KPI + 资金曲线);可在系统设置关闭
"show_nav_risk_policy": True,
"show_nav_live_guide": True,
"show_nav_system_guide": False,
@@ -37,7 +37,7 @@ DISPLAY_LABELS: dict[str, str] = {
"show_nav_strategy": "策略交易",
"show_nav_strategy_records": "策略交易记录",
"show_nav_records": "交易记录与复盘",
"show_nav_stats": "统计分析",
"show_nav_stats": "数据统计",
"show_nav_risk_policy": "风控说明",
"show_nav_live_guide": "实盘说明",
"show_nav_system_guide": "系统说明",
@@ -111,8 +111,8 @@ def display_prefs_template_context(get_db: Callable) -> dict[str, Any]:
def tab_allowed(tab: str, display: Optional[dict[str, bool]] = None) -> bool:
prefs = normalize_display_prefs(display or {})
t = (tab or "").strip()
if t in ("trade", "records", "stats", "hedge_plan"):
return False # 永续下单/记录/统计已下线;关键位监控保留
if t in ("trade", "records", "hedge_plan"):
return False # 永续下单/记录已下线;关键位监控保留
key = NAV_TAB_ALLOWED.get(t)
if not key:
return True
@@ -124,6 +124,7 @@ def display_meta_for_ui() -> list[dict[str, Any]]:
"show_nav_dashboard",
"show_nav_account_ledger",
"show_nav_key_monitor",
"show_nav_stats",
"show_nav_risk_policy",
"show_nav_live_guide",
"show_nav_system_guide",