Añadida propiedad resolution a las OU para propagar la resolucion del menu en los clientes de dicha OU
parent
b13da39eca
commit
d5abd87d52
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## [1.6.1] - 2026-04-24
|
||||
### Added
|
||||
- Añadida propiedad Resolución de los menús a una Unidad Organizativa para poder propagarla a los equipos de dicha OU.
|
||||
|
||||
## [1.6.0] - 2026-04-21
|
||||
### Added
|
||||
- Creada nueva estructura jerárquica para administrar varios OgBoot servers, las clases PxeTemplate y OgLive ahora tiene una clase padre BootServer, de manera que tenemos una relación 1-N entre BootServer y dichas clases (un Boot Server puede tener varias Plantillas PXE y varios OgLives)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20260423151348 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add resolution field to network_settings table';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE network_settings ADD resolution VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE network_settings DROP resolution');
|
||||
}
|
||||
}
|
||||
|
|
@ -48,6 +48,7 @@ class PropagateNetworkSettingsAction extends AbstractController
|
|||
$client->setBootServer($networkSettings->getBootServer());
|
||||
$client->setOgLive($networkSettings->getOgLive());
|
||||
$client->setTemplate($networkSettings->getPxeTemplate());
|
||||
$client->setEthernet($networkSettings->getEthernet());
|
||||
}
|
||||
|
||||
$this->entityManager->flush();
|
||||
|
|
|
|||
|
|
@ -130,6 +130,13 @@ class NetworkSettingsInput
|
|||
)]
|
||||
public ?MenuOutput $menu = null;
|
||||
|
||||
#[Groups(['organizational-unit:write'])]
|
||||
#[ApiProperty(
|
||||
description: 'La resolución del menú',
|
||||
example: '1024x768'
|
||||
)]
|
||||
public ?string $resolution = null;
|
||||
|
||||
#[Groups(['organizational-unit:write'])]
|
||||
#[ApiProperty(
|
||||
description: 'El perfil de hardware de la configuración de red'
|
||||
|
|
@ -189,6 +196,7 @@ class NetworkSettingsInput
|
|||
$this->mcastPort = $networkSettings->getMcastPort();
|
||||
$this->mcastMode = $networkSettings->getMcastMode();
|
||||
$this->ogshare = $networkSettings->getOgshare();
|
||||
$this->resolution = $networkSettings->getResolution();
|
||||
|
||||
if ($networkSettings->getMenu()) {
|
||||
$this->menu = new MenuOutput($networkSettings->getMenu());
|
||||
|
|
@ -236,6 +244,7 @@ class NetworkSettingsInput
|
|||
$networkSettings->setMcastPort($this->mcastPort);
|
||||
$networkSettings->setMcastMode($this->mcastMode);
|
||||
$networkSettings->setOgshare($this->ogshare);
|
||||
$networkSettings->setResolution($this->resolution);
|
||||
|
||||
if ($this->menu) {
|
||||
$networkSettings->setMenu($this->menu->getEntity());
|
||||
|
|
|
|||
|
|
@ -109,6 +109,13 @@ final class NetworkSettingsOutput extends AbstractOutput
|
|||
)]
|
||||
public ?string $mcastMode = null;
|
||||
|
||||
#[Groups(['network-settings:read', "organizational-unit:read", "client:read"])]
|
||||
#[ApiProperty(
|
||||
description: 'La resolución de pantalla para el menú de arranque',
|
||||
example: '1024x768'
|
||||
)]
|
||||
public ?string $resolution = null;
|
||||
|
||||
#[Groups(['network-settings:read', "organizational-unit:read", "client:read"])]
|
||||
#[ApiProperty(
|
||||
description: 'El menú de arranque configurado',
|
||||
|
|
@ -191,6 +198,7 @@ final class NetworkSettingsOutput extends AbstractOutput
|
|||
$this->mcastPort = $networkSettings->getMcastPort();
|
||||
$this->mcastMode = $networkSettings->getMcastMode();
|
||||
$this->ogshare = $networkSettings->getOgshare();
|
||||
$this->resolution = $networkSettings->getResolution();
|
||||
|
||||
if ($networkSettings->getMenu()) {
|
||||
$this->menu = new MenuOutput($networkSettings->getMenu());
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ class NetworkSettings extends AbstractEntity
|
|||
#[ORM\Column(nullable: true)]
|
||||
private ?int $mcastPort = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $resolution = null;
|
||||
|
||||
/**
|
||||
* @var Collection<int, OrganizationalUnit>
|
||||
*/
|
||||
|
|
@ -369,4 +372,16 @@ class NetworkSettings extends AbstractEntity
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getResolution(): ?string
|
||||
{
|
||||
return $this->resolution;
|
||||
}
|
||||
|
||||
public function setResolution(?string $resolution): static
|
||||
{
|
||||
$this->resolution = $resolution;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ class OrganizationalUnit extends AbstractEntity
|
|||
$client->setBootServer($networkSettings->getBootServer());
|
||||
$client->setOgLive($networkSettings->getOgLive());
|
||||
$client->setTemplate($networkSettings->getPxeTemplate());
|
||||
$client->setResolution($networkSettings->getResolution());
|
||||
}
|
||||
|
||||
foreach ($this->getOrganizationalUnits() as $childUnit) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue