refs #1943. Updated createTrace service
testing/ogcore-api/pipeline/head This commit looks good Details

develop
Manuel Aranda Rosales 2025-04-30 12:35:02 +02:00
parent e48917181f
commit 51cc5fac2c
2 changed files with 6 additions and 2 deletions

View File

@ -82,6 +82,7 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
$client->setOgLive($networkSettings->getOgLive());
$client->setMenu($networkSettings->getMenu());
$client->setRepository($networkSettings->getRepository());
$client->setTemplate($networkSettings->getPxeTemplate());
$this->entityManager->persist($client);
}
@ -116,6 +117,7 @@ final readonly class OrganizationalUnitSubscriber implements EventSubscriberInte
$newNetworkSettings->setMenu($organizationalUnitEntity->getNetworkSettings()->getMenu());
$newNetworkSettings->setRepository($organizationalUnitEntity->getNetworkSettings()->getRepository());
$newNetworkSettings->setOgLive($organizationalUnitEntity->getNetworkSettings()->getOgLive());
$newNetworkSettings->setPxeTemplate($organizationalUnitEntity->getNetworkSettings()->getPxeTemplate());
$newNetworkSettings->setNetiface($organizationalUnitEntity->getNetworkSettings()->getNetiface());
return $newNetworkSettings;

View File

@ -21,8 +21,9 @@ readonly class CreateTraceService
foreach ($commandTask->getClients() as $client) {
$trace = new Trace();
$trace->setClient($client);
$trace->setCommand($command);
$trace->setCommand($command->getName());
$trace->setStatus(TraceStatus::PENDING);
$trace->setInput($commandTask->getParameters());
$trace->setExecutedAt($commandTask->getDatetime());
$this->entityManager->persist($trace);
}
@ -33,7 +34,8 @@ readonly class CreateTraceService
foreach ($commandTask->getClients() as $client) {
$trace = new Trace();
$trace->setClient($client);
$trace->setCommand($command);
$trace->setCommand($command->getName());
$trace->setInput($commandTask->getParameters());
$trace->setStatus(TraceStatus::PENDING);
$trace->setExecutedAt($commandTask->getDatetime());
$this->entityManager->persist($trace);