Commit Graph
366 Commits
Author SHA1 Message Date
Lizandro GuarnizoandClaude Sonnet 4.6 bc79553b7e feat(tareas): módulo de tablero kanban con drag & drop, comentarios y Telegram
- Modelos Tarea y TareaComentario con GORM, migración automática
- Estados: por_hacer → en_progreso → revisión → hecho; prioridades: baja/media/alta/urgente
- Drag & drop entre columnas via SortableJS (PUT /tarea/:id/estado)
- CRUD completo: crear, editar, eliminar; asignación a usuario + fecha límite
- Panel lateral de detalle: historial de comentarios, adjuntar archivos (uploads/tareas/:id)
- Telegram: notifica asignación, cambio de estado y comentarios nuevos via sendTelegramAdmin
- Seed automático bajo módulo "Administración", solo rol Administrador

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 20:18:26 -05:00
Lizandro Guarnizo 0901ed0d53 fix(url-monitor): asignar submódulo solo al rol Administrador 2026-07-06 09:56:29 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 1840b97256 feat(url-monitor): registrar submódulo en menú bajo "Servidores"
- SeedUrlMonitor() agrega /app/url-monitor al módulo Servidores idempotentemente
- Se llama en el arranque junto al resto de seeds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 09:54:37 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 d0ba75c559 feat(url-monitor): agregar vista con tabla, modal CRUD e historial de latencia
- Tabla con badge de estado (en línea/caído/sin datos), latencia coloreada y último chequeo relativo
- Stats rápidos: total, en línea, caídos, latencia promedio
- Modal crear/editar con toggle activo, intervalo y timeout configurables
- Verificar ahora por fila con spinner y recarga automática a los 4s
- Panel lateral con gráfico de barras Chart.js (verde=OK, rojo=error) y tabla de últimos 50 registros
- Rangos 1h/6h/24h/7d, autorefresh cada minuto

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 09:47:44 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 5f92934fba feat(url-monitor): agregar monitoreo de disponibilidad de URLs desde servidor
- Modelos UrlMonitor y UrlMonitorLog con purga automática a 7 días
- Cron cada minuto ejecuta chequeos HEAD→GET con fallback, alerta Telegram en cambio de estado
- CRUD completo + chequeo manual + historial de logs
- Migración automática de tablas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 09:33:48 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 569d8b0f28 feat(ai-config): agregar botón Probar para verificar conectividad del provider
- Endpoint GET /ai-config/:id/test que llama /api/tags (Ollama) o /v1/models (OpenAI-compat/Anthropic)
- Botón "Probar" en cada fila de la tabla con modal de resultado JSON

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 09:33:29 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 6062f31c70 feat(ai): integrar Ollama en AiConfig para ia_controller, query_runner y landing
- Agrega provider 'ollama' al panel de AiConfig con badge azul y hint de URL
- ia_controller: reemplaza webhook n8n hardcodeado por llamada directa a Ollama vía AiConfig (módulo 'ia')
- query_runner: agrega soporte explícito de ollama (model fallback gemma3:1b, Basic Auth para URL pública)
- HTML: agrega módulo 'IA / vCard' en el selector de módulos

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 09:33:22 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 fa269cabf1 fix(websms): move code examples to JS to avoid Go template parsing error
html/template rejects escaped quotes in attribute values. Code examples
are now built in getCodeExample() and rendered via x-text on the <pre>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:30:03 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f56d6891aa feat(websms): add API integration documentation with code examples
Shows endpoint, auth, request/response formats and code tabs
for cURL, JavaScript, PHP and Python. API Key is auto-injected
from the page state so examples are ready to copy-paste.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:24:23 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 66088ce691 feat(agent): auto-renice top CPU process after 2 consecutive high-CPU reports
- Agent tracks consecutive reports above cpu_threshold (default 90%)
- After renice_consecutive reports (default 2 = 60s sustained), runs
  renice -n 19 on the top CPU process
- Reports the action back in the heartbeat payload
- Backend sends Telegram alert when renice is applied
- All params configurable in agent.yml and install.sh flags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:17:07 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 fd72eec281 feat(dashboard): add CPU/RAM/disk history chart with 1h/6h/24h/7d range
Uses Chart.js to render line charts from servidor_metricas_history.
Chart loads when opening the server detail modal and downsamples
to max 300 points for performance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:05:10 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ae74d0ef90 feat(agent): persist 7-day metrics history per server heartbeat
- New table servidor_metricas_history (cpu%, ram%, swap%, disco%, tcp, load1)
- Each heartbeat inserts a compact row (~60 bytes)
- GET /app/servidor/:id/metricas-history?horas=24 returns the data
- Daily cron at 3AM purges rows older than 7 days
- ~1.2 MB per server per 7 days at 30s interval

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:03:16 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 4b98161070 feat(cron): include top 3 processes in CPU/RAM alert Telegram messages
When CPU or RAM exceeds the threshold, the alert now lists the top 3
processes sorted by the relevant metric (CPU% or RAM MB).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:53:43 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 73fe73b04f fix(cron): parse discos array correctly for disk alert threshold checks
The metrics JSON uses 'discos' (array) not 'disco' (single object),
so disk alerts were never firing. Also reports per-mountpoint label.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:47:04 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 71db59b005 perf(agent): read CPUPercent only on top-10 RAM processes, not all
Filter by RAM first (cheap), then call CPUPercent on just the 10 winners.
Reduces /proc reads from hundreds to 10 per interval.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:35:48 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ad531c6dfc perf(agent): sort top procs by RAM only, skip per-process CPUPercent
CPUPercent() on every process reads /proc/<pid>/stat for all processes,
causing ~19% CPU spike on servers with many containers. Sorting by RAM
is a single /proc read per process and much cheaper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:34:46 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 42dc7020fc fix(websms): return subid from LabsMobile response in ApiSendSms
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:18:20 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c24248b2c3 fix(agent): restart systemd service on reinstall instead of no-op start
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:17:13 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c3693d00db fix: mostrar todos los discos con espacio real incluyendo overlay y tmpfs grandes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 10:05:58 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 00d1e6121b fix: descargar a /tmp primero para evitar error 23 en contenedores
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 09:17:59 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 2ff4d314de fix: mejorar detección de errores en install.sh (espacio, permisos, HTTP code)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 09:00:31 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 34b9c81262 feat: agente con métricas de red, swap, top procesos y TCP; dashboard mejorado
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:49:39 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 491e908448 fix: corregir path de templates a resources/views
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:37:22 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ffb54a5128 revert: quitar nice/ionice del Dockerfile (límites manejados por Coolify)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:25:03 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c3739ae581 fix: reducir prioridad de CPU/IO en builds Docker con nice+ionice
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:12:57 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 d95e82034a fix: excluir /api/sms/send del middleware AuthApi
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:05:31 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 cb9d984ee8 fix: capturar subid de LabsMobile como MsgID en logs de SMS
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:36:14 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 8a9235631c feat: mostrar API Key en panel WebSMS
Agrega sección visible en /app/websms con el secret_key
y botón de copiar, para facilitar el uso del endpoint externo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 23:17:45 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 704664afe7 feat: API pública para envío de SMS vía WebSMS
Agrega POST /api/sms/send autenticado con Bearer token (secret_key
auto-generado en WebSmsConfig). Recibe numero y mensaje, llama a
LabsMobile y registra el resultado en websms_log.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 23:13:57 -05:00
Lizandro Guarnizo df1eb75bdd feat: importar datos de BALANCE.numbers (facturas, IVA, retencion, cobros, pagos, consolidado) 2026-06-23 00:43:27 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 2136c46f42 fix: tratar code != 0 de LabsMobile como error
La API devuelve HTTP 200 con code:"401" para credenciales inválidas.
Ahora el service retorna error cuando code != "0".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:16:24 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f3d9794096 fix: corregir URL del API de LabsMobile
URL incorrecta: https://websms.labsmobile.com/SY0204/api
URL correcta:   https://api.labsmobile.com/json/send

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 17:05:20 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 e5c6dba787 fix: exponer cuerpo real de respuesta en error de websms
El error "unmarshal: invalid character '<'" ocultaba qué devolvía
LabsMobile. Ahora el error incluye Content-Type y los primeros 200
bytes del cuerpo para diagnóstico.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:59:49 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ab4e3252b1 fix: fidelizar websms_config con el diseño del resto del proyecto
Agrega bloque <style> con btn-primary, input-field, label, badge-* que
faltaban. Badge de status ahora muestra "Enviado"/"Error" en vez del
código numérico. Botones de copiar en la sección de webhooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:50:53 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f94d01c089 fix: agregar bloque <style> faltante en todas las vistas de contabilidad
Los modales y controles no tenían estilos (btn-primary, btn-secondary,
btn-danger, btn-icon, input-field, label, badge-*) porque el bloque
<style> nunca fue incluido al crear estas vistas. También corregido
text-slate-800 en h2 de modales para alinearse con el patrón del proyecto.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:37:27 -05:00
Lizandro Guarnizo 24c4f6b26f fix: modales contabilidad/websms alineados con diseño del proyecto (text-slate-800, gap-4, SVG, mt-5, color input) 2026-06-22 16:04:22 -05:00
Lizandro Guarnizo 39f56372c3 fix: tickets filtrados por proyecto, vistas contabilidad/websms en resources/view 2026-06-22 10:23:28 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 1d152b6de0 remove: eliminar GeoIP completamente, no era necesario
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 10:25:05 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 d66fe95514 fix: GeoIP opcional, no paniquea si falta GeoLite2-City.mmdb
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 10:22:55 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 e28e2823dc fix: compilar agent/dist en builder stage y agregar módulos contabilidad/websms
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 10:13:17 -05:00
Lizandro Guarnizo ca6a44f64e up 2026-06-18 16:48:49 -05:00
Lizandro Guarnizo fd410b3afc Update vcard_api.html 2026-06-11 20:16:47 -05:00
Lizandro Guarnizo 89021f2e77 modificaciones de mejora 2026-06-11 18:06:21 -05:00
Lizandro Guarnizo fa0991eed7 Update oss_service.go 2026-06-11 17:47:46 -05:00
Lizandro Guarnizo cf078a6e5f S3: add public_url, fix Content-Disposition, add oss-file proxy 2026-06-10 09:34:17 -05:00
Lizandro Guarnizo 0fc7b8b94d contrato: M2M infra linking (servidores, conx_dbs, ai_configs) 2026-06-10 00:18:42 -05:00
Lizandro Guarnizo 03eb6d874e contrato: M2M infra linking (servidores, conx_dbs, ai_configs) 2026-06-10 00:18:31 -05:00
Lizandro Guarnizo 478c2bde00 up 2026-06-10 00:18:20 -05:00
Lizandro Guarnizo d701534537 Update hostinger.html 2026-06-06 21:57:30 -05:00
Lizandro Guarnizo 8bf6f19e54 Update install.sh 2026-06-06 10:32:57 -05:00