From 4852c8e8510abbc963298edc418d754e3f474c10 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 1 Jun 2026 23:13:44 +0000 Subject: [PATCH] feat(ui): route /app/cluster, redirect /app/p2p and /app/nodes, single sidebar entry Signed-off-by: Ettore Di Giacinto --- core/http/react-ui/public/locales/de/admin.json | 16 ++++++++++++++++ core/http/react-ui/public/locales/de/nav.json | 1 + core/http/react-ui/public/locales/en/admin.json | 16 ++++++++++++++++ core/http/react-ui/public/locales/en/nav.json | 1 + core/http/react-ui/public/locales/es/admin.json | 16 ++++++++++++++++ core/http/react-ui/public/locales/es/nav.json | 1 + core/http/react-ui/public/locales/it/admin.json | 16 ++++++++++++++++ core/http/react-ui/public/locales/it/nav.json | 1 + .../react-ui/public/locales/zh-CN/admin.json | 16 ++++++++++++++++ core/http/react-ui/public/locales/zh-CN/nav.json | 1 + .../src/components/console/consoleConfig.js | 3 +-- core/http/react-ui/src/router.jsx | 8 ++++---- 12 files changed, 90 insertions(+), 6 deletions(-) diff --git a/core/http/react-ui/public/locales/de/admin.json b/core/http/react-ui/public/locales/de/admin.json index 58becfd02..197abf0b4 100644 --- a/core/http/react-ui/public/locales/de/admin.json +++ b/core/http/react-ui/public/locales/de/admin.json @@ -143,5 +143,21 @@ "explorer": { "title": "Explorer", "subtitle": "Dateien und Konfiguration durchsuchen" + }, + "cluster": { + "title": "Cluster", + "subtitle": "Verteilte und Peer-to-Peer-Knoten, die diese Instanz bedienen", + "empty": "Es ist kein verteiltes oder p2p-Clustering aktiviert. Starte LocalAI im verteilten oder föderierten/p2p-Modus, um hier Cluster-Knoten zu verwalten.", + "distributed": { + "title": "Verteilt (NATS)" + }, + "swarm": { + "title": "Swarm (p2p)" + }, + "summary": { + "nodes": "Verteilte Knoten", + "inFlight": "Laufende Anfragen", + "peers": "Swarm-Peers online" + } } } diff --git a/core/http/react-ui/public/locales/de/nav.json b/core/http/react-ui/public/locales/de/nav.json index af1d8b0ea..69b0a713c 100644 --- a/core/http/react-ui/public/locales/de/nav.json +++ b/core/http/react-ui/public/locales/de/nav.json @@ -53,6 +53,7 @@ "nodes": "Knoten", "scheduling": "Planung", "swarm": "Swarm", + "cluster": "Cluster", "system": "System", "settings": "Einstellungen", "api": "API", diff --git a/core/http/react-ui/public/locales/en/admin.json b/core/http/react-ui/public/locales/en/admin.json index f6dccf80b..116fff4b9 100644 --- a/core/http/react-ui/public/locales/en/admin.json +++ b/core/http/react-ui/public/locales/en/admin.json @@ -166,5 +166,21 @@ "explorer": { "title": "Explorer", "subtitle": "Browse files and configuration" + }, + "cluster": { + "title": "Cluster", + "subtitle": "Distributed and peer-to-peer nodes serving this instance", + "empty": "No distributed or p2p clustering is enabled. Start LocalAI in distributed or federated/p2p mode to manage cluster nodes here.", + "distributed": { + "title": "Distributed (NATS)" + }, + "swarm": { + "title": "Swarm (p2p)" + }, + "summary": { + "nodes": "Distributed nodes", + "inFlight": "In-flight requests", + "peers": "Swarm peers online" + } } } diff --git a/core/http/react-ui/public/locales/en/nav.json b/core/http/react-ui/public/locales/en/nav.json index a899532d4..800fa53e8 100644 --- a/core/http/react-ui/public/locales/en/nav.json +++ b/core/http/react-ui/public/locales/en/nav.json @@ -55,6 +55,7 @@ "nodes": "Nodes", "scheduling": "Scheduling", "swarm": "Swarm", + "cluster": "Cluster", "system": "System", "settings": "Settings", "api": "API", diff --git a/core/http/react-ui/public/locales/es/admin.json b/core/http/react-ui/public/locales/es/admin.json index b1183b24e..1c38ec7ad 100644 --- a/core/http/react-ui/public/locales/es/admin.json +++ b/core/http/react-ui/public/locales/es/admin.json @@ -143,5 +143,21 @@ "explorer": { "title": "Explorador", "subtitle": "Explora archivos y configuración" + }, + "cluster": { + "title": "Clúster", + "subtitle": "Nodos distribuidos y entre pares que sirven a esta instancia", + "empty": "No hay clustering distribuido ni p2p habilitado. Inicia LocalAI en modo distribuido o federado/p2p para gestionar aquí los nodos del clúster.", + "distributed": { + "title": "Distribuido (NATS)" + }, + "swarm": { + "title": "Swarm (p2p)" + }, + "summary": { + "nodes": "Nodos distribuidos", + "inFlight": "Solicitudes en curso", + "peers": "Pares de Swarm en línea" + } } } diff --git a/core/http/react-ui/public/locales/es/nav.json b/core/http/react-ui/public/locales/es/nav.json index 8318fb90a..e2eb3f706 100644 --- a/core/http/react-ui/public/locales/es/nav.json +++ b/core/http/react-ui/public/locales/es/nav.json @@ -53,6 +53,7 @@ "nodes": "Nodos", "scheduling": "Planificación", "swarm": "Swarm", + "cluster": "Clúster", "system": "Sistema", "settings": "Configuración", "api": "API", diff --git a/core/http/react-ui/public/locales/it/admin.json b/core/http/react-ui/public/locales/it/admin.json index 79b185638..00feb038d 100644 --- a/core/http/react-ui/public/locales/it/admin.json +++ b/core/http/react-ui/public/locales/it/admin.json @@ -143,5 +143,21 @@ "explorer": { "title": "Esplora risorse", "subtitle": "Sfoglia file e configurazioni" + }, + "cluster": { + "title": "Cluster", + "subtitle": "Nodi distribuiti e peer-to-peer al servizio di questa istanza", + "empty": "Nessun clustering distribuito o p2p è abilitato. Avvia LocalAI in modalità distribuita o federata/p2p per gestire qui i nodi del cluster.", + "distributed": { + "title": "Distribuito (NATS)" + }, + "swarm": { + "title": "Swarm (p2p)" + }, + "summary": { + "nodes": "Nodi distribuiti", + "inFlight": "Richieste in corso", + "peers": "Peer Swarm online" + } } } diff --git a/core/http/react-ui/public/locales/it/nav.json b/core/http/react-ui/public/locales/it/nav.json index 0c79e29ce..155eb72ae 100644 --- a/core/http/react-ui/public/locales/it/nav.json +++ b/core/http/react-ui/public/locales/it/nav.json @@ -53,6 +53,7 @@ "nodes": "Nodi", "scheduling": "Pianificazione", "swarm": "Swarm", + "cluster": "Cluster", "system": "Sistema", "settings": "Impostazioni", "api": "API", diff --git a/core/http/react-ui/public/locales/zh-CN/admin.json b/core/http/react-ui/public/locales/zh-CN/admin.json index 43b6b10f7..538e410c1 100644 --- a/core/http/react-ui/public/locales/zh-CN/admin.json +++ b/core/http/react-ui/public/locales/zh-CN/admin.json @@ -143,5 +143,21 @@ "explorer": { "title": "资源浏览器", "subtitle": "浏览文件和配置" + }, + "cluster": { + "title": "集群", + "subtitle": "为此实例提供服务的分布式和点对点节点", + "empty": "未启用分布式或 p2p 集群。请以分布式或联邦/p2p 模式启动 LocalAI,以便在此管理集群节点。", + "distributed": { + "title": "分布式 (NATS)" + }, + "swarm": { + "title": "Swarm (p2p)" + }, + "summary": { + "nodes": "分布式节点", + "inFlight": "进行中的请求", + "peers": "在线 Swarm 节点" + } } } diff --git a/core/http/react-ui/public/locales/zh-CN/nav.json b/core/http/react-ui/public/locales/zh-CN/nav.json index 39d7b4eaa..93fefe26e 100644 --- a/core/http/react-ui/public/locales/zh-CN/nav.json +++ b/core/http/react-ui/public/locales/zh-CN/nav.json @@ -53,6 +53,7 @@ "nodes": "节点", "scheduling": "调度", "swarm": "Swarm", + "cluster": "集群", "system": "系统", "settings": "设置", "api": "API", diff --git a/core/http/react-ui/src/components/console/consoleConfig.js b/core/http/react-ui/src/components/console/consoleConfig.js index 482d4cc30..e825c35ec 100644 --- a/core/http/react-ui/src/components/console/consoleConfig.js +++ b/core/http/react-ui/src/components/console/consoleConfig.js @@ -65,9 +65,8 @@ export const operateConsole = { { titleKey: 'operate.cluster', items: [ - { path: '/app/nodes', icon: 'fas fa-network-wired', labelKey: 'items.nodes', adminOnly: true, feature: 'distributed' }, + { path: '/app/cluster', icon: 'fas fa-network-wired', labelKey: 'items.cluster', adminOnly: true }, { path: '/app/scheduling', icon: 'fas fa-calendar-alt', labelKey: 'items.scheduling', adminOnly: true, feature: 'distributed' }, - { path: '/app/p2p', icon: 'fas fa-circle-nodes', labelKey: 'items.swarm', adminOnly: true }, ], }, { diff --git a/core/http/react-ui/src/router.jsx b/core/http/react-ui/src/router.jsx index 47be7e72f..7ca28c1aa 100644 --- a/core/http/react-ui/src/router.jsx +++ b/core/http/react-ui/src/router.jsx @@ -50,7 +50,7 @@ const Backends = page('backends', () => import('./pages/Backends')) const Activity = page('activity', () => import('./pages/Activity')) const Settings = page('settings', () => import('./pages/Settings')) const Traces = page('traces', () => import('./pages/Traces')) -const P2P = page('p2p', () => import('./pages/P2P')) +const Cluster = page('cluster', () => import('./pages/Cluster')) const Agents = page('agents', () => import('./pages/Agents')) const AgentCreate = page(null, () => import('./pages/AgentCreate')) const AgentChat = page(null, () => import('./pages/AgentChat')) @@ -75,7 +75,6 @@ const FaceRecognition = page('face', () => import('./pages/FaceRecognition')) const VoiceRecognition = page('voice', () => import('./pages/VoiceRecognition')) const VoiceLibrary = page('voice-library', () => import('./pages/VoiceLibrary')) const VoiceProfileCreate = page(null, () => import('./pages/VoiceProfileCreate')) -const Nodes = page('nodes', () => import('./pages/Nodes')) const Scheduling = page('scheduling', () => import('./pages/Scheduling')) const NodeBackendLogs = page(null, () => import('./pages/NodeBackendLogs')) const NodeDetail = page(null, () => import('./pages/NodeDetail')) @@ -161,8 +160,9 @@ const appChildren = [ { path: 'settings', element: }, { path: 'traces', element: }, { path: 'backend-logs/:modelId', element: }, - { path: 'p2p', element: }, - { path: 'nodes', element: }, + { path: 'cluster', element: }, + { path: 'p2p', element: }, + { path: 'nodes', element: }, { path: 'nodes/:id', element: }, { path: 'scheduling', element: }, { path: 'node-backend-logs/:nodeId/:modelId', element: },