dashboard_for_sage/wwwroot/global_menu.ui
yumoqing 8ceb769356 fix dashboard: clickable quick entries, full-data ranking tables, dark bg
1. Quick entry shortcuts: Replace VBox (no native click) with Button
   widgets for reliable click event handling. Each entry wraps its
   icon+text in a VBox inside the Button for layout.

2. Ranking tables: Changed get_top_users/ providers queries from
   today-only (WHERE use_date=today) to all-time data so transaction
   counts and amounts always display meaningful results.

3. Background color: Added bgcolor=#0B1120 to top-level index.ui VBox
   so the page background matches the shell theme, eliminating the
   white-vs-dark-blue contrast.
2026-05-26 16:06:54 +08:00

98 lines
3.2 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('/dashboard_for_sage/index.ui')}}",
"target": "app.sage_main_content"
},
{% if get_user() %}
{
"name": "llmage",
"label": "LLM 模型管理",
"icon": "fa fa-brain",
"url": "{{entire_url('/llmage/index.ui')}}",
"target": "app.sage_main_content"
},
{
"name": "rag",
"label": "知识库管理",
"icon": "fa fa-database",
"url": "{{entire_url('/rag/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if 'reseller.operator' in roles or 'owner.superuser' in roles %}
{
"name": "platformbiz",
"label": "平台业务",
"icon": "fa fa-building",
"url": "{{entire_url('/platformbiz/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if get_user() %}
{
"name": "product_management",
"label": "产品管理",
"icon": "fa fa-cubes",
"url": "{{entire_url('/product_management/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if get_user() %}
{
"name": "supplychain",
"label": "供销链管理",
"icon": "fa fa-truck",
"url": "{{entire_url('/supplychain/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if get_user() %}
{
"name": "pricing",
"label": "定价管理",
"icon": "fa fa-money-bill",
"url": "{{entire_url('/pricing/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if 'reseller.accountant' in roles or 'owner.superuser' in roles %}
{
"name": "accounting",
"label": "计费管理",
"icon": "fa fa-calculator",
"url": "{{entire_url('/accounting/index.ui')}}",
"target": "app.sage_main_content"
},
{% endif %}
{% if get_user() %}
{
"name": "rbac",
"label": "用户与权限",
"icon": "fa fa-users",
"url": "{{entire_url('/rbac/index.ui')}}",
"target": "app.sage_main_content"
},
{% 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"
}
}