feat: Add System Overview tab to User Management page (admin only)

- Add backend API endpoint /api/users/system-strategies for system-wide strategy data
- Query all strategies across all users with positions, PnL, trade stats
- Add summary statistics (total strategies, running count, total capital, total PnL/ROI)
- Support filtering by status (running/stopped) and search by strategy/symbol/user
- Add System Overview tab with summary cards and detailed strategy table
- Display user, strategy name, status, symbol, capital, PnL/ROI, positions, trades, indicator, exchange, timeframe, leverage
- Add i18n translations for zh-CN and en-US
- Lazy-load strategy data when tab is first accessed
This commit is contained in:
TIANHE
2026-02-13 02:46:59 +08:00
parent f0a5af595d
commit 4c73439bd6
5 changed files with 953 additions and 103 deletions
+30
View File
@@ -2561,6 +2561,36 @@ const locale = {
'userManage.selectDate': 'Please select a date',
'userManage.remark': 'Remark',
'userManage.remarkPlaceholder': 'Optional remark',
'userManage.tabUsers': 'User Management',
// System Overview (Admin)
'systemOverview.tabTitle': 'System Overview',
'systemOverview.totalStrategies': 'Total Strategies',
'systemOverview.runningStrategies': 'Running',
'systemOverview.totalCapital': 'Total Capital',
'systemOverview.totalPnl': 'Total PnL',
'systemOverview.filterAll': 'All Status',
'systemOverview.filterRunning': 'Running',
'systemOverview.filterStopped': 'Stopped',
'systemOverview.searchPlaceholder': 'Search strategy/symbol/user',
'systemOverview.running': 'Running',
'systemOverview.stopped': 'Stopped',
'systemOverview.colUser': 'User',
'systemOverview.colStrategy': 'Strategy',
'systemOverview.colStatus': 'Status',
'systemOverview.colSymbol': 'Symbol',
'systemOverview.colCapital': 'Capital',
'systemOverview.colPnl': 'PnL / ROI',
'systemOverview.colPositions': 'Pos',
'systemOverview.colTrades': 'Trades',
'systemOverview.colIndicator': 'Indicator',
'systemOverview.colExchange': 'Exchange',
'systemOverview.colTimeframe': 'TF',
'systemOverview.colLeverage': 'Lev',
'systemOverview.colCreatedAt': 'Created',
'systemOverview.realized': 'Real',
'systemOverview.unrealized': 'Unreal',
'systemOverview.symbols': 'symbols',
// Settings - Billing
'settings.group.billing': 'Billing & Credits',
+30
View File
@@ -2370,6 +2370,36 @@ const locale = {
'userManage.selectDate': '请选择日期',
'userManage.remark': '备注',
'userManage.remarkPlaceholder': '可选备注',
'userManage.tabUsers': '用户管理',
// System Overview (Admin)
'systemOverview.tabTitle': '系统总览',
'systemOverview.totalStrategies': '策略总数',
'systemOverview.runningStrategies': '运行中',
'systemOverview.totalCapital': '总资金',
'systemOverview.totalPnl': '总盈亏',
'systemOverview.filterAll': '全部状态',
'systemOverview.filterRunning': '运行中',
'systemOverview.filterStopped': '已停止',
'systemOverview.searchPlaceholder': '搜索策略名/交易对/用户名',
'systemOverview.running': '运行中',
'systemOverview.stopped': '已停止',
'systemOverview.colUser': '用户',
'systemOverview.colStrategy': '策略名称',
'systemOverview.colStatus': '状态',
'systemOverview.colSymbol': '交易对',
'systemOverview.colCapital': '资金',
'systemOverview.colPnl': '盈亏 / ROI',
'systemOverview.colPositions': '持仓',
'systemOverview.colTrades': '交易次数',
'systemOverview.colIndicator': '指标',
'systemOverview.colExchange': '交易所',
'systemOverview.colTimeframe': '周期',
'systemOverview.colLeverage': '杠杆',
'systemOverview.colCreatedAt': '创建时间',
'systemOverview.realized': '已实现',
'systemOverview.unrealized': '未实现',
'systemOverview.symbols': '个交易对',
// Settings - Billing
'settings.group.billing': '计费配置',