Phase 1-2 deliverables: - shell.ui: Global layout framework (topbar + collapsible sidebar + main content) - shell_theme.css: Dark/light theme CSS custom properties system - shell_theme.js: Theme toggle + sidebar collapse with localStorage persistence - global_menu.ui: Unified module navigation menu with RBAC visibility - index.ui: Redesigned dashboard homepage with modern stat cards + quick links - Stat card widgets: today_usage, today_amount, total_users, concurrent, errors - chart_top_models.ui + api/top_models.dspy: ChartBar with data_url pattern - table_top_users_amount.ui: Jinja2-rendered user ranking table - build.sh: Added .css file linking support Design system: - Dark theme (default): slate color palette (#0B1120, #111827, #1E293B) - Light theme: clean white palette with matching structure - Theme persisted in localStorage, toggled via topbar button - Sidebar collapsible with icon-only mode, state persisted in localStorage - Responsive stat cards with hover effects and trend indicators - Quick link cards for model management, users, knowledge base, errors
59 lines
1.8 KiB
XML
59 lines
1.8 KiB
XML
{% set roles = get_user_roles(get_user()) %}
|
|
{
|
|
"widgettype": "Menu",
|
|
"id": "global_nav_menu",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"bgcolor": "#111827",
|
|
"items": [
|
|
{
|
|
"name": "dashboard",
|
|
"label": "仪表盘",
|
|
"icon": "fa fa-dashboard",
|
|
"url": "{{entire_url('index.ui')}}",
|
|
"target": "app.sage_main_content"
|
|
},
|
|
{% if get_user() %}
|
|
{
|
|
"name": "llmage",
|
|
"label": "LLM 模型管理",
|
|
"icon": "fa fa-brain",
|
|
"submenu": "{{entire_url('/llmage/menu.ui')}}"
|
|
},
|
|
{
|
|
"name": "rag",
|
|
"label": "知识库管理",
|
|
"icon": "fa fa-database",
|
|
"url": "{{entire_url('/rag/menu.ui')}}",
|
|
"target": "app.sage_main_content"
|
|
},
|
|
{% endif %}
|
|
{% if 'reseller.operator' in roles or 'owner.superuser' in roles %}
|
|
{
|
|
"name": "platformbiz",
|
|
"label": "平台业务",
|
|
"icon": "fa fa-building",
|
|
"submenu": "{{entire_url('/platformbiz/menu.ui')}}"
|
|
},
|
|
{% endif %}
|
|
{% if get_user() %}
|
|
{
|
|
"name": "rbac",
|
|
"label": "用户与权限",
|
|
"icon": "fa fa-users",
|
|
"submenu": "{{entire_url('/rbac/admin_menu.ui')}}"
|
|
},
|
|
{% endif %}
|
|
{
|
|
"name": "hermes_web_cli",
|
|
"label": "AI Agent",
|
|
"icon": "fa fa-robot",
|
|
"url": "{{entire_url('/hermes-web-cli/index.ui')}}",
|
|
"target": "app.sage_main_content"
|
|
}
|
|
],
|
|
"menuitem_css": "menuitem"
|
|
}
|
|
}
|