add ansi_to_html and update task output render
This commit is contained in:
parent
07ab45ce29
commit
e06ff59684
|
@ -21,10 +21,6 @@ $pagination-active-bg: #343a40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.flag-icon-en {
|
|
||||||
background-image: url(~flag-icon-css/flags/4x3/gb.svg);
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +29,10 @@ body {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flag-icon-en {
|
||||||
|
background-image: url(~flag-icon-css/flags/4x3/gb.svg);
|
||||||
|
}
|
||||||
|
|
||||||
.choices__list--dropdown {
|
.choices__list--dropdown {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,19 @@ tr.table-primary-light {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table tr {
|
||||||
|
td {
|
||||||
|
transition: border 500ms ease-out;
|
||||||
|
border-bottom: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
td {
|
||||||
|
border-bottom: 1px solid #a8aaac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bg-dark-blue {
|
.bg-dark-blue {
|
||||||
background: #242b3b;
|
background: #242b3b;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -129,6 +142,7 @@ tr.table-primary-light {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 260px;
|
width: 260px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -257,13 +271,6 @@ th {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-tiles {
|
|
||||||
background-color: #c1c1c1;
|
|
||||||
background-image: linear-gradient(45deg, #646464 25%, transparent 25%, transparent 75%, #646464 75%), linear-gradient(45deg, #646464 25%, transparent 25%, transparent 75%, #646464 75%);
|
|
||||||
background-size: 20px 20px;
|
|
||||||
background-position: 0 0, 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-form {
|
.tab-form {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
@ -459,3 +466,14 @@ fieldset.form-group {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-dialog-large {
|
||||||
|
max-width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.output {
|
||||||
|
&-console {
|
||||||
|
background: #073642;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"scheb/2fa-google-authenticator": "^5.7",
|
"scheb/2fa-google-authenticator": "^5.7",
|
||||||
"scheb/2fa-qr-code": "^5.7",
|
"scheb/2fa-qr-code": "^5.7",
|
||||||
"sensio/framework-extra-bundle": "^6.1",
|
"sensio/framework-extra-bundle": "^6.1",
|
||||||
|
"sensiolabs/ansi-to-html": "^1.2",
|
||||||
"stof/doctrine-extensions-bundle": "^1.6",
|
"stof/doctrine-extensions-bundle": "^1.6",
|
||||||
"symfony/apache-pack": "^1.0",
|
"symfony/apache-pack": "^1.0",
|
||||||
"symfony/asset": "5.2.*",
|
"symfony/asset": "5.2.*",
|
||||||
|
|
6
config/packages/ansi_to_html.yaml
Normal file
6
config/packages/ansi_to_html.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
services:
|
||||||
|
_defaults:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
|
||||||
|
SensioLabs\AnsiConverter\Bridge\Twig\AnsiExtension: null
|
|
@ -65,6 +65,7 @@ class SymfonyCacheManager
|
||||||
'command' => 'cache:clear',
|
'command' => 'cache:clear',
|
||||||
'-e' => $this->kernel->getEnvironment(),
|
'-e' => $this->kernel->getEnvironment(),
|
||||||
'--no-warmup' => null,
|
'--no-warmup' => null,
|
||||||
|
'--ansi' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$application->run($input, $output);
|
$application->run($input, $output);
|
||||||
|
|
|
@ -10,6 +10,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
use SensioLabs\AnsiConverter\AnsiToHtmlConverter;
|
||||||
|
use SensioLabs\AnsiConverter\Theme\SolarizedTheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Route("/admin/task")
|
* @Route("/admin/task")
|
||||||
|
@ -45,7 +47,8 @@ class TaskAdminController extends AdminController
|
||||||
$event = new TaskRunRequestedEvent($task, $request->query, $output);
|
$event = new TaskRunRequestedEvent($task, $request->query, $output);
|
||||||
$eventDispatcher->dispatch($event, TaskRunRequestedEvent::RUN_REQUEST_EVENT);
|
$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', [
|
return $this->render('@Core/task/task_admin/run.html.twig', [
|
||||||
'output' => $content,
|
'output' => $content,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog modal-dialog-large">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">
|
<h5 class="modal-title">
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<pre>{{ output|trim }}</pre>
|
<pre class="output-console">{{ output|raw }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'Close'|trans }}</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'Close'|trans }}</button>
|
||||||
|
|
12
symfony.lock
12
symfony.lock
|
@ -208,6 +208,18 @@
|
||||||
"config/packages/sensio_framework_extra.yaml"
|
"config/packages/sensio_framework_extra.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"sensiolabs/ansi-to-html": {
|
||||||
|
"version": "1.2",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "master",
|
||||||
|
"version": "1.2",
|
||||||
|
"ref": "d58d11d5b998f39260d387d3a0b50adc342db7e4"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/ansi_to_html.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"spomky-labs/otphp": {
|
"spomky-labs/otphp": {
|
||||||
"version": "v10.0.1"
|
"version": "v10.0.1"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue