From 30b1b44876c49e2e0a71f1320fe6c1f698ca2a99 Mon Sep 17 00:00:00 2001 From: Samuel ORTION Date: Wed, 24 Aug 2022 07:13:35 +0200 Subject: [PATCH] www: Removed home made log controller --- www/src/Controller/LogsController.php | 39 --------------------------- 1 file changed, 39 deletions(-) delete mode 100644 www/src/Controller/LogsController.php diff --git a/www/src/Controller/LogsController.php b/www/src/Controller/LogsController.php deleted file mode 100644 index 4ce5e2f..0000000 --- a/www/src/Controller/LogsController.php +++ /dev/null @@ -1,39 +0,0 @@ -}/logs/{service}", name="logs_i18n") - */ - public function logs($service = "all") - { - $logs = ""; - if ($service === "all") { - foreach (explode(" ", $this->allowed_services) as $service) { - $logs .= $this->journal_logs($service); - } - } else if (str_contains($this->allowed_services, $service)) { - $logs .= $this->journal_logs($service); - } else { - return new Response("Service not found", Response::HTTP_BAD_REQUEST); - } - return $this->render('logs/logs.html.twig', [ - 'logs' => $logs - ]); - } - - private function journal_logs($service) - { - $logs = shell_exec("journalctl -u birdnet_recording -n 10"); - return $logs; - } -}