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

feat(ui): label netgrip-embedded agents as NetGrip in the agent badge (#746) (#747)

Co-authored-by: gnacho <hnacho@proton.me>
Nacho 2 месяцев назад
Родитель
Сommit
c07c2b19dc

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@ y este proyecto se adhiere a [Versionado Semántico](https://semver.org/lang/es/
 ### Added
 
 - **Hora fija para el respaldo diario (#741)**: campo opcional `Hora` (HH:MM, hora local) en la tarjeta de Respaldos; vacío mantiene el comportamiento "cada N horas" y con hora fija el respaldo dispara una vez al día a esa hora (ventana de mantenimiento). Validación `HH:MM` en el servidor.
+- **Los routers con NetGrip se etiquetan como "NetGrip" en toda la flota (#746)**: el badge de agente mostraba el genérico "Agente" para todos, también para los que llevan el agente embebido de NetGrip. Ahora el badge (flota, tarjetas, tabla y detalle) muestra "NetGrip" con tooltip propio ("NetGrip v{versión} · agente embebido"); la tabla de agentes ya lo distinguía y el resto de la UI queda consistente.
 
 ## [2.28.22] - 2026-09-11
 

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

@@ -832,7 +832,9 @@
       "timeline": "Upgrade",
       "timelineDone": "completed",
       "stepVerifying": "Verifying integrity",
-      "timelineSummary": "· {{count}} steps · {{secs}} s"
+      "timelineSummary": "· {{count}} steps · {{secs}} s",
+      "netgripBadge": "NetGrip",
+      "netgripFreshTip": "NetGrip v{{version}} · embedded agent"
     },
     "colClients": "Clients",
     "colCpu": "CPU",

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

@@ -832,7 +832,9 @@
       "timeline": "Actualización",
       "timelineDone": "completado",
       "stepVerifying": "Comprobando integridad",
-      "timelineSummary": "· {{count}} pasos · {{secs}} s"
+      "timelineSummary": "· {{count}} pasos · {{secs}} s",
+      "netgripBadge": "NetGrip",
+      "netgripFreshTip": "NetGrip v{{version}} · agente embebido"
     },
     "colClients": "Clientes",
     "colCpu": "CPU",

+ 5 - 2
app/src/components/routers/AgentBadge.tsx

@@ -41,16 +41,19 @@ export function AgentBadge({ agent, agentOnly, deviceType, className }: AgentBad
       </span>
     )
   }
+  const isNetgrip = agent.kind === 'netgrip'
   const title = agent.fresh
     ? agent.version
-      ? t('routers.agent.freshTip', { version: agent.version })
+      ? isNetgrip
+        ? t('routers.agent.netgripFreshTip', { version: agent.version })
+        : t('routers.agent.freshTip', { version: agent.version })
       : t('routers.agent.freshTipUnknown')
     : t('routers.agent.staleTip')
   return (
     <span title={title} className={cn('inline-flex', className)}>
       <StatusPill
         tone={agent.fresh ? 'info' : 'danger'}
-        label={agent.fresh ? t('routers.agent.badge') : t('routers.agent.stale')}
+        label={agent.fresh ? (isNetgrip ? t('routers.agent.netgripBadge') : t('routers.agent.badge')) : t('routers.agent.stale')}
         pulse={!agent.fresh}
       />
     </span>