fix: sidebar uses Tree widget instead of Menu (Tree has built-in nav)
This commit is contained in:
parent
51db747252
commit
334af61639
127
wwwroot/index.ui
127
wwwroot/index.ui
@ -30,9 +30,9 @@
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "method",
|
||||
"target": "pccs_sidebar",
|
||||
"method": "toggle_collapse"
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "var s=bricks.getWidgetById('pccs_sidebar',app);if(s){var el=s.dom_element;el.classList.toggle('menu-collapsed');s.resize()}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -118,79 +118,56 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Menu",
|
||||
"id": "pccs_menu",
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"target": "pccs_main",
|
||||
"items": [
|
||||
{
|
||||
"name": "dashboard",
|
||||
"label": "📊 概览",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/')}}"
|
||||
},
|
||||
{
|
||||
"name": "compute_pool",
|
||||
"label": "📦 算力池列表",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/pcpool/compute_pool_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "compute_node",
|
||||
"label": "📦 算力节点",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/pcpool/compute_node_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "cluster_list",
|
||||
"label": "🖥 集群列表",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/pcc/cluster_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "cluster_node",
|
||||
"label": "🖥 节点分配",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/pcc/cluster_node_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "storage_server",
|
||||
"label": "💾 存储服务器",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/storage_mgr/storage_server_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "storage_export",
|
||||
"label": "💾 存储导出",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/storage_mgr/storage_export_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "storage_mount",
|
||||
"label": "💾 存储挂载",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/storage_mgr/storage_mount_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "mirror_source",
|
||||
"label": "🏗 镜像源",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/image_mgr/mirror_source_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "image_registry",
|
||||
"label": "🏗 镜像仓库",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/image_mgr/image_registry_list/index.ui')}}"
|
||||
},
|
||||
{
|
||||
"name": "container_image",
|
||||
"label": "🏗 容器镜像",
|
||||
"icon": "",
|
||||
"url": "{{entire_url('/image_mgr/container_image_list/index.ui')}}"
|
||||
}
|
||||
"otext": "主导航",
|
||||
"cfontsize": 0.7,
|
||||
"color": "#475569",
|
||||
"padding": "4px 4px 8px 4px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Tree",
|
||||
"id": "pccs_menu_tree",
|
||||
"options": {
|
||||
"bgcolor": "transparent",
|
||||
"color": "#94a3b8",
|
||||
"color_selected": "#e2e8f0",
|
||||
"bgcolor_selected": "#1e293b",
|
||||
"fontSize": "0.9rem",
|
||||
"indent": 16,
|
||||
"data": [
|
||||
{"id": "dashboard", "label": "📊 概览",
|
||||
"url": "{{entire_url('/pccs/index.ui')}}"},
|
||||
{"id": "pool", "label": "📦 算力池管理", "children": [
|
||||
{"id": "pool_list", "label": "算力池列表",
|
||||
"url": "{{entire_url('/pcpool/compute_pool_list/index.ui')}}"},
|
||||
{"id": "node_list", "label": "算力节点列表",
|
||||
"url": "{{entire_url('/pcpool/compute_node_list/index.ui')}}"}
|
||||
]},
|
||||
{"id": "cluster", "label": "🖥 集群管理", "children": [
|
||||
{"id": "cluster_list", "label": "集群列表",
|
||||
"url": "{{entire_url('/pcc/cluster_list/index.ui')}}"},
|
||||
{"id": "cn_list", "label": "节点分配",
|
||||
"url": "{{entire_url('/pcc/cluster_node_list/index.ui')}}"}
|
||||
]},
|
||||
{"id": "storage", "label": "💾 存储管理", "children": [
|
||||
{"id": "storage_server", "label": "存储服务器",
|
||||
"url": "{{entire_url('/storage_mgr/storage_server_list/index.ui')}}"},
|
||||
{"id": "storage_export", "label": "存储导出",
|
||||
"url": "{{entire_url('/storage_mgr/storage_export_list/index.ui')}}"},
|
||||
{"id": "storage_mount", "label": "存储挂载",
|
||||
"url": "{{entire_url('/storage_mgr/storage_mount_list/index.ui')}}"}
|
||||
]},
|
||||
{"id": "image", "label": "🏗 镜像管理", "children": [
|
||||
{"id": "mirror_source", "label": "镜像源配置",
|
||||
"url": "{{entire_url('/image_mgr/mirror_source_list/index.ui')}}"},
|
||||
{"id": "image_registry", "label": "镜像仓库",
|
||||
"url": "{{entire_url('/image_mgr/image_registry_list/index.ui')}}"},
|
||||
{"id": "container_image", "label": "容器镜像",
|
||||
"url": "{{entire_url('/image_mgr/container_image_list/index.ui')}}"}
|
||||
]}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user