From 7e37599fb6a4b804f459fef4d40bfef4e24981bb Mon Sep 17 00:00:00 2001 From: afornerot Date: Thu, 23 Apr 2020 08:47:16 +0200 Subject: [PATCH] maj --- .../CronBundle/Controller/CronController.php | 17 +++++++++++++++++ .../CronBundle/Resources/config/routing.yml | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php index 55f80111..98e69db3 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php @@ -172,6 +172,23 @@ class CronController extends Controller ]); } + public function cronexecAction() { + return $this->render('CadolesCronBundle:Cron:exec.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + ]); + } + + public function cronexecreadAction() { + $kernel = $this->get('kernel'); + $path = $this->get('kernel')->getRootDir() . '/../var/logs/exec.log'; + $content = file_get_contents($path); + + $output["data"]=$content; + return new Response(json_encode($content), 200); + } + public function logAction(Request $request, $id) { $kernel = $this->get('kernel'); diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml b/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml index 7b87c43f..923f9672 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml @@ -14,6 +14,14 @@ cadoles_cron_config_exec: path: /config/cron/exec/{id} defaults: { _controller: CadolesCronBundle:Cron:exec } +cadoles_cron_config_cronexec: + path: /config/cron/cronexec + defaults: { _controller: CadolesCronBundle:Cron:cronexec } + +cadoles_cron_config_cronexecread: + path: /config/cron/cronexecread + defaults: { _controller: CadolesCronBundle:Cron:cronexecread } + cadoles_cron_config_log: path: /config/cron/log/{id} controller: CadolesCronBundle:Cron:log