- Added a new phpinfo menu item:
This commit is contained in:
parent
64b9a779de
commit
e898c6a23e
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"title" : "Debugging -- LEAN",
|
||||
"page-title": "Debugging",
|
||||
"logs": {
|
||||
"breadcrumb": "Logs"
|
||||
},
|
||||
"phpinfo": {
|
||||
"breadcrumb": "phpinfo()"
|
||||
}
|
||||
}
|
|
@ -21,7 +21,14 @@
|
|||
"label": "Caching"
|
||||
},
|
||||
|
||||
"request": {
|
||||
"debugging": {
|
||||
"label": "Debugging",
|
||||
"logs": "Logs",
|
||||
"phpinfo": "PhpInfo"
|
||||
},
|
||||
|
||||
|
||||
"request": {
|
||||
"label": "Request",
|
||||
"routes": "Routes"
|
||||
},
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
"title" : "Debugging -- LEAN",
|
||||
"page-title": "Déboguage",
|
||||
"logs": {
|
||||
"breadcrumb": "Logs"
|
||||
"breadcrumb": "Journaux d'événements"
|
||||
},
|
||||
"phpinfo": {
|
||||
"breadcrumb": "phpinfo()"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
"debugging": {
|
||||
"label": "Déboguage",
|
||||
"logs": "Logs"
|
||||
"logs": "Journaux d'événements",
|
||||
"phpinfo": "PhpInfo"
|
||||
},
|
||||
|
||||
"request": {
|
||||
|
|
|
@ -31,4 +31,15 @@ class Debugging extends Console {
|
|||
|
||||
return $this->renderView("lean-console/page/debugging/logs", get_defined_vars());
|
||||
}
|
||||
|
||||
#[Route(route: "/debugging/phpinfo", name: "lean.console:debugging-phpinfo")]
|
||||
public function phpinfo(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
ob_start() ;
|
||||
phpinfo() ;
|
||||
$phpinfo = ob_get_contents() ;
|
||||
ob_end_clean() ;
|
||||
|
||||
return $this->renderView("lean-console/page/debugging/phpinfo", get_defined_vars());
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Lean\Console\Controller;
|
||||
|
||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||
|
||||
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
|
||||
|
||||
use \Lean\Console\Lib;
|
||||
|
||||
class Dev {
|
||||
use Lib\ConsoleControllerTrait;
|
||||
|
||||
#[Route(route: "/phpinfo", name: "lean.dev:phpinfo")]
|
||||
public function home(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
||||
{
|
||||
phpinfo();
|
||||
die();
|
||||
}
|
||||
}
|
|
@ -33,4 +33,7 @@
|
|||
<ul>
|
||||
<li><a href="{% route 'lean.console:debugging-logs' %}">{% lang "lean.nav.debugging.logs" %}</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{% route 'lean.console:debugging-phpinfo' %}">{% lang "lean.nav.debugging.phpinfo" %}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "lean-console/base/layout" %}
|
||||
|
||||
{% language.set "lean.debugging" %}
|
||||
|
||||
{% title _("title") %}
|
||||
|
||||
{% section "header" %}
|
||||
<div class="page-title">{% _ "page-title" %}</div>
|
||||
{% endsection %}
|
||||
|
||||
{% section "breadcrumb-items" %}
|
||||
<li class="breadcrumb-item">{% _ 'phpinfo.breadcrumb' %}</li>
|
||||
{% endsection %}
|
||||
|
||||
{% section "content" %}
|
||||
|
||||
<section>
|
||||
<iframe src="data:text/html;base64,{{ base64_encode($phpinfo) }}" style="width:100%; height: calc(100vh - 112px - 8vh)">
|
||||
|
||||
</iframe>
|
||||
</section>
|
||||
{% endsection %}
|
Loading…
Reference in New Issue