From cc2bc8dd1871c0fc2c5e52d8141ad9552a5afc64 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 | 12 ++++++++++++ core/http/react-ui/public/locales/de/nav.json | 1 + core/http/react-ui/public/locales/en/admin.json | 12 ++++++++++++ core/http/react-ui/public/locales/en/nav.json | 1 + core/http/react-ui/public/locales/es/admin.json | 12 ++++++++++++ core/http/react-ui/public/locales/es/nav.json | 1 + core/http/react-ui/public/locales/it/admin.json | 12 ++++++++++++ core/http/react-ui/public/locales/it/nav.json | 1 + core/http/react-ui/public/locales/zh-CN/admin.json | 12 ++++++++++++ core/http/react-ui/public/locales/zh-CN/nav.json | 1 + .../react-ui/src/components/console/consoleConfig.js | 3 +-- core/http/react-ui/src/router.jsx | 8 ++++---- 12 files changed, 70 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 edbc982d4..594e77241 100644 --- a/core/http/react-ui/public/locales/de/admin.json +++ b/core/http/react-ui/public/locales/de/admin.json @@ -174,5 +174,17 @@ "host": "Host memory" } } + }, + "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 aba9ebeff..df9ab27ba 100644 --- a/core/http/react-ui/public/locales/de/nav.json +++ b/core/http/react-ui/public/locales/de/nav.json @@ -55,6 +55,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 64102a19c..6b50c31bd 100644 --- a/core/http/react-ui/public/locales/en/admin.json +++ b/core/http/react-ui/public/locales/en/admin.json @@ -197,5 +197,17 @@ "host": "Host memory" } } + }, + "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 a583abea6..3b4c5e977 100644 --- a/core/http/react-ui/public/locales/en/nav.json +++ b/core/http/react-ui/public/locales/en/nav.json @@ -57,6 +57,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 12ab9b5c9..455698cab 100644 --- a/core/http/react-ui/public/locales/es/admin.json +++ b/core/http/react-ui/public/locales/es/admin.json @@ -174,5 +174,17 @@ "host": "Host memory" } } + }, + "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 78794b526..b5c24ea36 100644 --- a/core/http/react-ui/public/locales/es/nav.json +++ b/core/http/react-ui/public/locales/es/nav.json @@ -55,6 +55,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 2bbd98882..bd093077d 100644 --- a/core/http/react-ui/public/locales/it/admin.json +++ b/core/http/react-ui/public/locales/it/admin.json @@ -174,5 +174,17 @@ "host": "Host memory" } } + }, + "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 910dc45a9..a6b8078a1 100644 --- a/core/http/react-ui/public/locales/it/nav.json +++ b/core/http/react-ui/public/locales/it/nav.json @@ -55,6 +55,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 e08a6ea3e..015e8fb44 100644 --- a/core/http/react-ui/public/locales/zh-CN/admin.json +++ b/core/http/react-ui/public/locales/zh-CN/admin.json @@ -174,5 +174,17 @@ "host": "Host memory" } } + }, + "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 265097192..aabb5993a 100644 --- a/core/http/react-ui/public/locales/zh-CN/nav.json +++ b/core/http/react-ui/public/locales/zh-CN/nav.json @@ -55,6 +55,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 e03f3c80b..d4ca14858 100644 --- a/core/http/react-ui/src/components/console/consoleConfig.js +++ b/core/http/react-ui/src/components/console/consoleConfig.js @@ -75,9 +75,8 @@ export const operateConsole = { { titleKey: 'operate.cluster', items: [ - { path: '/app/nodes', icon: 'fas fa-network-wired', labelKey: 'items.nodes', adminOnly: true, feature: 'distributed', signal: 'nodes' }, + { 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 15e4f918f..16e15882b 100644 --- a/core/http/react-ui/src/router.jsx +++ b/core/http/react-ui/src/router.jsx @@ -54,7 +54,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')) @@ -79,7 +79,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')) @@ -171,8 +170,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: },