Commit Graph

564 Commits (f08f3f6ff96405d6e7ed654976212d8b39c1de53)

Author SHA1 Message Date
Juan Manuel Bardallo f08f3f6ff9 fix(webhook): restaurar gestion de progreso y corregir error de sintaxis
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-20 11:25:50 +02:00
Manuel Aranda Rosales f2566bb9c9 ref 3018. Cancel multiple task
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-19 17:35:29 +02:00
Juan Manuel Bardallo d2cbc51336 refactor(webhook): consolidar procesamiento de comandos en un bloque switch
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-18 01:41:08 +02:00
Juan Manuel Bardallo 17c5c603f1 fix(webhook): restaurar parseo de particiones en EjecutarScript borrado accidentalmente
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-18 01:30:37 +02:00
Manuel Aranda Rosales cc0e45eae9 ref 3017. Fixed bug EjecutarScript webhook
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-17 11:56:39 +02:00
Manuel Aranda Rosales 52515633af ref 3016. Updated ogRepository sync
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-17 11:44:44 +02:00
Juan Manuel Bardallo 170ff14bd9 feat(webhook): procesar cfg en respuestas de EjecutarScript
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
Permite que la configuración de particiones y caché se actualice automáticamente en la BBDD cuando termina la ejecución de un script en el cliente, evitando tener que encadenar refrescos manuales.
2026-07-17 10:48:55 +02:00
Manuel Aranda Rosales 22947fd44d ref 3009. Execute task right now
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-15 11:18:36 +02:00
Manuel Aranda Rosales b4907bc5e6 ref 3006. Updated creation software profile bug. 2026-07-13 10:38:56 +02:00
Manuel Aranda Rosales 3390734b10 ref 3007. Updated software profile image entity. 2026-07-13 10:38:22 +02:00
Manuel Aranda Rosales 8b78296a86 ref 2994. Hardware profile network settings . 2026-07-13 10:36:01 +02:00
Manuel Aranda Rosales ec48baebd3 ref 3005. Fixed command scheldule bug. 2026-07-13 10:32:15 +02:00
Juan Manuel Bardallo 04068ce748 Merge branch 'devel' of https://ognproject.evlt.uma.es/gitea/opengnsys/ogcore into devel
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-07-09 11:06:24 +02:00
Juan Manuel Bardallo af2fa11d9b feat(deploy): remove constraint restricting deployment to clients with different partition sizes 2026-07-09 11:04:17 +02:00
Manuel Aranda Rosales 8307844596 ref 2994. Propagacion con Hardware profile.
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
2026-07-09 10:15:09 +02:00
Manuel Aranda Rosales f00e5a1292 ref 2975. Cambio de tipo en bbdd para que queda texto msa grande en los scripts. 2026-07-09 10:15:09 +02:00
Manuel Aranda Rosales 92ee730bab ref 2995. Actualizas roles. 2026-07-09 10:15:09 +02:00
Juan Manuel Bardallo 6b8cd0834b feat(organizational-unit): order children alphabetically by name
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-09 09:50:58 +02:00
Juan Manuel Bardallo 0acf27c0e1 feat(user): add language preference field to user profile
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- Add language column (VARCHAR 10) to User entity
- Add language field to UserInput and UserOutput DTOs
- Expose language in JWT payload via JWTCreatedListener
- Add Doctrine migration Version20260707091500
2026-07-07 13:59:56 +02:00
Juan Manuel Bardallo 024f2ace6b Corregida asociacion de perfil hardware con cliente, se usa delete cascade para que al borrar un cliente, se borre su perfil hardware asociado
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-06-16 09:17:09 +02:00
Nicolas Arenas 9d5c230a2d Merge branch 'fix_permissions' into devel
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- Bloqueo POST /api/clients y /api/organizational-units a ou-operator y ou-minimal
- Permiso a ogLive (ROLE_OGCLIENT_API) para GET /clients
- Suite de tests funcionales de permisos por rol (PermissionsTest.php)
2026-06-15 11:57:29 +02:00
Nicolas Arenas 9baa1120a6 fix(ogcore): normalizar timezone UTC en CommandTask DTOs 2026-06-15 11:52:44 +02:00
Nicolas Arenas 7f56b6291a fix(ogcore): permisos DELETE de OUs y borrado de clientes sin plantilla 2026-06-15 11:52:44 +02:00
Nicolas Arenas 7979d3e81c Merge remote-tracking branch 'refs/remotes/origin/devel' into devel 2026-06-15 11:23:27 +02:00
Juan Manuel Bardallo 0284654f3e Añadido un timeout de 5 segundos para detectar el estado de cada equipo en el sondeo del aula completa
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-06-12 10:27:04 +02:00
Nicolas Arenas ab1a7c2d11 fix(ogcore): mover seguridad de creación/borrado a los processors
- ClientProcessor: añade comprobación inline en processCreateOrUpdate
  para bloquear (403) creación de clientes a ROLE_ORGANIZATIONAL_UNIT_OPERATOR
  y roles inferiores. Añade Security al constructor.

- OrganizationalUnitProcessor: mueve el bloqueo de creación al inicio de
  processCreateOrUpdate (antes de validate/save) para que el 403 se devuelva
  sin persistir datos. Separa la lógica de añadir la OU a la lista del usuario.

- OrganizationalUnitProcessor.processDelete: corrige bug de nombre de variable
  ($user apuntaba a una OU); añade comprobación de autoría via createdBy para
  que solo el creador o super-admin pueda borrar la OU (403 en caso contrario).

Motivo del cambio: la expresión security: de API Platform YAML no se evaluaba
antes de la validación del DTO en AP 3.4 para operaciones POST sin provider
explícito, resultando en 422 en lugar del esperado 403.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:20:02 +02:00
Nicolas Arenas 203675e7ad fix(ogcore): corregir permisos de edición de aulas para ou-admin y ou-operator
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- OrganizationalUnitProcessor: tras crear una OU (POST), añade
  automáticamente la nueva OU a allowedOrganizationalUnits del
  usuario creador (si no es SUPER_ADMIN), para que pueda verla
  y editarla de inmediato.
- OrganizationalUnitVoter: amplía la comprobación de
  ORGANIZATIONAL_UNIT_VIEW para incluir descendientes de las OUs
  permitidas, alineando el voter con la lógica de
  UserAllowedOrganizationalUnitExtension.
2026-05-26 14:34:26 +02:00
Juan Manuel Bardallo e5a8a43a4b Modificada accion WolAction, calcula la ip de broadcast para el comando wakeonlan, para ello, detecta la mascara de red usando la subred configurada en el dhcp, si no se usa ogdhcp, busca la máscara de red en la configuración de la OU, en caso de tampoco encontrala, usa la ip de broadcast por defecto del comando wakeonlan
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
2026-05-22 12:59:52 +02:00
Nicolas Arenas c05ccc4f37 fix(ogcore): corregir sistema journal-pull para máquinas con journal activo
testing/ogcore-api/pipeline/pr-devel Build started... Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- journal-pull@.service: cambio a --split-mode=host con salida a directorio
  por IP para evitar "header out-of-date" en máquinas con journal muy activo;
  añadido boot=0 para descargar solo el boot actual y evitar descargar
  gigabytes de histórico; Restart=always para reconectar tras cierre limpio
- DiskLogsAction: adaptado a directorio (--directory) en lugar de fichero
  (.journal); usa is_dir() en lugar de file_exists()
2026-05-20 10:37:04 +02:00
Juan Manuel Bardallo a164806a3d Modificada acción RemoveCacheImage para montar la cache antes de intentar eliminar la imagen
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-devel Build queued... Details
2026-05-18 14:07:31 +02:00
Juan Manuel Bardallo 0016b96e77 Resuelve conflicto de fusión en CHANGELOG.md
testing/ogcore-api/pipeline/pr-devel Build started... Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-05-18 13:43:30 +02:00
Juan Manuel Bardallo 17f8a897fa Corregido fallo setRemotePc en la entidad Imagen al sincronizar un repositorio
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-devel Build started... Details
2026-05-18 13:32:48 +02:00
Nicolas Arenas d20e1b2789 fix(ogcore): robustez y rotación de logs en infraestructura journal-pull
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- journal-pull@.service: Restart=always para reconectar tras salida limpia,
  ExecStartPre elimina el fichero solo si está vacío para evitar cursor inválido
- JournalPullSubscriber: protección contra borrado de IP compartida entre
  componentes al eliminar un servidor; comprueba que ninguna otra entidad
  BootServer, DhcpServer o ImageRepository usa la misma IP antes de
  eliminarla de journal-pull-sources.conf
- logrotate.d/journal-pull: rotación diaria con 10 días de retención para
  los ficheros de journal remoto; nocompress para ficheros binarios;
  para/arranca los servicios journal-pull@ durante la rotación
- debian/control: añadidos logrotate y systemd-journal-remote como dependencias
- debian/ogcore.postinst: enlace de logrotate config, permisos 775 en api/var/
2026-05-18 11:31:37 +02:00
Nicolas Arenas 6099f6be4b feat(oggui): soporte de múltiples SYSLOG_IDENTIFIER en visor de logs de disco
- StatusLogsComponent: @Input identifiers[] en lugar de identifier string,
  parseo de entries JSON estructurado con formato [timestamp] ID: mensaje
- Templates ogboot, ogdhcp, ogrepository, ogcore-status: identifiers correctos
  por componente y host basado en IP en lugar de nombre del servidor
- Añadidos métodos getSelectedXxxIp() en ogboot, ogdhcp y ogrepository status
2026-05-14 21:39:33 +02:00
Nicolas Arenas 341f10fc97 Testing devel
ogcore-debian-package/pipeline/head There was a failure building this commit Details
2026-05-14 17:36:12 +02:00
Juan Manuel Bardallo 2ac9d27d97 Corregida migracion de perfiles hardware y software, los tipos de software y hardware no se guardaban en base de datos antes de tener que ser usados por los perfiles
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-05-14 14:42:16 +02:00
Juan Manuel Bardallo 02f5d5248a Creado endpoint para mostrar logs desde disco de los distintos componentes de OG 2026-05-14 13:22:57 +02:00
Nicolas Arenas 71e7b8a129 fix(ogcore): corregido error al importar imagen desde repositorio
testing/ogcore-api/pipeline/pr-main Build started... Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- Eliminada llamada a setRemotePc() en ImportAction, método inexistente
  desde que la propiedad remotePc fue eliminada de la entidad Image en v1.7.0
- Actualizado CHANGELOG.md con entrada 1.7.11
2026-05-14 10:26:13 +02:00
Juan Manuel Bardallo 65bfe26833 Modificado setClientBootMode para crear una traza en caso de ejecución en modo temporal, el id de dicha traza se le pasa al comando opengnsys:pxe:sync para que pueda sincronizar el fichero PXE del cliente y finalizar la traza indicando si se ha realizado correctamente o no
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
2026-05-13 14:51:48 +02:00
Juan Manuel Bardallo 14bfc44a38 Añadida nueva ruta para cambiar la plantilla de un cliente /clients/set-boot-mode, recibe el nombre de la plantilla, el modo 0=temporal, 1=permanente y puede enviarse mac, ip o nombre del cliente o nombre del aula.
testing/ogcore-api/pipeline/head Build started... Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
2026-05-12 14:53:50 +02:00
Juan Manuel Bardallo a013527f57 Al importar clientes se inicializan con estado off
testing/ogcore-api/pipeline/head Build started... Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
2026-05-11 10:30:41 +02:00
Juan Manuel Bardallo a0c871add5 Mejorado comando ImportLegacy y creada ruta api para invocarlo desde la consola web, controla errores e informa de cambios a través de mercure
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
2026-05-08 15:36:57 +02:00
Juan Manuel Bardallo 53f22f3b21 eliminada relación de los perfiles software y los softwares con las OU, en la nueva version no existe dicha relacion
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
2026-05-08 10:37:41 +02:00
Juan Manuel Bardallo 1dca0f0194 Creado importador completo de la base de datos Og 1.1 a Og 3.0, usa los comandos migrate ya creados anteriormente
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-05-08 10:17:51 +02:00
Nicolas Arenas 90f06de0a0 feat(ogcore): update client status from agent heartbeat busy field
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
- StatusController: process 'busy' and 'st' fields from agent heartbeat
  to keep client status in sync without waiting for a command response.
  busy:true sets BUSY; busy:false reverts to og-live/linux/windows/macos
  based on the 'st' field sent by the agent
- StatusController: add detailed logging for all status transitions
  (heartbeat and REBOOT/POWEROFF) visible via journalctl -t ogcore
- PowerOffAction, RebootAction: distinguish HTTP 409 (agent busy) from
  500 (agent error) and enqueue the command in both cases
2026-05-08 07:03:08 +02:00
Manuel Aranda Rosales 99e4c02411 Fixed OU scope task
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
2026-05-06 17:34:21 +02:00
Manuel Aranda Rosales 4a97bc8aff Merge branch 'main' into develop
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-05-06 17:28:29 +02:00
Manuel Aranda Rosales 1915649d17 Fixed typo disk logs 2026-05-06 17:28:11 +02:00
Nicolas Arenas a8cdae154b fix(ogcore): fix scheduled task execution and UTC timezone handling
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
- Fix executeReboot response check: use getStatusCode() instead of
  json_decode(body)['status'], which never matched the Client entity body
- Fix executeRunScript: same check fix; remove duplicate trace status
  update since RunScriptAction already handles it via updateExistingTrace
- Normalize executionDate/executionTime to UTC at API boundary in
  CommandTaskScheduleInput to prevent client/server timezone drift
- Use UTC consistently in calculateNextExecutionDate and
  RunScheduledCommandTasksCommand for all datetime comparisons
- Replace 30-second execution window (abs(difference) < 30) with
  isDue && notYetExecuted logic so tasks missed by the cron are
  recovered in the next cycle instead of being skipped forever
- Skip one-time (none) tasks with a past executionDate in
  calculateNextExecutionDate so nextExecution is set to null after
  execution and the task no longer appears in cron logs
2026-05-06 15:30:37 +02:00
Juan Manuel Bardallo cd7a2484c5 Modificada funcion para borrar imagen de cache, no se usa la partición que contenga una imagen desplegada, se usa directamente el nombre del fichero contenido en cache
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
2026-05-06 12:28:28 +02:00