From 1915649d17cebcada34d9d6dc5d4df856e22b91b Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Wed, 6 May 2026 17:28:11 +0200 Subject: [PATCH 1/2] Fixed typo disk logs --- src/Controller/OgAgent/GetDiskLogsAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/OgAgent/GetDiskLogsAction.php b/src/Controller/OgAgent/GetDiskLogsAction.php index d25491b..efcf9e7 100644 --- a/src/Controller/OgAgent/GetDiskLogsAction.php +++ b/src/Controller/OgAgent/GetDiskLogsAction.php @@ -15,7 +15,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; #[AsController] class GetDiskLogsAction extends AbstractController { - private const LOG_DIR = '/var/log/ogClients/'; + private const LOG_DIR = '/var/log/ogclients/'; public function __construct( private readonly LoggerInterface $logger, @@ -29,7 +29,7 @@ class GetDiskLogsAction extends AbstractController } $ip = $client->getIp(); - $logPath = self::LOG_DIR . $ip . '/clieng.log'; + $logPath = self::LOG_DIR . $ip . '/client.log'; if (!file_exists($logPath)) { throw new NotFoundHttpException(sprintf('No disk log file found for client %s.', $ip)); From 99e4c0241128bd5dbea8c9317693cb09de9befed Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Wed, 6 May 2026 17:34:21 +0200 Subject: [PATCH 2/2] Fixed OU scope task --- src/Command/RunScheduledCommandTasksCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Command/RunScheduledCommandTasksCommand.php b/src/Command/RunScheduledCommandTasksCommand.php index f57456f..675d0a9 100644 --- a/src/Command/RunScheduledCommandTasksCommand.php +++ b/src/Command/RunScheduledCommandTasksCommand.php @@ -21,6 +21,7 @@ use App\Entity\Trace; use App\Model\ClientStatus; use App\Model\CommandTypes; use App\Model\TraceStatus; +use App\Repository\ClientRepository; use App\Repository\CommandTaskRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Attribute\AsCommand; @@ -34,6 +35,7 @@ class RunScheduledCommandTasksCommand extends Command { public function __construct( private readonly CommandTaskRepository $commandTaskRepository, + private readonly ClientRepository $clientRepository, private readonly EntityManagerInterface $entityManager, private readonly RunScriptAction $runScriptAction, private readonly DeployImageAction $deployImageAction, @@ -101,7 +103,8 @@ class RunScheduledCommandTasksCommand extends Command $scriptParameters = $script->getParameters(); if ($task->getScope() !== 'clients') { - $clients = $task->getOrganizationalUnit()?->getClients(); + $ou = $task->getOrganizationalUnit(); + $clients = $ou ? $this->clientRepository->findClientsByOrganizationalUnitAndDescendants($ou->getId()) : []; } else { $clients = $task->getClients(); }