Problema raíz:
1. El ping TCP usaba Servidor.IpServidor → fallaba si la BD solo escucha
en localhost del servidor remoto (comportamiento normal en producción)
2. La reactividad Alpine v3.13 no detectaba keys nuevas en objeto vacío {}
dentro de x-for loops, spinner nunca aparecía
Cambios:
- pkg/models/conx_db.go: nuevo campo Host (vacío = usa Servidor.IpServidor)
+ método HostEfectivo() como fuente única de verdad para host
- pkg/services/query_runner_service.go: todos los puntos (openDynamicDB,
openDynamicDBWithName, redisConnect, mongoURI) usan c.HostEfectivo()
- rest/controllers/servidor_controller.go: PingConexion reescrito —
primero prueba conexión real a la BD (no solo TCP), si falla prueba TCP,
devuelve host+puerto testeado y mensajes de error descriptivos
- servidor_dashboard.html: hacerPing usa spread-replace para forzar
reactividad + $nextTick, resultado muestra host:puerto testeado y
mensaje de error completo en múltiples líneas
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- GetServidor: query conx_count per server with GROUP BY and attach to response
- servidor_dashboard.html: use conx_count from API (fallback to _conexiones.length)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Created servidor_dashboard.html with beautiful visual dashboard
- Shows all servers in grid cards with basic info
- Click button opens detailed modal with:
- Server full information (IP, CPU, RAM, Storage, OS, Expiration)
- All connected databases in a clean diagram layout
- Database connection status (active/inactive)
- Connection details (Host, Port, User, Type)
- Ping button to test connection with response time
- View Connection button to open query-runner
- Backend updates:
- Added ServidorDashboard() controller to render the dashboard view
- Added GetServidorDashboard() API endpoint to fetch server + connections
- Added PingConexion() endpoint to test database connections (TCP + DB test)
- Color-coded status badges and database type indicators
- Responsive design for mobile and desktop
- Routes:
- GET /app/servidor-dashboard (render view)
- GET /api/app/servidor-dashboard/:id (get server details API)
- GET /api/app/conx-ping/:id (ping connection endpoint)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>