From 7bd99d0af849cf009bdb69134c907e39a38566e6 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 24 May 2021 20:26:14 +0200 Subject: [PATCH] backports murph-skeleton --- assets/css/admin.scss | 11 +++++++++++ core/Cache/SymfonyCacheManager.php | 1 + core/Controller/Task/TaskAdminController.php | 5 ++++- core/Resources/views/task/task_admin/run.html.twig | 4 ++-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/assets/css/admin.scss b/assets/css/admin.scss index e6af956..e976e71 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -461,6 +461,17 @@ fieldset.form-group { } } +.modal-dialog-large { + max-width: 80%; +} + +.output { + &-console { + background: #073642; + line-height: normal; + } +} + .CodeMirror-fullscreen, .editor-toolbar.fullscreen { z-index: 2000; } diff --git a/core/Cache/SymfonyCacheManager.php b/core/Cache/SymfonyCacheManager.php index 6ddba95..4857aa5 100644 --- a/core/Cache/SymfonyCacheManager.php +++ b/core/Cache/SymfonyCacheManager.php @@ -65,6 +65,7 @@ class SymfonyCacheManager 'command' => 'cache:clear', '-e' => $this->kernel->getEnvironment(), '--no-warmup' => null, + '--ansi' => null, ]); $application->run($input, $output); diff --git a/core/Controller/Task/TaskAdminController.php b/core/Controller/Task/TaskAdminController.php index 51a3098..e8f20e6 100644 --- a/core/Controller/Task/TaskAdminController.php +++ b/core/Controller/Task/TaskAdminController.php @@ -10,6 +10,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; +use SensioLabs\AnsiConverter\AnsiToHtmlConverter; +use SensioLabs\AnsiConverter\Theme\SolarizedTheme; /** * @Route("/admin/task") @@ -45,7 +47,8 @@ class TaskAdminController extends AdminController $event = new TaskRunRequestedEvent($task, $request->query, $output); $eventDispatcher->dispatch($event, TaskRunRequestedEvent::RUN_REQUEST_EVENT); - $content = $output->fetch(); + $converter = new AnsiToHtmlConverter(new SolarizedTheme()); + $content = $converter->convert($output->fetch()); return $this->render('@Core/task/task_admin/run.html.twig', [ 'output' => $content, diff --git a/core/Resources/views/task/task_admin/run.html.twig b/core/Resources/views/task/task_admin/run.html.twig index dcfa3c1..536e73c 100644 --- a/core/Resources/views/task/task_admin/run.html.twig +++ b/core/Resources/views/task/task_admin/run.html.twig @@ -1,4 +1,4 @@ -