Bladeren bron

feat(settings): fold integrations into Complementos with external agents section (#1782) (#1783)

Nacho 1 maand geleden
bovenliggende
commit
063dddce9d

+ 5 - 1
app/public/locales/en/translation.json

@@ -1863,7 +1863,11 @@
       "networkGroup": "Network services",
       "rackCaption": "Draw your rack and detect cables. Off by default.",
       "firmwareUpgradesCaption": "Show or hide the firmware upgrades page",
-      "integrationsGroup": "Integrations",
+      "integrationsGroup": "Add-ons",
+      "externalAgents": "External agents",
+      "rtlDesc": "Realtek switches can run rtlplayground, an alternative firmware that turns them into NetPulse agents: flashing guide in",
+      "rtlGuideEs": "Guide in Spanish",
+      "rtlGuideEn": "Guide in English",
       "proxmoxCaption": "Cluster inventory (hypervisors and CTs)",
       "mqttCaption": "Fleet state published to the MQTT broker",
       "mcpCaption": "Read-only queries for AI assistants",

+ 5 - 1
app/public/locales/es/translation.json

@@ -1863,7 +1863,11 @@
       "networkGroup": "Servicios de red",
       "rackCaption": "Dibuja tu rack y detecta los cables. Desactivado por defecto.",
       "firmwareUpgradesCaption": "Muestra u oculta la página de actualizaciones de firmware",
-      "integrationsGroup": "Integraciones",
+      "integrationsGroup": "Complementos",
+      "externalAgents": "Agentes externos",
+      "rtlDesc": "Los switches Realtek pueden llevar rtlplayground, un firmware alternativo que los convierte en agentes de NetPulse: guía de flasheo en",
+      "rtlGuideEs": "Guía en español",
+      "rtlGuideEn": "Guía en inglés",
       "proxmoxCaption": "Inventario del cluster (hipervisores y CTs)",
       "mqttCaption": "Publicación del estado en el broker MQTT",
       "mcpCaption": "Consultas de solo lectura para asistentes de IA",

+ 1 - 2
app/src/App.tsx

@@ -18,7 +18,6 @@ import Reports from '@/pages/Reports'
 import Rack from '@/pages/Rack'
 import Orchestration from '@/pages/Orchestration'
 import FirmwareUpgrades from '@/pages/FirmwareUpgrades'
-import Integrations from '@/pages/Integrations'
 import Settings from '@/pages/Settings'
 import Help from '@/pages/Help'
 import Placeholder from '@/pages/Placeholder'
@@ -61,7 +60,7 @@ export default function App() {
         <Route path="roaming" element={<Roaming />} />
         <Route path="wifi/channel-plan" element={<ChannelPlan />} />
         <Route path="firmware-upgrades" element={<FirmwareUpgrades />} />
-        <Route path="integrations" element={<Integrations />} />
+        <Route path="integrations" element={<Navigate to="/settings" replace />} />
         <Route path="reports" element={<Reports />} />
         <Route path="orchestration" element={<Orchestration />} />
         <Route path="help" element={<Help />} />

+ 0 - 3
app/src/components/Layout.tsx

@@ -12,7 +12,6 @@ import {
   BarChart3,
   Bell,
   Bug,
-  Cable,
   ChevronsLeft,
   ChevronsRight,
   Cpu,
@@ -61,7 +60,6 @@ const NAV_ITEMS: NavItem[] = [
   { to: '/roaming', labelKey: 'nav.roaming', icon: Wifi },
   { to: '/wifi/channel-plan', labelKey: 'nav.channelPlan', icon: RadioTower },
   { to: '/firmware-upgrades', labelKey: 'nav.firmwareUpgrades', icon: Cpu, adminOnly: true },
-  { to: '/integrations', labelKey: 'nav.integrations', icon: Cable, adminOnly: true },
   { to: '/alerts', labelKey: 'nav.alerts', icon: Bell },
   { to: '/reports', labelKey: 'nav.reports', icon: BarChart3 },
   { to: '/orchestration', labelKey: 'nav.orchestration', icon: Wrench, adminOnly: true, badge: 'labs' },
@@ -96,7 +94,6 @@ const PAGE_TITLE_KEYS: [RegExp, string][] = [
   [/^\/roaming/, 'nav.roaming'],
   [/^\/wifi\/channel-plan/, 'nav.channelPlan'],
   [/^\/firmware-upgrades/, 'nav.firmwareUpgrades'],
-  [/^\/integrations/, 'nav.integrations'],
   [/^\/alerts/, 'nav.alerts'],
   [/^\/reports/, 'nav.reports'],
   [/^\/orchestration/, 'nav.orchestration'],

+ 15 - 0
app/src/pages/Settings.tsx

@@ -49,6 +49,7 @@ import {
   CalendarClock,
 } from 'lucide-react'
 import type { LucideIcon } from 'lucide-react'
+import Integrations from './Integrations'
 import { findAgentFor, type AgentKeys } from '@/lib/agentMatch'
 import { HealthRing } from '@/components/HealthRing'
 import { KnownMacsManager } from '@/components/KnownMacsManager'
@@ -4210,6 +4211,20 @@ function NotifChannels({ onSaved, disabled = false }: { onSaved: () => void; dis
             }}
           />
         ))}
+
+        {/* #1782: agentes externos plegados dentro de Ajustes (grupo Complementos). */}
+        <div className="mt-10">
+          <div className="mb-3 text-[11px] font-medium uppercase tracking-wide text-text-muted">
+            {t('settings.services.externalAgents')}
+          </div>
+          <p className="mb-3 text-[13px] text-text-muted">
+            {t('settings.services.rtlDesc')}{' '}
+            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/AGENTE-RTL-SWITCH.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEs')}</a>
+            {' · '}
+            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/RTL-SWITCH-BEACON.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEn')}</a>
+          </p>
+          <Integrations />
+        </div>
       <Dialog open={dialog === 'ntfy'} onOpenChange={(o) => { if (!o) setDialog(null) }}>
         <DialogContent className={integrationDialogCls} aria-describedby={undefined}>
           <DialogHeader>