205 lines
7.4 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"padding": "20px",
"bgcolor": "#f0f2f5"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Dashboard",
"fontSize": "24px",
"fontWeight": "bold",
"color": "#333",
"marginBottom": "20px"
}
},
{
"widgettype": "ResponsableBox",
"options": {
"gap": "16px",
"minWidth": "250px"
},
"subwidgets": [
{
"widgettype": "VBox",
"id": "card_today_cnt",
"options": {
"bgcolor": "#FFFFFF",
"padding": "24px",
"borderRadius": "8px",
"flex": "1",
"minHeight": "120px",
"boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "今日调用笔数",
"fontSize": "14px",
"color": "#888",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"id": "today_cnt_value",
"options": {
"text": "--",
"fontSize": "32px",
"fontWeight": "bold",
"color": "#1890ff"
}
}
]
},
{
"widgettype": "VBox",
"id": "card_today_amount",
"options": {
"bgcolor": "#FFFFFF",
"padding": "24px",
"borderRadius": "8px",
"flex": "1",
"minHeight": "120px",
"boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "今日交易金额",
"fontSize": "14px",
"color": "#888",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"id": "today_amount_value",
"options": {
"text": "--",
"fontSize": "32px",
"fontWeight": "bold",
"color": "#52c41a"
}
}
]
},
{
"widgettype": "VBox",
"id": "card_total_users",
"options": {
"bgcolor": "#FFFFFF",
"padding": "24px",
"borderRadius": "8px",
"flex": "1",
"minHeight": "120px",
"boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "用户总数",
"fontSize": "14px",
"color": "#888",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"id": "total_users_value",
"options": {
"text": "--",
"fontSize": "32px",
"fontWeight": "bold",
"color": "#722ed1"
}
}
]
},
{
"widgettype": "VBox",
"id": "card_concurrent_users",
"options": {
"bgcolor": "#FFFFFF",
"padding": "24px",
"borderRadius": "8px",
"flex": "1",
"minHeight": "120px",
"boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "当前并发用户",
"fontSize": "14px",
"color": "#888",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"id": "concurrent_users_value",
"options": {
"text": "--",
"fontSize": "32px",
"fontWeight": "bold",
"color": "#fa8c16"
}
}
]
}
]
},
{
"widgettype": "VBox",
"id": "chart_section",
"options": {
"bgcolor": "#FFFFFF",
"padding": "24px",
"borderRadius": "8px",
"marginTop": "20px",
"minHeight": "350px",
"boxShadow": "0 2px 8px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Top 3 模型(今日)",
"fontSize": "18px",
"fontWeight": "bold",
"color": "#333",
"marginBottom": "16px"
}
},
{
"widgettype": "ChartBar",
"id": "top_models_chart",
"options": {
"height": "300px",
"width": "100%",
"data_url": "{{entire_url('api/get_top_models.dspy')}}",
"nameField": "model_name",
"valueFields": ["cnt", "total_amount"]
}
}
]
},
{
"widgettype": "Html",
"id": "auto_refresh",
"options": {
"html": "<div id='refresh_indicator' style='position:fixed;bottom:10px;right:10px;font-size:12px;color:#999;'>数据每10秒自动刷新</div>"
}
}
]
}