80 lines
2.5 KiB
XML
80 lines
2.5 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",
|
|
"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": "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"
|
|
}
|
|
}
|