{ "widgettype": "VBox", "options": { "width": "100%", "height": "100%" }, "subwidgets": [ { "widgettype": "HBox", "options": { "width": "100%", "alignItems": "center", "marginBottom": "24px" }, "subwidgets": [ { "widgettype": "Title2", "options": { "text": "数据概览", "color": "#F1F5F9", "fontWeight": "700" } }, { "widgettype": "Filler" }, { "widgettype": "Text", "options": { "text": "最后更新: {{get_today_usage(request) and request._run_ns.curDateString() or ''}}", "fontSize": "13px", "color": "#64748B" } } ] }, { "widgettype": "ResponsableBox", "options": { "gap": "16px", "minWidth": "220px", "marginBottom": "24px" }, "subwidgets": [ { "widgettype": "RefreshWidget", "id": "stat_today_usage", "options": { "period_seconds": 30, "url": "{{entire_url('stat_today_usage.ui')}}" } }, { "widgettype": "RefreshWidget", "id": "stat_today_amount", "options": { "period_seconds": 30, "url": "{{entire_url('stat_today_amount.ui')}}" } }, { "widgettype": "RefreshWidget", "id": "stat_total_users", "options": { "period_seconds": 60, "url": "{{entire_url('stat_total_users.ui')}}" } }, { "widgettype": "RefreshWidget", "id": "stat_concurrent", "options": { "period_seconds": 15, "url": "{{entire_url('stat_concurrent.ui')}}" } }, { "widgettype": "RefreshWidget", "id": "stat_errors", "options": { "period_seconds": 30, "url": "{{entire_url('stat_errors.ui')}}" } } ] }, { "widgettype": "HBox", "options": { "width": "100%", "gap": "20px", "height": "auto" }, "subwidgets": [ { "widgettype": "VBox", "options": { "width": "60%", "bgcolor": "#1E293B", "borderRadius": "12px", "padding": "20px", "border": "1px solid #334155" }, "subwidgets": [ { "widgettype": "HBox", "options": { "width": "100%", "alignItems": "center", "marginBottom": "16px" }, "subwidgets": [ { "widgettype": "Title4", "options": { "text": "Top 3 模型(今日调用)", "color": "#F1F5F9", "fontWeight": "600" } }, { "widgettype": "Filler" }, { "widgettype": "Button", "options": { "label": "刷新", "bgcolor": "#334155", "color": "#94A3B8", "border": "none", "borderRadius": "6px", "padding": "4px 12px", "fontSize": "12px" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "method", "target": "-@RefreshWidget", "method": "render_urldata", "params": {} } ] } ] }, { "widgettype": "RefreshWidget", "id": "chart_top_models", "options": { "period_seconds": 30, "url": "{{entire_url('chart_top_models.ui')}}" } } ] }, { "widgettype": "VBox", "options": { "width": "40%", "bgcolor": "#1E293B", "borderRadius": "12px", "padding": "20px", "border": "1px solid #334155" }, "subwidgets": [ { "widgettype": "Title4", "options": { "text": "快捷入口", "color": "#F1F5F9", "fontWeight": "600", "marginBottom": "16px" } }, { "widgettype": "ResponsableBox", "options": { "gap": "12px", "minWidth": "120px" }, "subwidgets": [ { "widgettype": "VBox", "options": { "bgcolor": "#334155", "padding": "16px", "borderRadius": "8px", "cursor": "pointer", "textAlign": "center" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.sage_main_content", "options": { "url": "{{entire_url('/llmage/llm')}}" }, "mode": "replace" } ], "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "" } }, { "widgettype": "Text", "options": { "text": "模型管理", "color": "#E2E8F0", "fontSize": "13px", "marginTop": "8px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#334155", "padding": "16px", "borderRadius": "8px", "cursor": "pointer", "textAlign": "center" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.sage_main_content", "options": { "url": "{{entire_url('/rbac/users')}}" }, "mode": "replace" } ], "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "" } }, { "widgettype": "Text", "options": { "text": "用户管理", "color": "#E2E8F0", "fontSize": "13px", "marginTop": "8px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#334155", "padding": "16px", "borderRadius": "8px", "cursor": "pointer", "textAlign": "center" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.sage_main_content", "options": { "url": "{{entire_url('/rag/kdb')}}" }, "mode": "replace" } ], "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "" } }, { "widgettype": "Text", "options": { "text": "知识库", "color": "#E2E8F0", "fontSize": "13px", "marginTop": "8px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#334155", "padding": "16px", "borderRadius": "8px", "cursor": "pointer", "textAlign": "center" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.sage_main_content", "options": { "url": "{{entire_url('/llmage/failed_accounting.ui')}}" }, "mode": "replace" } ], "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "" } }, { "widgettype": "Text", "options": { "text": "异常记录", "color": "#E2E8F0", "fontSize": "13px", "marginTop": "8px" } } ] } ] } ] } ] }, { "widgettype": "VBox", "options": { "width": "100%", "bgcolor": "#1E293B", "borderRadius": "12px", "padding": "20px", "border": "1px solid #334155", "marginTop": "20px" }, "subwidgets": [ { "widgettype": "Title4", "options": { "text": "用户消费排行(Top 5)", "color": "#F1F5F9", "fontWeight": "600", "marginBottom": "16px" } }, { "widgettype": "RefreshWidget", "id": "table_top_users", "options": { "period_seconds": 30, "url": "{{entire_url('table_top_users.ui')}}" } } ] } ] }