Changed CHANGELOG
testing/ogcore-api/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details

pull/27/head
Manuel Aranda Rosales 2025-04-11 09:08:20 +02:00
parent 0cce7ff52d
commit b1fbc4787a
2 changed files with 26 additions and 3 deletions

View File

@ -1,4 +1,19 @@
# Changelog
## [0.11.0] - 2025-04-11
### Added
- Se ha añadido funcionalidad para renombrar imagenes en ogRepository. Nuevo sistema de versionado.
- Se ha añadido la integracion con el ogAgent para poder ejecutar scripts.
- Se ha añadido el poder añadir descripcion a una imagen.
- Se han añadido 2 nuevos campos en la gestion de los repositorios: usuario y puerto ssh.
- Se ha añadido funcionalidad para poder gestionar el estado de un equipo de manera automatica. En caso de no haber conexion con el cliente, la web sera notificada en un tiempo maximo de 5 min.
### Improved
- Se han modificado los logs para que puedan "salir" por syslog ademas de por fichero.
### Fixed
- Se ha corregido el bug que hacia que cuando habia demasiados clientes, no se mostraran en pantalla debido a un error de memoria.
---
## [0.10.1] - 2025-03-25
### Improved
- Se ha modificado el script de creación de usuarios, añadiendole la opcion del tipo de visionalizacion por defecto de la vista "grupos".

View File

@ -8,6 +8,7 @@ use App\Dto\Output\OrganizationalUnitOutput;
use App\Entity\Client;
use App\Entity\NetworkSettings;
use App\Entity\OrganizationalUnit;
use App\Model\OrganizationalUnitTypes;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
@ -61,9 +62,10 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
$newNetworkSettings = $this->buildNetworkSettings($organizationalUnitEntity);
$this->updateChildrenNetworkSettings($organizationalUnitEntity, $newNetworkSettings);
$this->entityManager->flush();
$this->syncOgBoot($organizationalUnitEntity);
if ($organizationalUnitEntity->getType() === OrganizationalUnitTypes::CLASSROOM) {
//$this->syncOgBoot($organizationalUnitEntity);
}
}
@ -85,6 +87,7 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
}
$this->entityManager->persist($childUnit);
$this->entityManager->flush();
$this->updateChildrenNetworkSettings($childUnit, $networkSettings);
}
@ -113,6 +116,7 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
$newNetworkSettings->setMenu($organizationalUnitEntity->getNetworkSettings()->getMenu());
$newNetworkSettings->setRepository($organizationalUnitEntity->getNetworkSettings()->getRepository());
$newNetworkSettings->setOgLive($organizationalUnitEntity->getNetworkSettings()->getOgLive());
$newNetworkSettings->setNetiface($organizationalUnitEntity->getNetworkSettings()->getNetiface());
return $newNetworkSettings;
}
@ -123,10 +127,14 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
* @throws RedirectionExceptionInterface
* @throws ClientExceptionInterface
*/
private function syncOgBoot (OrganizationalUnit $organizationalUnitEntity): void
private function syncOgBoot(OrganizationalUnit $organizationalUnitEntity): void
{
$clients = $this->entityManager->getRepository(Client::class)->findClientsByOrganizationalUnitAndDescendants($organizationalUnitEntity->getId(), []);
if (empty($clients)) {
return;
}
/** @var Client $client */
foreach ($clients as $client) {
if ($client->getTemplate() === null) {