- Add get_user_today_models() function to load_dashboard.py Shows current user's today model call counts and amounts - Create api/user_today_models.dspy endpoint - Create user_today_models_chart.ui ChartBar widget (30s auto-refresh) - Add '我的今日模型使用' card section to index.ui with refresh button - Register new paths in load_path.py (logined permission)
12 lines
289 B
XML
12 lines
289 B
XML
{
|
|
"widgettype": "ChartBar",
|
|
"options": {
|
|
"height": "280px",
|
|
"width": "100%",
|
|
"data_url": "{{entire_url('api/user_today_models.dspy')}}",
|
|
"nameField": "model_name",
|
|
"valueFields": ["cnt", "total_amount"],
|
|
"refresh_period": 30
|
|
}
|
|
}
|