diff --git a/i18n/en/msg.txt b/i18n/en/msg.txt new file mode 100644 index 0000000..a0e1fe7 --- /dev/null +++ b/i18n/en/msg.txt @@ -0,0 +1,19 @@ +存储导出: Storage Export +存储挂载: Storage Mount +存储服务器: Storage Server +存储管理: Storage Management +容器镜像: Container Image +算力池列表: Compute Pool List +算力池管理: Compute Pool Management +算力节点列表: Compute Node List +节点分配: Node Assignment +镜像仓库: Image Registry +镜像源配置: Mirror Source Config +镜像管理: Image Management +集群列表: Cluster List +集群管理: Cluster Management +🏗 镜像管理: +💾 存储管理: +📊 概览: +📦 算力池管理: +🖥 集群管理: diff --git a/i18n/zh/msg.txt b/i18n/zh/msg.txt new file mode 100644 index 0000000..1fa13c4 --- /dev/null +++ b/i18n/zh/msg.txt @@ -0,0 +1,19 @@ +存储导出: 存储导出 +存储挂载: 存储挂载 +存储服务器: 存储服务器 +存储管理: 存储管理 +容器镜像: 容器镜像 +算力池列表: 算力池列表 +算力池管理: 算力池管理 +算力节点列表: 算力节点列表 +节点分配: 节点分配 +镜像仓库: 镜像仓库 +镜像源配置: 镜像源配置 +镜像管理: 镜像管理 +集群列表: 集群列表 +集群管理: 集群管理 +🏗 镜像管理: 🏗 镜像管理 +💾 存储管理: 💾 存储管理 +📊 概览: 📊 概览 +📦 算力池管理: 📦 算力池管理 +🖥 集群管理: 🖥 集群管理 diff --git a/wwwroot/bottom.ui b/wwwroot/bottom.ui new file mode 100644 index 0000000..473a698 --- /dev/null +++ b/wwwroot/bottom.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "HBox", + "options": { + "width": "100%", + "height": "32px", + "bgcolor": "#f8fafc", + "borderTop": "1px solid #e2e8f0", + "padding": "0 16px", + "halign": "center", + "valign": "center" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "otext": "© 2026 PCCS 算力中心集群系统 | ICP备案号:粤ICP备XXXXXXXX号", + "cfontsize": 0.7, + "color": "#94a3b8" + } + } + ] +} diff --git a/wwwroot/i18n/language.ui b/wwwroot/i18n/language.ui new file mode 100644 index 0000000..c7923d6 --- /dev/null +++ b/wwwroot/i18n/language.ui @@ -0,0 +1,36 @@ +{ + + "id":"language", + "widgettype":"Text", + "options":{ + "tip":"change UI language", + "i18n":true, + "otext":"{{params_kw._lang}}", + "cwidth": 4, + "css":"clickable" + }, + "binds":[ + { + "wid":"self", + "event":"click", + "actiontype":"urlwidget", + "target":"Popup", + "popup_options":{ + "eventpos":true, + "cwidth": 11, + "cheight":10, + "dismiss_events":["command"] + }, + "options":{ + "url":"{{entire_url('menu.ui')}}" + } + }, + { + "wid":"app", + "event":"lang", + "actiontype":"script", + "target":"self", + "script":"this.set_otext(bricks.app.lang)" + } + ] +} diff --git a/wwwroot/i18n/menu.ui b/wwwroot/i18n/menu.ui new file mode 100644 index 0000000..6262428 --- /dev/null +++ b/wwwroot/i18n/menu.ui @@ -0,0 +1,20 @@ +{ + "id": "lang_menu", + "widgettype": "Menu", + "options": { + "width": "160px", + "items": [ + {"name": "zh", "label": "中文"}, + {"name": "en", "label": "English"} + ] + }, + "binds": [ + { + "wid": "self", + "event": "menuitem_clicked", + "actiontype": "script", + "target": "self", + "script": "var item=bricks.app.last_menuitem_data; if(item&&item.name){bricks.app.set_lang(item.name); bricks.app.fire('lang', item.name)}" + } + ] +} diff --git a/wwwroot/index.html b/wwwroot/index.html index f5dbb0f..7f3239c 100644 --- a/wwwroot/index.html +++ b/wwwroot/index.html @@ -1,69 +1,2 @@ - -PCCS 算力中心集群系统 - - -
-
算力中心集群系统
-
-
- - - -
-
- -
- -
-

📦 算力池管理

节点池创建、节点注册、资源分配、心跳监控

算力池列表 →节点列表 →
-

🖥 集群管理

K8s/Slurm/Ray 集群部署、节点增减、状态监控

集群列表 →节点分配 →
-

💾 存储管理

NFS 共享存储服务器、导出路径、节点挂载

服务器 →导出 →挂载 →
-

🏗 镜像管理

国内镜像源、本地仓库部署、镜像导入/同步

镜像源 →仓库 →镜像 →
-
-
- - - - + diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 74faa9d..b606297 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,260 +1,240 @@ { - "widgettype": "VBox", - "options": { + "widgettype": "VBox", + "options": { + "width": "100%", + "height": "100%" + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "height": "48px", "width": "100%", - "height": "100%", - "bgcolor": "#f8fafc" - }, - "subwidgets": [ + "bgcolor": "#ffffff", + "borderBottom": "1px solid #e2e8f0", + "padding": "0 16px", + "halign": "space-between", + "valign": "center" + }, + "subwidgets": [ { - "widgettype": "HBox", - "options": { - "width": "100%", - "cheight": 2.5, - "padding": "0 16px", - "alignItems": "center", - "bgcolor": "#ffffff", - "borderBottom": "1px solid #e2e8f0" + "widgettype": "HBox", + "options": { + "spacing": "8px", + "valign": "center" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "otext": "PCCS", + "cfontsize": 1.2, + "fontWeight": "bold", + "color": "#1e293b" + } }, - "subwidgets": [ - { - "widgettype": "Button", - "id": "sidebar_toggle_btn", - "options": { - "css": "text", - "label": "☰", - "cfontsize": 1.4, - "color": "#64748b" - }, - "binds": [ - { - "wid": "self", - "event": "click", - "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()}" - } - ] - }, - { - "widgettype": "Text", - "options": { - "otext": "PCCS", - "cfontsize": 1.2, - "fontWeight": "bold", - "color": "#1e293b", - "padding": "0 8px" - } - }, - { - "widgettype": "Text", - "options": { - "otext": "算力中心集群系统", - "cfontsize": 0.8, - "color": "#94a3b8" - } - }, - { - "widgettype": "Filler" - }, - { - "widgettype": "urlwidget", - "options": { - "url": "{{entire_url('i18n/language.ui')}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "{{entire_url('/rbac/user/user_panel.ui')}}" - } - } - ] + { + "widgettype": "Text", + "options": { + "otext": "算力中心集群系统", + "cfontsize": 0.8, + "color": "#94a3b8" + } + } + ] }, { - "widgettype": "HBox", - "options": { - "css": "filler", - "padding": "0", - "gap": "0" - }, - "subwidgets": [ - { - "widgettype": "VBox", - "id": "pccs_sidebar", - "options": { - "width": "220px", - "minWidth": "200px", - "height": "100%", - "bgcolor": "#0f172a", - "padding": "0", - "flexShrink": "0" - }, - "subwidgets": [ - { - "widgettype": "VBox", - "options": { - "padding": "20px 16px", - "borderBottom": "1px solid #1e293b" - }, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "otext": "PCCS", - "cfontsize": 1.3, - "fontWeight": "bold", - "color": "#e2e8f0" - } - }, - { - "widgettype": "Text", - "options": { - "otext": "算力中心集群系统", - "cfontsize": 0.75, - "color": "#64748b" - } - } - ] - }, - { - "widgettype": "Text", - "options": { - "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')}}"} - ]} - ] - } - } - ] - }, - { - "widgettype": "VScrollPanel", - "id": "pccs_main", - "options": { - "css": "filler", - "width": "100%", - "height": "100%" - }, - "subwidgets": [ - { - "widgettype": "VBox", - "options": { - "padding": "32px", - "spacing": "24px" - }, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "otext": "概览", - "cfontsize": 1.5, - "fontWeight": "bold", - "color": "#1e293b" - } - }, - { - "widgettype": "Text", - "options": { - "otext": "算力中心资源总览", - "cfontsize": 0.9, - "color": "#64748b" - } - }, - { - "widgettype": "HBox", - "options": {"gap": "16px"}, - "subwidgets": [ - { - "widgettype": "urlwidget", - "id": "card_pool", - "options": { - "url": "{{entire_url('/pcpool/api/pool_stats.dspy')}}", - "method": "GET" - } - }, - { - "widgettype": "urlwidget", - "id": "card_cluster", - "options": { - "url": "{{entire_url('/pcc/api/cluster_status_all.dspy')}}", - "method": "GET" - } - } - ] - }, - { - "widgettype": "HBox", - "options": {"gap": "16px"}, - "subwidgets": [ - { - "widgettype": "urlwidget", - "id": "card_storage", - "options": { - "url": "{{entire_url('/storage_mgr/api/storage_stats.dspy')}}", - "method": "GET" - } - }, - { - "widgettype": "urlwidget", - "id": "card_image", - "options": { - "url": "{{entire_url('/image_mgr/api/image_stats.dspy')}}", - "method": "GET" - } - } - ] - } - ] - } - ] - } - ] + "widgettype": "Filler" + }, + { + "widgettype": "Button", + "id": "theme_toggle_btn", + "options": { + "label": "🌓", + "width": "36px", + "height": "36px", + "padding": "0" + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "script", + "target": "app", + "script": "var h=document.documentElement;var t=h.getAttribute('data-theme')||'light';var n=t=='light'?'dark':'light';h.setAttribute('data-theme',n);localStorage.setItem('pccs-theme',n);var b=bricks.getWidgetById('theme_toggle_btn',bricks.app);if(b){b.opts.label=n=='light'?'🌙':'☀️';b.dom_element.textContent=b.opts.label}" + } + ] + }, + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('i18n/language.ui')}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('/rbac/user/user_panel.ui')}}" + } } - ] -} + ] + }, + { + "widgettype": "HBox", + "options": { + "css": "filler", + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "VBox", + "id": "pccs_sidebar", + "options": { + "width": "220px", + "minWidth": "200px", + "height": "100%", + "bgcolor": "#0f172a", + "padding": "16px 0" + }, + "subwidgets": [ + { + "widgettype": "Menu", + "id": "pccs_menu", + "options": { + "width": "100%", + "height": "100%", + "menuitem_css": "menuitem", + "items": [ + { + "name": "dashboard", + "label": "📊 概览", + "icon": "", + "url": "{{entire_url('/pccs/overview.ui')}}", + "target": "app.pccs_main_content" + }, + { + "name": "pool", + "label": "📦 算力池管理", + "icon": "", + "items": [ + { + "name": "pool_list", + "label": "算力池列表", + "url": "{{entire_url('/pcpool/compute_pool_list/index.ui')}}", + "target": "app.pccs_main_content" + } + ] + }, + { + "name": "cluster", + "label": "🖥 集群管理", + "icon": "", + "items": [ + { + "name": "cluster_list", + "label": "集群列表", + "url": "{{entire_url('/pcc/cluster_list/index.ui')}}", + "target": "app.pccs_main_content" + } + ] + }, + { + "name": "storage", + "label": "💾 存储管理", + "icon": "", + "items": [ + { + "name": "storage_server", + "label": "存储服务器", + "url": "{{entire_url('/storage_mgr/storage_server_list/index.ui')}}", + "target": "app.pccs_main_content" + }, + { + "name": "storage_export", + "label": "存储导出", + "url": "{{entire_url('/storage_mgr/storage_export_list/index.ui')}}", + "target": "app.pccs_main_content" + }, + { + "name": "storage_mount", + "label": "存储挂载", + "url": "{{entire_url('/storage_mgr/storage_mount_list/index.ui')}}", + "target": "app.pccs_main_content" + } + ] + }, + { + "name": "image", + "label": "🏗 镜像管理", + "icon": "", + "items": [ + { + "name": "mirror_source", + "label": "镜像源配置", + "url": "{{entire_url('/image_mgr/mirror_source_list/index.ui')}}", + "target": "app.pccs_main_content" + }, + { + "name": "image_registry", + "label": "镜像仓库", + "url": "{{entire_url('/image_mgr/image_registry_list/index.ui')}}", + "target": "app.pccs_main_content" + }, + { + "name": "container_image", + "label": "容器镜像", + "url": "{{entire_url('/image_mgr/container_image_list/index.ui')}}", + "target": "app.pccs_main_content" + } + ] + } + ] + } + } + ] + }, + { + "widgettype": "VScrollPanel", + "options": { + "css": "filler", + "width": "100%", + "height": "100%" + }, + "subwidgets": [ + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('/pccs/overview.ui')}}", + "width": "100%", + "height": "100%" + } + }, + { + "widgettype": "HBox", + "options": { + "width": "100%", + "height": "32px", + "bgcolor": "#f8fafc", + "borderTop": "1px solid #e2e8f0", + "padding": "0 16px", + "halign": "center", + "valign": "center" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "otext": "© 2026 PCCS 算力中心集群系统 | ICP备案号:粤ICP备XXXXXXXX号", + "cfontsize": 0.7, + "color": "#94a3b8" + } + } + ] + } + ], + "id": "pccs_main_content" + } + ] + } + ] +} \ No newline at end of file diff --git a/wwwroot/overview.ui b/wwwroot/overview.ui new file mode 100644 index 0000000..7f2c45e --- /dev/null +++ b/wwwroot/overview.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "VBox", + "options": {"padding": "24px", "spacing": "24px", "bgcolor": "#f8fafc"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"otext": "资源概览", "cfontsize": 1.3, "fontWeight": "bold", "color": "#1e293b", "marginBottom": "4px"}}, + {"widgettype": "Text", "options": {"otext": "算力池", "cfontsize": 0.9, "fontWeight": "bold", "color": "#64748b", "marginTop": "8px"}}, + {"widgettype": "urlwidget", "options": {"url": "{{entire_url('/pcpool/api/pool_stats.dspy')}}", "width": "100%", "height": "100px"}}, + {"widgettype": "Text", "options": {"otext": "集群", "cfontsize": 0.9, "fontWeight": "bold", "color": "#64748b", "marginTop": "8px"}}, + {"widgettype": "urlwidget", "options": {"url": "{{entire_url('/pcc/api/cluster_status_all.dspy')}}", "width": "100%", "height": "100px"}}, + {"widgettype": "Text", "options": {"otext": "存储与镜像", "cfontsize": 0.9, "fontWeight": "bold", "color": "#64748b", "marginTop": "8px"}}, + {"widgettype": "HBox", "options": {"gap": "16px"}, "subwidgets": [ + {"widgettype": "urlwidget", "options": {"url": "{{entire_url('/storage_mgr/api/storage_stats.dspy')}}", "width": "50%", "height": "60px"}}, + {"widgettype": "urlwidget", "options": {"url": "{{entire_url('/image_mgr/api/image_stats.dspy')}}", "width": "50%", "height": "60px"}} + ]}, + {"widgettype": "Filler"}, + { + "widgettype": "HBox", + "options": {"width": "100%", "height": "32px", "bgcolor": "#f8fafc", "borderTop": "1px solid #e2e8f0", "padding": "0 16px", "halign": "center", "valign": "center"}, + "subwidgets": [{"widgettype": "Text", "options": {"otext": "(c) 2026 PCCS | ICP(Beian): YueICPBei-XXXXXXXX", "cfontsize": 0.7, "color": "#94a3b8"}}] + } + ] +} diff --git a/wwwroot/pccs/bottom.ui b/wwwroot/pccs/bottom.ui new file mode 100644 index 0000000..473a698 --- /dev/null +++ b/wwwroot/pccs/bottom.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "HBox", + "options": { + "width": "100%", + "height": "32px", + "bgcolor": "#f8fafc", + "borderTop": "1px solid #e2e8f0", + "padding": "0 16px", + "halign": "center", + "valign": "center" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "otext": "© 2026 PCCS 算力中心集群系统 | ICP备案号:粤ICP备XXXXXXXX号", + "cfontsize": 0.7, + "color": "#94a3b8" + } + } + ] +}