Commit Graph

18 Commits

Author SHA1 Message Date
205566e1ee fix(versiones-cras): validar que la URL sembrada sea alcanzable y permitir instalar limpio
Dos bloqueos que impedían avanzar con la instalación en Linux.

1. La validación de PANEL_PUBLIC_URL solo comparaba que coincidiera con ORIGIN,
   y eso deja pasar el peor caso: que AMBAS valgan localhost, que es justo lo
   que produce el compose de desarrollo. Ahí no avisaba nada y la instalación
   sembraba loopback en el config/.env del destino, donde localhost es el propio
   destino y el agente acabaría hablando consigo mismo.

   Ahora se valida lo que de verdad importa —que la URL sea alcanzable desde
   otra máquina— y solo después el desajuste con ORIGIN. El mensaje también
   dejaba un consejo peligroso: "comenta PANEL_PUBLIC_URL para que tome ORIGIN"
   solo vale si ORIGIN sirve para sembrar; con ORIGIN en localhost, seguirlo
   empeora las cosas. Ese consejo ahora es condicional.

   De paso se corrige el docstring, que afirmaba que un ORIGIN equivocado se
   habría manifestado por la protección CSRF de adapter-node. No es cierto:
   svelte.config.js tiene csrf.checkOrigin en false, así que el Origin de los
   POST nunca se valida y ese razonamiento llevaba a conclusiones falsas.

2. El formulario fuerza mode='update' en cuanto el servidor tiene versión
   instalada, y una actualización exige que en la ruta destino ya viva algo.
   Eso hacía imposible mover una instalación a otra carpeta —por ejemplo al
   home, para instalar sin privilegios—: abortaba con "no hay una instalación".

   Se agrega una confirmación explícita siguiendo el molde de platformAck: el
   ack lleva la RUTA confirmada y no un booleano, así que una casilla marcada
   deja de valer si después se cambia el destino, y el servidor revalida en vez
   de confiar en la UI. La casilla advierte además que el agente anterior sigue
   corriendo: los dos reportarían con el mismo instance_key y se pisarían la
   carpeta de entrada registrada, que es por donde el panel enruta los
   respaldos.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 07:26:34 -06:00
84a4c5e7e0 feature/cras-instalacion-sin-privilegios (#20)
Reviewed-on: #20
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-07-30 20:30:04 +00:00
14b611c581 feature/interfaz-binarios (#19)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
Reviewed-on: #19
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-07-30 13:52:45 +00:00
a9a1dcb9ae feat(database): leyenda de aviso SAT solo si el cliente cambio de sistema (T2026-06-111) (#18)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
Nuevo parametro anexo24c_cambio_sistema por nodo, editable desde el modal
de Gestion de Bases de Datos (checkbox "Presento aviso de cambio de sistema
(Anexo 24C)"). Solo cuando esta marcado Y el cliente esta inactivo, el login
de SCAII Web muestra la leyenda del SAT; el campo de fecha se habilita solo
si el checkbox esta activo.

- controldesk-pg.ts: anexo24c_cambio_sistema en ROW_DATABASE_NODE, insert y update.
- +page.server.ts: parseo del campo en createDatabase / updateDatabase.
- +page.svelte: checkbox en el modal + fecha condicionada al checkbox.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Reviewed-on: #18
Co-authored-by: Galindo97 <agalindo@aduanasoft.com.mx>
Co-committed-by: Galindo97 <agalindo@aduanasoft.com.mx>
2026-07-17 14:14:32 +00:00
26eed5726c feat(alerts): enhance alert handling and client data enrichment in dashboard (#16)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
- Updated the alert handling logic to include a 'notFound' flag for databases that are not found on the server, allowing for clearer UI representation.
- Enriched alert data with client contact information by integrating the `lookupAlertClientData` function, ensuring alerts display relevant client details.
- Improved the display of alert dates in the UI to reflect the new 'notFound' status, enhancing user experience and clarity.

This update improves the accuracy and usability of the dashboard alerts.

Reviewed-on: #16
Co-authored-by: AlexeerCT <acazares@aduanasoft.com.mx>
Co-committed-by: AlexeerCT <acazares@aduanasoft.com.mx>
2026-07-13 15:27:14 +00:00
79035002e1 feat(database): add Anexo 24C notification date handling in database operations
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
2026-07-09 12:23:41 -05:00
7f9d502cb1 feat(env): update environment configuration and add SQL Server password handling (#15)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
- Added new environment variables for deduplication and SQL Server password encryption.
- Updated docker-compose files to include SECRET_KEY and ENCRYPTION_KEY for compatibility with a24c.
- Enhanced the navigation structure to reflect changes in admin-only views and report access.
- Introduced new functions for handling SQL Server connections and database management, including parsing server addresses and listing user databases.

This update improves security and functionality related to database management and user access control.

Reviewed-on: #15
Co-authored-by: AlexeerCT <acazares@aduanasoft.com.mx>
Co-committed-by: AlexeerCT <acazares@aduanasoft.com.mx>
2026-07-06 17:00:49 +00:00
a1e7dddda0 feature/mejora-del-side-bar (#14)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
mejora de sidebar y correcciones en interfaces y propagacion de contrasena sql

Reviewed-on: #14
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-07-02 21:00:34 +00:00
1b198953d4 feature/asignacion-masiva-restauradores (#13)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
integraciones de panel de respaldos fallidos, asignacion masiva de restaurador, trackeo de baks para nuevo sistema de cloudrestore

Reviewed-on: #13
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-07-02 14:57:45 +00:00
cb4324979b feat(reportes): add functionality for downloading client and user reports (#12)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
- Introduced new functions to download Excel reports for clients and users.
- Added UI elements for administrative users to trigger report downloads.
- Implemented error handling for report generation failures.
- Enhanced the existing portal user listing with node data for better reporting.

This update improves the reporting capabilities within the application, allowing for easier access to client and user data.

Reviewed-on: #12
Co-authored-by: AlexeerCT <acazares@aduanasoft.com.mx>
Co-committed-by: AlexeerCT <acazares@aduanasoft.com.mx>
2026-06-18 17:30:22 +00:00
b8e47f7654 perf(dashboard): paraleliza la carga de métricas SQL Server por nodo (#11)
Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
La carga inicial del dashboard (/+page.server.ts) tardaba ~30s porque
loadSqlDashboardFromNodes recorría los nodos en serie y hacía 3 round-trips
secuenciales por nodo (métricas, alerta, historial) → N×3 viajes encadenados
a SQL Server remoto.

Cambios:
- Las 3 consultas por nodo ahora corren con Promise.all.
- Los nodos se procesan con concurrencia acotada (8) vía mapWithConcurrency;
  la agregación se mantiene secuencial para conservar orden y evitar carreras.
- getMssqlPoolMaster cachea la *promesa* del pool y reserva el slot de forma
  síncrona antes de cualquier await, evitando pools duplicados al paralelizar.
- En +page.server.ts: métricas SQL Server y catálogo PostgreSQL se cargan en
  paralelo (Promise.allSettled); las 6 consultas de catálogo en Promise.all.
- Se elimina la consulta listDatabaseNodes() duplicada (se reusa la ya cargada).
- Hidratación de alertas y filtro de permisos paralelizados.
- Se quita un console.log de depuración por fila (estándar: sin logs sueltos).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Reviewed-on: #11
Co-authored-by: AlexeerCT <acazares@aduanasoft.com.mx>
Co-committed-by: AlexeerCT <acazares@aduanasoft.com.mx>
2026-06-09 16:25:51 +00:00
b8be307892 feature/integracion-cloudrestore-targets (#9)
integraciones para cloud recovery

Reviewed-on: #9
Co-authored-by: hreyes <hreyes@aduanasoft.com.mx>
Co-committed-by: hreyes <hreyes@aduanasoft.com.mx>
2026-06-09 14:58:48 +00:00
9d32bc13ae feature/boton-avisos 2026-05-28 12:29:11 -06:00
baa826e36b fix/T2026-04-023-respaldo-cliente-no-identificado
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 15:29:45 -06:00
0bf9c9e68d Refactor database configuration and user management
- Updated .env.example to consolidate SQL Server credentials under PANEL_MSSQL_* variables.
- Removed deprecated docker-compose.postgres.yml file.
- Adjusted docker-compose.yml to utilize new SQL Server credential structure.
- Enhanced README.md with Docker build and push instructions.
- Refined database schema in schema.sql to align with new user and permission structures.
- Updated init-database.js to reflect changes in user and session table names.
- Modified user management functions in users.ts to accommodate new database schema.
- Streamlined API routes to utilize PostgreSQL for user and database management.
- Improved error handling and logging in various server routes.
2026-04-14 14:16:11 -05:00
97b67afb25 Ultimos cambios en el proyecto local 2026-04-07 07:36:18 -06:00
5fa97105c9 feat: improved sidebar UI with larger icons and user info in footer
- Increased all sidebar navigation icons from text-sm to text-xl for better visibility
- Moved user information and logout button from header to sidebar footer
- Added user avatar with name and email in expanded sidebar state
- Collapsed sidebar shows avatar icon and logout icon button stacked vertically
- Simplified header by removing user badge and logout button
- Added version info (v1.0.0) in sidebar footer
- Improved responsive design for both collapsed and expanded states
2026-02-19 12:08:56 -06:00
7e7773578d Initial project commit: Docker + SvelteKit source 2026-02-09 10:32:51 -07:00