Просмотр исходного кода

feat: Proxmox detect button and fleet terminology (#1027)

* feat(settings): add Detect button to the Proxmox manager

POST /api/config/proxmox/detect already scans the fleet subnets for PVE
hosts but had no UI. The Proxmox card now has a Detect button next to
Add instance: with one host it pre-fills the new-instance form with
https://<host>:8006, with several it pre-fills the first and lists all
of them in the note, and with none it says so. Spinner while scanning.

* feat(i18n): fleet terminology for network gear, clients for connected devices

Routers, switches and APs are the fleet (es "flota"/"equipo", en
"fleet"/"unit"); connected devices are clients. Renames the routers
page nav label, the Settings section, command palette group, table
columns, dialogs and hints that called fleet members "devices", and
unifies the few spots that called connected clients "devices" where
the rest of the app says clients. Help flows updated to the new
section and button names. The /devices page keys and the unknown-device
alert naming stay as they are (client domain).
Nacho 2 месяцев назад
Родитель
Сommit
f8138e1f0c
3 измененных файлов с 147 добавлено и 86 удалено
  1. 45 40
      app/public/locales/en/translation.json
  2. 38 33
      app/public/locales/es/translation.json
  3. 64 13
      app/src/pages/Settings.tsx

+ 45 - 40
app/public/locales/en/translation.json

@@ -61,7 +61,7 @@
     "categoryDescriptions": {
       "router": "Router status, temperature and reboots",
       "internet": "WAN outages and recoveries",
-      "clients": "Devices joining the network (known and unknown)",
+      "clients": "Clients joining the network (known and unknown)",
       "signal": "Weak WiFi coverage on clients and nodes",
       "vpn": "WireGuard handshakes and sessions",
       "system": "Firmware, backups and services (AdGuard, NAS)"
@@ -76,7 +76,7 @@
       "agent-down-ssh": "Check the router's power and connection; if it doesn't recover, reinstall the agent from LuCI.",
       "agent-outdated": "Update the agent from Settings, Agents (Update button); if it's a NetGrip panel, update it from its own panel.",
       "degraded-link": "Check the cable and connectors: a degraded link is often a sign of a damaged cable or a loose connector.",
-      "device-offline": "Verify the device power and network cable.",
+      "device-offline": "Verify the unit's power and network cable.",
       "firmware-outdated": "Your router has newer firmware available; check Firmware upgrades (Labs) or LuCI.",
       "gateway-unreachable": "Check the connection between the gateway and the rest of the network.",
       "ghost-port": "Check the cable and the connected device: an active port that goes silent usually means a loose cable or a powered-off device.",
@@ -86,8 +86,8 @@
       "uplink-switched": "Check the line that dropped: the router goes back to it on its own once it recovers.",
       "wan-down": "Check the modem/ONT and contact your ISP if the outage persists.",
       "wan-slow": "Restart the router and the modem/ONT and run the test again; if it stays low, contact your ISP (line degradation or congestion in your area).",
-      "wifi-weak": "Move the device closer to an access point or relocate the AP.",
-      "snmp-failing": "Check the SNMP community string and switch port: the device answers ping but not polling."
+      "wifi-weak": "Move the client closer to an access point or relocate the AP.",
+      "snmp-failing": "Check the SNMP community string and switch port: the unit answers ping but not polling."
     },
     "types": {
       "agent-down": {
@@ -275,8 +275,8 @@
   "command": {
     "empty": "No results.",
     "pages": "Pages",
-    "placeholder": "Jump to a page, router or device…",
-    "routers": "Devices"
+    "placeholder": "Jump to a page or unit…",
+    "routers": "Fleet"
   },
   "common": {
     "ago": {
@@ -554,7 +554,7 @@
     "statusPhrase": "All good, although the Patio is running a bit hot (71 °C).",
     "topDevices": {
       "summary": "{{total}} total · {{newToday}} new today",
-      "title": "Most active devices"
+      "title": "Most active clients"
     },
     "traffic": {
       "average": "Average",
@@ -601,8 +601,8 @@
     "overview": "Overview",
     "reports": "Reports",
     "roaming": "WiFi roaming",
-    "routerDetail": "Device detail",
-    "routers": "Devices",
+    "routerDetail": "Unit detail",
+    "routers": "Fleet",
     "settings": "Settings",
     "settingsDesc": "Theme, units and installation",
     "theme": "Theme",
@@ -665,7 +665,7 @@
       "colFtMode": "FT mode",
       "colAuth": "Authentication",
       "colRouters": "Interfaces",
-      "colRouter": "Device",
+      "colRouter": "Unit",
       "colIface": "Interface",
       "colSsidR": "SSID",
       "colBandCh": "Band · channel",
@@ -737,7 +737,7 @@
       "error": "Could not compute re-anchor. Check that usteer or DAWN are active and reachable.",
       "noApi": "Available only with a live backend.",
       "empty": "No clients are stuck on a clearly worse AP. The network looks balanced.",
-      "hint": "Devices that ignore 802.11v won't obey the daemon's suggestions. This panel suggests a better AP and forces disconnection with del_client + ban_time; the client decides where to re-associate.",
+      "hint": "Clients that ignore 802.11v won't obey the daemon's suggestions. This panel suggests a better AP and forces disconnection with del_client + ban_time; the client decides where to re-associate.",
       "source": "Data from {{daemon}}",
       "colClient": "Client",
       "colCurrent": "Current AP",
@@ -785,7 +785,7 @@
       "viewAllClients": "View all clients",
       "colClient": "Client"
     },
-    "highTempAdvice": "Improve the device's ventilation.",
+    "highTempAdvice": "Improve the unit's ventilation.",
     "highTempBanner": "High temperature: {{temp}} (threshold {{threshold}}).",
     "info": {
       "access": "Access",
@@ -807,9 +807,9 @@
       "toHost": "to {{host}}"
     },
     "notFound": "Router not found",
-    "notFoundDesc": "There is no device with the identifier \"{{id}}\".",
+    "notFoundDesc": "There is no unit with the identifier \"{{id}}\".",
     "hostKeyTitle": "SSH host key changed",
-    "hostKeyBody": "The SSH host key presented by this device no longer matches the recorded one. To protect against a man-in-the-middle attack, NetPulse has blocked the connection. If you just reinstalled or flashed the device, confirm the new key to reconnect.",
+    "hostKeyBody": "The SSH host key presented by this unit no longer matches the recorded one. To protect against a man-in-the-middle attack, NetPulse has blocked the connection. If you just reinstalled or flashed the unit, confirm the new key to reconnect.",
     "hostKeyConfirm": "Confirm new key",
     "hostKeyBusy": "Confirming…",
     "hostKeyDone": "Key accepted: reconnecting…",
@@ -820,7 +820,7 @@
       "ramUsed": "{{used}} MB used of {{total}} MB",
       "tableCaption": "Performance data ({{range}})",
       "unavailableTitle": "No system metrics",
-      "unavailableBody": "This device is monitored through SNMP or a beacon pusher (managed switch): it does not report CPU, RAM or temperature, so there are no charts to show."
+      "unavailableBody": "This unit is monitored through SNMP or a beacon pusher (managed switch): it does not report CPU, RAM or temperature, so there are no charts to show."
     },
     "performance": "Performance",
     "performanceRange": "Performance range",
@@ -910,7 +910,7 @@
       "metered": "Pay per use",
       "viaPort": "port {{port}}",
       "noAddress": "No address",
-      "stickyNote": "Each device stays on one connection at a time, so from a single computer you see one address, not a mix.",
+      "stickyNote": "Each client stays on one connection at a time, so from a single computer you see one address, not a mix.",
       "source": "Configured in this router's own panel. NetPulse only shows it."
     },
     "wireguard": {
@@ -937,7 +937,7 @@
       "rearmFail": "Could not rearm",
       "rearmFailNoAgent": "No agent registered",
       "rearmFailNoRouter": "No router with that slug in the table",
-      "rearmFailNotOpenwrt": "This device does not use the OpenWrt agent",
+      "rearmFailNotOpenwrt": "This unit does not use the OpenWrt agent",
       "rearmFailNetgrip": "Managed by NetGrip: restart it from the panel",
       "rearmFailNoSSH": "No SSH access to the router",
       "rearmFailCooldown": "Recently rearmed; wait a moment",
@@ -970,7 +970,7 @@
     },
     "colClients": "Clients",
     "colCpu": "CPU",
-    "colDevice": "Device",
+    "colDevice": "Unit",
     "colRam": "RAM",
     "colStatus": "Status",
     "colTemp": "Temp",
@@ -1008,7 +1008,7 @@
     "agents": {
       "subtitle": "{{total}} agent(s) · {{down}} not reporting",
       "empty": "No registered agents.",
-      "colDevice": "Device",
+      "colDevice": "Unit",
       "colStatus": "Status",
       "colLastSeen": "Last push",
       "colVersion": "Version",
@@ -1065,7 +1065,7 @@
     },
     "upgradeUpdatedDetail": "Updated · {{count}} steps · {{secs}} s",
     "noVitals": "No system metrics",
-    "noVitalsTip": "Monitored through SNMP or a beacon: this device does not report CPU, RAM or temperature"
+    "noVitalsTip": "Monitored through SNMP or a beacon: this unit does not report CPU, RAM or temperature"
   },
   "reports": {
     "availability": "Availability per router",
@@ -1104,8 +1104,8 @@
     "internetAria": "Internet, {{isp}}, fiber {{plan}}",
     "labels": "Labels",
     "edit": "Edit",
-    "editHint": "Edit the layout: drag routers and devices to adjust spacing. When saved, positions stay fixed and no longer reorder.",
-    "editBanner": "Edit mode: drag routers and devices to adjust the map",
+    "editHint": "Edit the layout: drag routers and clients to adjust spacing. When saved, positions stay fixed and no longer reorder.",
+    "editBanner": "Edit mode: drag routers and clients to adjust the map",
     "editSave": "Save",
     "editReset": "Reset to automatic layout",
     "legend": {
@@ -1117,7 +1117,7 @@
       "title": "Legend",
       "wired": "Wired",
       "wgTunnel": "WireGuard tunnel",
-      "wiredLink": "Physical cable (WAN, uplinks, devices)",
+      "wiredLink": "Physical cable (WAN, uplinks, units)",
       "wifiUplink": "WiFi uplink (wireless backhaul)",
       "lldpIdentified": "Identified via LLDP",
       "inferredSwitch": "Inferred switch or bridge (no IP)",
@@ -1134,7 +1134,7 @@
       "managedSwitch": "Managed switch",
       "managedAp": "Access point",
       "throughput": "Link throughput",
-      "title": "Links between devices",
+      "title": "Links between units",
       "wifiUplink": "WiFi uplink"
     },
     "mapAria": "Network map: Internet connected to the Flint 2 Gateway, three access points (Living Room, Study and Patio) with their clients, and two active WireGuard tunnels.",
@@ -1240,7 +1240,7 @@
       "visitWeb": "Visit website",
       "starGithub": "Star us on GitHub",
       "reportIssue": "Report a problem",
-      "desc": "Network control panel for OpenWRT devices. Monitors routers and APs, and applies explicit admin actions (reservations, blocks, orchestration, firmware) with snapshot and rollback.",
+      "desc": "Network control panel for your OpenWrt fleet. Monitors routers and APs, and applies explicit admin actions (reservations, blocks, orchestration, firmware) with snapshot and rollback.",
       "privacy": "100% private · 0% cloud",
       "title": "About",
       "versionNote": "v1.0.0",
@@ -1308,15 +1308,15 @@
       "latencyLabel": "WAN latency",
       "paused": "Paused",
       "refresh": "Interface refresh",
-      "signalCaption_one": "1 device below the threshold (drives the weak-signal alert)",
-      "signalCaption_other": "{{count}} devices below the threshold (drives the weak-signal alert)",
-      "signalCaptionNone": "No devices below the threshold",
+      "signalCaption_one": "1 client below the threshold (drives the weak-signal alert)",
+      "signalCaption_other": "{{count}} clients below the threshold (drives the weak-signal alert)",
+      "signalCaptionNone": "No clients below the threshold",
       "simHealth": "Simulated health",
       "simHealthAria": "Simulated health with your thresholds: {{score}} of 100",
       "tempCaptionHot": "{{name}} is at {{temp}} °C → alert active",
       "tempCaptionOk": "{{name}} is at {{temp}} °C → within the limit",
       "tempLabel": "Warning temperature",
-      "tempNote": "The high-temperature threshold is set per router in \"Devices\" (65 °C by default).",
+      "tempNote": "The high-temperature threshold is set per router in \"Fleet\" (65 °C by default).",
       "title": "Data & thresholds",
       "units": "Traffic",
       "unitsTitle": "Measurement units",
@@ -1352,7 +1352,7 @@
       "badgeCaption": "Counter next to \"Alerts\"",
       "caption": "In-app notices and push on this device",
       "ntfyCaption": "Push notifications via ntfy",
-      "pulse": "Pulsing dot on devices with warnings",
+      "pulse": "Pulsing dot on units with warnings",
       "pulseCaption": "Animated dot on cards with warn",
       "sound": "Sound when an alert arrives",
       "soundOff": "Off",
@@ -1409,7 +1409,7 @@
     "reduceMotion": "Animations enabled",
     "reduceMotionCaption": "Disables pulses, tweens and staggered entrances",
     "routers": {
-      "title": "Devices",
+      "title": "Fleet",
       "caption": "The gateway is auto-detected on boot; add the rest manually",
       "empty": "No routers configured yet. The gateway is auto-detected when the server boots; if it's missing, add it here.",
       "host": "IP or hostname",
@@ -1417,9 +1417,9 @@
       "role": "Role",
       "actions": "Actions",
       "regenerateToken": "Regenerate token",
-      "rotateTokenTitle": "Regenerate device token?",
+      "rotateTokenTitle": "Regenerate unit token?",
       "rotateTokenCaption": "A new token will be generated for “{{name}}”. The current one will stop working immediately; you'll need to reinstall the agent with the new token. This cannot be undone.",
-      "rotateTokenHotApplied": "Token regenerated and applied to the device without reinstalling.",
+      "rotateTokenHotApplied": "Token regenerated and applied to the unit without reinstalling.",
       "rotateTokenManualNeeded": "Token regenerated. The server could not apply it to the agent; reinstall the agent to use the new token.",
       "rotateTokenSavedNoAgent": "Token regenerated and saved. It will be applied when the agent is installed or recovers.",
       "rotateTokenNetgrip": "Token regenerated and saved. NetGrip manages its agent from the panel; the token will be applied when reinstalled from there.",
@@ -1427,11 +1427,11 @@
       "gateway": "Is the gateway",
       "gatewayBadge": "Main",
       "add": "Add",
-      "addDevice": "Add device",
+      "addDevice": "Add unit",
       "adding": "Adding…",
       "delete": "Delete",
       "deleteConfirm": "Delete {name}? Metrics history is kept.",
-      "deleteTitle": "Delete device?",
+      "deleteTitle": "Delete unit?",
       "deleteDesc": "It will be removed from the configuration. Historical metrics are kept.",
       "errorDuplicate": "A router with that IP already exists",
       "errorGeneric": "Could not save. Please try again.",
@@ -1712,6 +1712,11 @@
       "test": "Test",
       "testOk": "Connected: Proxmox {{version}} · {{nodes}} node(s), {{vms}} VM(s), {{cts}} CT(s)",
       "testLimited": "The token authenticates but cannot see any guest: Proxmox returns the lists empty when the token lacks audit rights. Grant it PVEAuditor on \"/\" — on the Proxmox host: pveum acl modify / --tokens 'USER@REALM!TOKEN' --roles PVEAuditor. A token with privilege separation needs the permission itself, not just its user.",
+      "detect": "Detect",
+      "detecting": "Detecting…",
+      "detectFound": "Proxmox server detected at {{host}} - fill in the token and save",
+      "detectFoundMany": "Proxmox servers detected: {{hosts}} - the first one has been pre-filled",
+      "detectNotFound": "No Proxmox servers found on the fleet network",
       "hintShort": "Read-only API: the token needs the Sys.Audit and VM.Audit permissions. The steps to create it are on the Help page."
     },
     "sections": {
@@ -2309,10 +2314,10 @@
       },
       "addRouter": {
         "title": "Onboard a router or switch",
-        "subtitle": "Add a device to the fleet",
-        "intro": "Devices are managed from Settings, not from the devices page: onboarding, editing and network discovery live there.",
+        "subtitle": "Add a unit to the fleet",
+        "intro": "Fleet units are managed from Settings, not from the fleet page: onboarding, editing and network discovery live there.",
         "steps": [
-          "Go to ⟦Settings⟧ → the ⟦Devices⟧ section and click ⟦Add device⟧.",
+          "Go to ⟦Settings⟧ → the ⟦Fleet⟧ section and click ⟦Add unit⟧.",
           "Fill in IP or hostname, name and type. Tick ⟦Is the gateway⟧ for the gateway; pick the matching type for managed switches.",
           "For the server to poll over SSH, authorize its key: copy it from ⟦Server SSH key⟧ and install it on the router.",
           "You can also click ⟦Discover on the network⟧ to detect candidates automatically."
@@ -2324,7 +2329,7 @@
         "subtitle": "The recommended path for complete data",
         "intro": "The agent probes the router locally (WiFi, DHCP, FDB, LLDP) and pushes the data to the server; without it the client list stays empty.",
         "steps": [
-          "Go to ⟦Devices⟧ and scroll to the ⟦Agents⟧ section: every OpenWrt router has a row, agent or not.",
+          "Go to ⟦Fleet⟧ and scroll to the ⟦Agents⟧ section: every OpenWrt router has a row, agent or not.",
           "Click ⟦Install agent⟧ on the router's row: it registers the token and deploys over SSH (binary, config, service and watchdog) in one click if the SSH key is already authorized.",
           "Within seconds the router shows as online in that same table. ⟦Reinstall⟧ repeats the whole process and is what keeps the agent alive across firmware upgrades.",
           "Manual path, or a version without the button? ⟦Settings⟧ → ⟦Agent adoption⟧ → ⟦Show token⟧, then run install-agent.sh with --pairing-token from a machine with SSH access to the router."
@@ -2357,7 +2362,7 @@
       "proxmoxToken": {
         "title": "Connect a Proxmox cluster",
         "subtitle": "Create the read-only API token the integration asks for",
-        "intro": "The Proxmox integration seals each host as a hypervisor and hangs its CTs and VMs under it in ⟦Devices⟧, with real names and IPs. It only needs read access: an API token with audit permissions.",
+        "intro": "The Proxmox integration seals each host as a hypervisor and hangs its CTs and VMs under it in ⟦Fleet⟧, with real names and IPs. It only needs read access: an API token with audit permissions.",
         "steps": [
           "In the Proxmox web UI go to ⟦Datacenter⟧ → ⟦Permissions⟧ → ⟦API Tokens⟧ and create a token for the user of your choice (e.g. root@pam!netpulse).",
           "Grant audit permissions: under ⟦Permissions⟧ → ⟦Add⟧ assign the PVEAuditor role on path / to the token (if the token has privilege separation, the permission must belong to the token itself - the user's own is not enough).",

+ 38 - 33
app/public/locales/es/translation.json

@@ -61,7 +61,7 @@
     "categoryDescriptions": {
       "router": "Estado, temperatura y reinicios de los routers",
       "internet": "Cortes y recuperaciones de la conexión WAN",
-      "clients": "Dispositivos que se unen a la red (conocidos y desconocidos)",
+      "clients": "Clientes que se unen a la red (conocidos y desconocidos)",
       "signal": "Cobertura WiFi débil en clientes y nodos",
       "vpn": "Handshakes y sesiones de WireGuard",
       "system": "Firmware, copias de seguridad y servicios (AdGuard, NAS)"
@@ -86,7 +86,7 @@
       "uplink-switched": "Revisa la línea que se ha caído: el router volverá a ella solo cuando se recupere.",
       "wan-down": "Comprueba el módem/ONT y contacta con tu operador si la caída persiste.",
       "wan-slow": "Reinicia el router y el módem/ONT y repite el test; si sigue bajo, contacta con tu operador (degrada la línea o hay saturación en tu área).",
-      "wifi-weak": "Acerca el dispositivo a un punto de acceso o reubica el AP.",
+      "wifi-weak": "Acerca el cliente a un punto de acceso o reubica el AP.",
       "snmp-failing": "Revisa la community SNMP y el puerto del switch: el equipo responde a ping pero no al sondeo."
     },
     "types": {
@@ -275,8 +275,8 @@
   "command": {
     "empty": "Sin resultados.",
     "pages": "Páginas",
-    "placeholder": "Saltar a una página, router o dispositivo…",
-    "routers": "Dispositivos"
+    "placeholder": "Saltar a una página o equipo…",
+    "routers": "Flota"
   },
   "common": {
     "ago": {
@@ -554,7 +554,7 @@
     "statusPhrase": "Todo va bien, aunque el Patio está algo caliente (71 °C).",
     "topDevices": {
       "summary": "{{total}} en total · {{newToday}} nuevos hoy",
-      "title": "Dispositivos más activos"
+      "title": "Clientes más activos"
     },
     "traffic": {
       "average": "Media",
@@ -601,8 +601,8 @@
     "overview": "Resumen",
     "reports": "Informes",
     "roaming": "Itinerancia WiFi",
-    "routerDetail": "Detalle del dispositivo",
-    "routers": "Dispositivos",
+    "routerDetail": "Detalle del equipo",
+    "routers": "Flota",
     "settings": "Ajustes",
     "settingsDesc": "Tema, unidades e instalación",
     "theme": "Tema",
@@ -665,7 +665,7 @@
       "colFtMode": "Modo FT",
       "colAuth": "Autenticación",
       "colRouters": "Interfaces",
-      "colRouter": "Dispositivo",
+      "colRouter": "Equipo",
       "colIface": "Interfaz",
       "colSsidR": "SSID",
       "colBandCh": "Banda · canal",
@@ -737,7 +737,7 @@
       "error": "No se pudo calcular el re-anclaje. Comprueba que usteer o DAWN están activos y accesibles.",
       "noApi": "Disponible solo con backend en vivo.",
       "empty": "No hay clientes anclados en un AP claramente peor. La red está bien repartida.",
-      "hint": "Los dispositivos que ignoran 802.11v no obedecen las sugerencias del daemon. Aquí se sugiere un AP mejor y se fuerza la desconexión con del_client + ban_time; el cliente decide a dónde reasociarse.",
+      "hint": "Los clientes que ignoran 802.11v no obedecen las sugerencias del daemon. Aquí se sugiere un AP mejor y se fuerza la desconexión con del_client + ban_time; el cliente decide a dónde reasociarse.",
       "source": "Datos de {{daemon}}",
       "colClient": "Cliente",
       "colCurrent": "AP actual",
@@ -820,7 +820,7 @@
       "ramUsed": "{{used}} MB usados de {{total}} MB",
       "tableCaption": "Datos de rendimiento ({{range}})",
       "unavailableTitle": "Sin métricas de sistema",
-      "unavailableBody": "Este dispositivo se monitoriza por SNMP o beacon (switch gestionado): no reporta CPU, RAM ni temperatura, así que no hay gráficas que mostrar."
+      "unavailableBody": "Este equipo se monitoriza por SNMP o beacon (switch gestionado): no reporta CPU, RAM ni temperatura, así que no hay gráficas que mostrar."
     },
     "performance": "Rendimiento",
     "performanceRange": "Rango de rendimiento",
@@ -910,7 +910,7 @@
       "metered": "De pago por uso",
       "viaPort": "puerto {{port}}",
       "noAddress": "Sin dirección",
-      "stickyNote": "Cada equipo se queda en una sola conexión cada vez, así que desde un mismo ordenador verás una dirección, no una mezcla.",
+      "stickyNote": "Cada cliente se queda en una sola conexión cada vez, así que desde un mismo ordenador verás una dirección, no una mezcla.",
       "source": "Se configura en el panel del propio router. NetPulse solo lo muestra."
     },
     "wireguard": {
@@ -937,7 +937,7 @@
       "rearmFail": "No se pudo rearmar",
       "rearmFailNoAgent": "No hay agente registrado",
       "rearmFailNoRouter": "No hay router con ese slug en la tabla",
-      "rearmFailNotOpenwrt": "Este dispositivo no usa el agente OpenWrt",
+      "rearmFailNotOpenwrt": "Este equipo no usa el agente OpenWrt",
       "rearmFailNetgrip": "Gestionado por NetGrip: reinícialo desde el panel",
       "rearmFailNoSSH": "Sin acceso SSH al router",
       "rearmFailCooldown": "Recién rearmado; espera un momento",
@@ -1065,7 +1065,7 @@
     },
     "upgradeUpdatedDetail": "Actualizado · {{count}} pasos · {{secs}} s",
     "noVitals": "Sin métricas de sistema",
-    "noVitalsTip": "Monitorizado por SNMP o beacon: este dispositivo no reporta CPU, RAM ni temperatura"
+    "noVitalsTip": "Monitorizado por SNMP o beacon: este equipo no reporta CPU, RAM ni temperatura"
   },
   "reports": {
     "availability": "Disponibilidad por router",
@@ -1104,8 +1104,8 @@
     "internetAria": "Internet, {{isp}}, fibra {{plan}}",
     "labels": "Etiquetas",
     "edit": "Editar",
-    "editHint": "Edita el layout: arrastra los routers y dispositivos para ajustar las distancias. Al guardar, las posiciones quedan fijas y no se reordenan.",
-    "editBanner": "Modo edición: arrastra los routers y dispositivos para ajustar el mapa",
+    "editHint": "Edita el layout: arrastra los routers y clientes para ajustar las distancias. Al guardar, las posiciones quedan fijas y no se reordenan.",
+    "editBanner": "Modo edición: arrastra los routers y clientes para ajustar el mapa",
     "editSave": "Guardar",
     "editReset": "Restablecer layout automático",
     "legend": {
@@ -1240,7 +1240,7 @@
       "visitWeb": "Visitar web",
       "starGithub": "Danos una estrella en GitHub",
       "reportIssue": "Informar de un problema",
-      "desc": "Panel de control de red para dispositivos OpenWRT. Monitoriza routers y APs y aplica acciones explícitas del admin (reservas, bloqueos, orquestación, firmware) con snapshot y rollback.",
+      "desc": "Panel de control de red para tu flota OpenWrt. Monitoriza routers y APs y aplica acciones explícitas del admin (reservas, bloqueos, orquestación, firmware) con snapshot y rollback.",
       "privacy": "100% privado · 0% nube",
       "title": "Acerca de",
       "versionNote": "v1.0.0",
@@ -1308,15 +1308,15 @@
       "latencyLabel": "Latencia WAN",
       "paused": "Pausado",
       "refresh": "Refresco de la interfaz",
-      "signalCaption_one": "1 dispositivo por debajo del umbral (dispara la alerta de señal débil)",
-      "signalCaption_other": "{{count}} dispositivos por debajo del umbral (dispara la alerta de señal débil)",
-      "signalCaptionNone": "Ningún dispositivo por debajo del umbral",
+      "signalCaption_one": "1 cliente por debajo del umbral (dispara la alerta de señal débil)",
+      "signalCaption_other": "{{count}} clientes por debajo del umbral (dispara la alerta de señal débil)",
+      "signalCaptionNone": "Ningún cliente por debajo del umbral",
       "simHealth": "Salud simulada",
       "simHealthAria": "Salud simulada con tus umbrales: {{score}} de 100",
       "tempCaptionHot": "{{name}} está a {{temp}} °C → aviso activo",
       "tempCaptionOk": "{{name}} está a {{temp}} °C → dentro del límite",
       "tempLabel": "Temperatura de aviso",
-      "tempNote": "El umbral de temperatura alta se configura por router en «Dispositivos» (65 °C por defecto).",
+      "tempNote": "El umbral de temperatura alta se configura por router en «Flota» (65 °C por defecto).",
       "title": "Datos y umbrales",
       "units": "Tráfico",
       "unitsTitle": "Unidades de medida",
@@ -1409,7 +1409,7 @@
     "reduceMotion": "Animaciones activadas",
     "reduceMotionCaption": "Desactiva pulsos, tweens y entradas escalonadas",
     "routers": {
-      "title": "Dispositivos",
+      "title": "Flota",
       "caption": "La puerta de enlace se autodetecta en el arranque; añade el resto a mano",
       "empty": "Sin routers configurados todavía. La puerta de enlace se autodetecta al arrancar el servidor; si no aparece, añádela aquí.",
       "host": "IP o hostname",
@@ -1417,9 +1417,9 @@
       "role": "Rol",
       "actions": "Acciones",
       "regenerateToken": "Regenerar token",
-      "rotateTokenTitle": "¿Regenerar el token del dispositivo?",
+      "rotateTokenTitle": "¿Regenerar el token del equipo?",
       "rotateTokenCaption": "Se generará un token nuevo para «{{name}}». El actual dejará de funcionar de inmediato; deberás reinstalar el agente con el nuevo token. No se puede deshacer.",
-      "rotateTokenHotApplied": "Token regenerado y aplicado al dispositivo sin reinstalar.",
+      "rotateTokenHotApplied": "Token regenerado y aplicado al equipo sin reinstalar.",
       "rotateTokenManualNeeded": "Token regenerado. El servidor no pudo aplicarlo en el agente; reinstala el agente para que use el token nuevo.",
       "rotateTokenSavedNoAgent": "Token regenerado y guardado. Se aplicará al agente cuando se instale o se recupere.",
       "rotateTokenNetgrip": "Token regenerado y guardado. NetGrip gestiona su agente desde el panel; el token se aplicará al reinstalarlo desde allí.",
@@ -1427,11 +1427,11 @@
       "gateway": "Es la puerta de enlace",
       "gatewayBadge": "Principal",
       "add": "Añadir",
-      "addDevice": "Añadir dispositivo",
+      "addDevice": "Añadir equipo",
       "adding": "Añadiendo…",
       "delete": "Eliminar",
       "deleteConfirm": "¿Eliminar {name}? El histórico de métricas se conserva.",
-      "deleteTitle": "¿Eliminar dispositivo?",
+      "deleteTitle": "¿Eliminar equipo?",
       "deleteDesc": "Se quitará de la configuración. Las métricas históricas se conservan.",
       "errorDuplicate": "Ya existe un router con esa IP",
       "errorGeneric": "No se pudo guardar. Inténtalo de nuevo.",
@@ -1712,6 +1712,11 @@
       "test": "Probar",
       "testOk": "Conectado: Proxmox {{version}} · {{nodes}} nodo(s), {{vms}} VM(s), {{cts}} CT(s)",
       "testLimited": "El token autentica pero no ve ningún invitado: Proxmox devuelve las listas vacías cuando al token le faltan permisos de auditoría. Dale PVEAuditor en \"/\" — en el host Proxmox: pveum acl modify / --tokens 'USUARIO@REALM!TOKEN' --roles PVEAuditor. Un token con separación de privilegios necesita el permiso él mismo, no basta con el de su usuario.",
+      "detect": "Detectar",
+      "detecting": "Detectando…",
+      "detectFound": "Servidor Proxmox detectado en {{host}} - completa el token y guarda",
+      "detectFoundMany": "Servidores Proxmox detectados: {{hosts}} - se ha pre-rellenado el primero",
+      "detectNotFound": "No se encontraron servidores Proxmox en la red de la flota",
       "hintShort": "API de solo lectura: el token necesita los permisos Sys.Audit y VM.Audit. Los pasos para crearlo están en la página de Ayuda."
     },
     "sections": {
@@ -1936,13 +1941,13 @@
   "channelPlan": {
     "title": "Plan de canales WiFi",
     "subtitle": "Recomendaciones de canal a partir de scans de vecinos.",
-    "router": "Dispositivo",
+    "router": "Equipo",
     "band": "Banda",
     "currentChannel": "Canal actual",
     "recommendedChannel": "Canal recomendado",
     "neighbors": "APs vecinos",
     "noScans": "Sin escaneos recientes para este router. Los routers que corren NetGrip (la puerta de enlace, los APs gestionados por su panel) no escanean vecinos; los que llevan el agente NetPulse sí. Selecciona otro router de la lista (p. ej. rt2 o rt4) para ver su plan.",
-    "noRadios": "Este dispositivo no reporta radios WiFi.",
+    "noRadios": "Este equipo no reporta radios WiFi.",
     "apply": "Aplicar canal",
     "gateway": " (Puerta de enlace)",
     "signal": "Señal",
@@ -1960,7 +1965,7 @@
   },
   "firmwareUpgrades": {
     "title": "Actualizaciones de firmware",
-    "subtitle": "Programa actualizaciones de firmware OpenWrt y sigue el progreso por dispositivo.",
+    "subtitle": "Programa actualizaciones de firmware OpenWrt y sigue el progreso por equipo.",
     "currentVersion": "Versión actual",
     "targetVersion": "Versión objetivo",
     "model": "Modelo / target",
@@ -1968,7 +1973,7 @@
     "checksum": "Checksum SHA256",
     "upgrade": "Actualizar ahora",
     "inProgress": "En progreso",
-    "empty": "No hay dispositivos configurados para actualizar firmware.",
+    "empty": "No hay equipos configurados para actualizar firmware.",
     "confirmTitle": "Confirmar actualización de firmware",
     "confirmReboot": "Se guardará una copia de la configuración antes de flashear y el router se reiniciará al terminar.",
     "confirmRouter": "Router",
@@ -2310,9 +2315,9 @@
       "addRouter": {
         "title": "Dar de alta un router o switch",
         "subtitle": "Añadir un equipo a la flota",
-        "intro": "Los equipos se gestionan desde Ajustes, no desde la página de dispositivos: ahí viven el alta, la edición y el descubrimiento de la red.",
+        "intro": "Los equipos se gestionan desde Ajustes, no desde la página de la flota: ahí viven el alta, la edición y el descubrimiento de la red.",
         "steps": [
-          "Ve a ⟦Ajustes⟧ → sección ⟦Dispositivos⟧ y pulsa ⟦Añadir dispositivo⟧.",
+          "Ve a ⟦Ajustes⟧ → sección ⟦Flota⟧ y pulsa ⟦Añadir equipo⟧.",
           "Rellena IP o hostname, nombre y tipo. Marca ⟦Es la puerta de enlace⟧ si es la puerta de enlace; para switches gestionados elige el tipo correspondiente.",
           "Para que el server pueda sondear por SSH, autoriza su clave: cópiala desde ⟦Clave SSH del servidor⟧ e instálala en el router.",
           "También puedes pulsar ⟦Descubrir en la red⟧ para detectar candidatos automáticamente."
@@ -2324,7 +2329,7 @@
         "subtitle": "El camino recomendado para tener datos completos",
         "intro": "El agente sondea el router en local (WiFi, DHCP, FDB, LLDP) y empuja los datos al servidor; sin él, la lista de clientes sale vacía.",
         "steps": [
-          "Ve a ⟦Dispositivos⟧ y baja hasta la sección ⟦Agentes⟧: todo router OpenWrt tiene fila, tenga agente o no.",
+          "Ve a ⟦Flota⟧ y baja hasta la sección ⟦Agentes⟧: todo router OpenWrt tiene fila, tenga agente o no.",
           "Pulsa ⟦Instalar agente⟧ en la fila del router: se registra el token y se despliega por SSH (binario, config, servicio y watchdog), en un solo clic si la clave SSH ya está autorizada.",
           "En unos segundos el router pasa a estar en línea en esa misma tabla. ⟦Reinstalar⟧ repite el proceso completo y es lo que mantiene el agente vivo tras upgrades de firmware.",
           "¿Vía manual o versión sin botón? ⟦Ajustes⟧ → ⟦Adopción de agentes⟧ → ⟦Mostrar token⟧, y desde una máquina con SSH al router ejecuta install-agent.sh con --pairing-token."
@@ -2357,7 +2362,7 @@
       "proxmoxToken": {
         "title": "Conectar un cluster Proxmox",
         "subtitle": "Crear el token de API de solo lectura que pide la integración",
-        "intro": "La integración de Proxmox sella cada host como hipervisor y cuelga sus CTs y VMs de él en ⟦Dispositivos⟧, con nombres e IPs reales. Solo necesita lectura: un token de API con permisos de auditoría.",
+        "intro": "La integración de Proxmox sella cada host como hipervisor y cuelga sus CTs y VMs de él en ⟦Flota⟧, con nombres e IPs reales. Solo necesita lectura: un token de API con permisos de auditoría.",
         "steps": [
           "En la web de Proxmox ve a ⟦Datacenter⟧ → ⟦Permisos⟧ → ⟦API Tokens⟧ y crea un token para el usuario que prefieras (p. ej. root@pam!netpulse).",
           "Dale permisos de auditoría: en ⟦Permisos⟧ → ⟦Añadir⟧ asigna el rol PVEAuditor sobre la ruta / al token (si el token tiene separación de privilegios, el permiso tiene que ser del propio token, no basta con el de su usuario).",

+ 64 - 13
app/src/pages/Settings.tsx

@@ -1852,6 +1852,8 @@ function ProxmoxManager({ reduce, onSaved }: { reduce: boolean; onSaved: () => v
   const [error, setError] = useState<string | null>(null)
   /** resultado del último test: mensaje + si el token está ciego */
   const [tested, setTested] = useState<{ msg: string; limited: boolean } | null>(null)
+  const [detecting, setDetecting] = useState(false)
+  const [detectNote, setDetectNote] = useState<string | null>(null)
 
   const load = async () => {
     try {
@@ -1957,6 +1959,40 @@ function ProxmoxManager({ reduce, onSaved }: { reduce: boolean; onSaved: () => v
 
   const empty = { id: '', name: '', url: '', tokenId: '', secret: '' }
 
+  // Detectar (#967): POST /api/config/proxmox/detect barre la /24 de los
+  // hosts de la flota en dos fases (TCP :8006 masivo + confirmación TLS en
+  // serie) y devuelve los PVE confirmados. Decisión multi-host: se pre-
+  // rellena el formulario de nueva instancia con el PRIMER host y la nota
+  // lista todos los encontrados, para cambiar la URL a mano si es otro.
+  // OJO: el nombre NO puede empezar por "use" (eslint rules-of-hooks).
+  const applyDetected = async () => {
+    if (detecting) return
+    setDetecting(true)
+    setError(null)
+    setDetectNote(null)
+    try {
+      const res = await fetch('/api/config/proxmox/detect', { method: 'POST' })
+      if (!res.ok) throw new Error(`HTTP ${res.status}`)
+      const json = (await res.json()) as { found: boolean; hosts?: string[] }
+      const hosts = json.hosts ?? []
+      if (!json.found || hosts.length === 0) {
+        setDetectNote(t('settings.proxmox.detectNotFound'))
+        return
+      }
+      setIsNew(true)
+      setEditing({ ...empty, url: `https://${hosts[0]}:8006` })
+      setDetectNote(
+        hosts.length > 1
+          ? t('settings.proxmox.detectFoundMany', { hosts: hosts.join(', ') })
+          : t('settings.proxmox.detectFound', { host: hosts[0] }),
+      )
+    } catch {
+      setError(t('settings.proxmox.errorGeneric'))
+    } finally {
+      setDetecting(false)
+    }
+  }
+
   return (
     <Card title={t('settings.proxmox.title')} caption={t('settings.proxmox.caption')} index={5} reduce={reduce} headerSlot={<InfoTip text={t('settings.proxmox.hintShort')} />}>
       <div className="space-y-2.5">
@@ -1979,6 +2015,7 @@ function ProxmoxManager({ reduce, onSaved }: { reduce: boolean; onSaved: () => v
                 setIsNew(false)
                 setEditing({ ...inst, secret: '' })
                 setError(null)
+                setDetectNote(null)
               }}
               aria-label={t('settings.proxmox.edit')}
               title={t('settings.proxmox.edit')}
@@ -2069,6 +2106,7 @@ function ProxmoxManager({ reduce, onSaved }: { reduce: boolean; onSaved: () => v
                   setEditing(null)
                   setError(null)
                   setTested(null)
+                  setDetectNote(null)
                 }}
                 className="rounded-lg border border-border px-3 py-2 text-sm font-medium text-text-secondary transition-colors duration-150 hover:text-text-primary"
               >
@@ -2087,22 +2125,35 @@ function ProxmoxManager({ reduce, onSaved }: { reduce: boolean; onSaved: () => v
             )}
           </form>
         ) : (
-          <button
-            type="button"
-            onClick={() => {
-              setIsNew(true)
-              setEditing({ ...empty })
-              setError(null)
-            }}
-            disabled={saving}
-            className="flex w-full items-center justify-center gap-2 rounded-xl border border-dashed border-border px-3 py-2.5 text-sm font-medium text-text-secondary transition-colors duration-150 hover:border-accent/40 hover:text-accent disabled:opacity-40"
-          >
-            <Plus className="h-4 w-4" strokeWidth={1.75} />
-            {t('settings.proxmox.add')}
-          </button>
+          <div className="flex flex-col gap-2.5 sm:flex-row">
+            <button
+              type="button"
+              onClick={() => {
+                setIsNew(true)
+                setEditing({ ...empty })
+                setError(null)
+                setDetectNote(null)
+              }}
+              disabled={saving || detecting}
+              className="flex flex-1 items-center justify-center gap-2 rounded-xl border border-dashed border-border px-3 py-2.5 text-sm font-medium text-text-secondary transition-colors duration-150 hover:border-accent/40 hover:text-accent disabled:opacity-40"
+            >
+              <Plus className="h-4 w-4" strokeWidth={1.75} />
+              {t('settings.proxmox.add')}
+            </button>
+            <button
+              type="button"
+              onClick={() => void applyDetected()}
+              disabled={detecting || saving}
+              className="flex items-center justify-center gap-2 rounded-xl border border-border px-3 py-2.5 text-sm font-medium text-text-secondary transition-colors duration-150 hover:border-accent/40 hover:text-accent disabled:opacity-40"
+            >
+              {detecting ? <Loader2 className="h-4 w-4 animate-spin" strokeWidth={1.75} /> : <Radar className="h-4 w-4" strokeWidth={1.75} />}
+              {detecting ? t('settings.proxmox.detecting') : t('settings.proxmox.detect')}
+            </button>
+          </div>
         )}
       </div>
       {error && !editing && <p className="mt-2 text-caption text-danger">{error}</p>}
+      {detectNote && <p className="mt-2 text-caption text-text-muted">{detectNote}</p>}
     </Card>
   )
 }