- UI Revamp

- Some i18n added/fixed
- WIP on a new testing mechanism
This commit is contained in:
mcndave committed 2026-11-25 19:18:36 +00:00
1 parent f5014e1cee
commit 58c61a8f01
76 files changed
+1428 -313

No files matched your search

+56 -34
View File
@@ -1,40 +1,62 @@
<nav id="main-nav">
<div class="app-title">LEAN {{ $this->version() }}</div>
{% use Psr\Http\Message\ServerRequestInterface %}
<label>{% lang "lean.nav.lean.label" %}</label>
<ul>
<li><a href="{% route 'lean.console:home' %}">{% lang "lean.nav.lean.dashboard" %}</a></li>
<li><a href="{% route 'lean.console:update' %}">{% lang "lean.nav.lean.update" %}</a></li>
</ul>
{% function.inline navItem(ServerRequestInterface $request, string $route, string $lang) %}
<li class="{% if $request->getAttribute('lean.route')->match($route) %}active{% endif %}">
<a href="{% route $route %}">{% lang $lang %}</a>
</li>
{% endfunction %}
<label>{% lang "lean.nav.request.label" %}</label>
<ul>
<li><a href="{% route 'lean.console:request.route' %}">{% lang "lean.nav.request.routes" %}</a></li>
</ul>
<div id="main-nav">
<nav>
<div class="app-title" style="">
<div style="width:30px; height:30px; border-radius:50%; background:#7c3aed; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px;">L</div>
<div>LEAN {{ $this->version() }}</div>
</div>
<label>{% lang "lean.nav.storage.label" %}</label>
<ul>
{#<li><a href="{{ url('~/storage') }}">{% lang "lean.nav.storage.summary" %}</a></li>#}
<li><a href="{% route 'lean.console:storage.database' %}">{% lang "lean.nav.storage.database" %}</a></li>
<li><a href="{% route 'lean.console:storage.session' %}">{% lang "lean.nav.storage.session" %}</a></li>
</ul>
<label>{% lang "lean.nav.core.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:home', "lean.nav.core.dashboard") }}
{{= $navItem($request, 'lean.console:update', "lean.nav.core.update") }}
<label>{% lang "lean.nav.templating.label" %}</label>
<ul>
<li><a href="{% route 'lean.console:templating.picea' %}">{% lang "lean.nav.templating.picea" %}</a></li>
</ul>
</ul>
<label>{% lang "lean.nav.caching.label" %}</label>
<ul>
<li><a href="{% route 'lean.console:caching' %}">{% lang "lean.nav.templating.picea" %}</a></li>
</ul>
<label>{% lang "lean.nav.request.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:request.route', "lean.nav.request.routes") }}
</ul>
<label>{% lang "lean.nav.debugging.label" %}</label>
<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>
<hr>
<label>{% lang "lean.nav.storage.label" %}</label>
<ul>
{#<li><a href="{{ url('~/storage') }}">{% lang "lean.nav.storage.summary" %}</a></li>#}
{{= $navItem($request, 'lean.console:storage.database', "lean.nav.storage.database") }}
{{= $navItem($request, 'lean.console:storage.session', "lean.nav.storage.session") }}
</ul>
<label>{% lang "lean.nav.templating.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:templating.picea', "lean.nav.templating.picea") }}
</ul>
<label>{% lang "lean.nav.caching.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:caching', "lean.nav.templating.picea") }}
</ul>
<label>{% lang "lean.nav.testing.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:testing.tests', "lean.nav.testing.tests") }}
</ul>
<label>{% lang "lean.nav.debugging.label" %}</label>
<ul>
{{= $navItem($request, 'lean.console:debugging-logs', "lean.nav.debugging.logs") }}
</ul>
<ul>
{{= $navItem($request, 'lean.console:debugging-phpinfo', "lean.nav.debugging.phpinfo") }}
</ul>
</nav>
<div class="button">
<a class="btn-purple" href="{% url %}">⇠ Exit Console</a>
</div>
</div>
+12 -8
View File
@@ -8,9 +8,13 @@
<meta name="author" content="Dave Mc Nicoll">
<meta name="msapplication-TileColor" content="#ccc">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Ctext%20x='0'%20y='14'%3E🔳%3C/text%3E%3C/svg%3E" type="image/svg+xml" />
<link rel="icon" type="image/png" href="{% asset:path 'lean-console/favicon/favicon-96x96.png' %}" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="{% asset:path 'lean-console/favicon/favicon.svg' %}" />
<link rel="shortcut icon" href="{% asset:path 'lean-console/favicon/favicon.ico' %}" />
<link rel="apple-touch-icon" sizes="180x180" href="{% asset:path 'lean-console/favicon/apple-touch-icon.png' %}" />
<meta name="apple-mobile-web-app-title" content="Lean Console" />
<link rel="stylesheet" href='{% asset:path "lean-console/lean-console-bw.css" %}'>
<script type="module" src="{% asset 'static/lean-console/app.js' %}"></script>
<title>{{ title() }}</title>
@@ -25,24 +29,24 @@
<div id="right-panel">
<header id="body-header">
{% section "header" %}
<div class="flex align-items-center justify-content-end">
<a class="btn-blue" href="{% url %}">⇠ Return</a>
</div>
{% endsection %}
{% section "header" %}{% endsection %}
</header>
<div id="subheader">
<h1>{% section "subheader" %}{% _ "page-title" %}{% endsection %}</h1>
{% section "breadcrumb" %}
<ul class="breadcrumb">
<li class="breadcrumb-item">Console</li>
{% section "breadcrumb-items" %}{% endsection %}
</ul>
{% endsection %}
<h1>{% section "subheader" %}{% _ "page-title" %}{% endsection %}</h1>
</div>
<section id="main-content">
{% section "message" %}
{% view "lean/widget/message" %}
{% endsection %}
{% section "content" %}{% endsection %}
</section>
</div>
+41 -19
View File
@@ -9,42 +9,64 @@
{% endsection %}
{% section "content" %}
{% foreach $list as $path => $folder %}
<section>
<header>
<h2>{{ $path }}</h2>
<section class="picea">
<header>
<div class="flex align-items-center">
<div class="icon-picea icon-purple">
{% include "lean-console/svg/icon-picea.svg" %}
</div>
{% ui:form.post "caching.picea" %}
<button class="btn-red" type="submit">{% _ 'clear' %}</button>
{% ui:endform %}
</header>
<h2>{% _ "header" %}</h2>
</div>
{% ui:form.post "caching.picea" %}
<button class="btn-red" type="submit">{% _ 'clear' %}</button>
{% ui:endform %}
</header>
<article class="has-table">
<strong class="grid grid-nogutter sticky">
<div class="col-4 name">{% _ "table.name" %}</div>
<div class="col-2 namespace">
{% _ "table.namespace" %}
</div>
<div class="col-6">
{% _ "table.view" %}
</div>
</strong>
{% foreach $list as $path => $folder %}
<div class="path">{{ $path }}</div>
<article class="picea">
{% foreach $folder as $file %}
{% php $import = include($file) %}
<div class="grid">
<strong class="col route-name">{{ substr((string) $file, strlen($path)) }}</strong>
<div class="grid grid-nogutter content">
<div class="col-4 name">{{ substr((string) $file, strlen($path)) }}</div>
<div class="col">
<div class="col-2 namespace">
{{ $import['namespace'] }}
</div>
<div class="col">
<div class="col-6 view-path">
{{ $import['view'] }}
</div>
</div>
{% endforeach %}
</article>
</section>
{% endforeach %}
{% endforeach %}
</article>
</section>
<style>
section > header {display:flex;justify-content: space-between}
.picea h5 {font-size:1.5em; line-height:2em; font-weight:bold;text-decoration:underline}
.picea strong.grid {background: #242528;color: #fff;}
.picea strong.grid {background: #8b93a4;color: #fff;}
.picea .grid {padding:0.66rem 0.3rem;align-items:center}
.picea .grid strong {color:#444}
.picea .grid:nth-child(even) {background: #e3e3e3 }
.picea .path {background: #eee;font-weight: bold;line-height: 1.8rem;padding: 0 8px;color: #797979;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;}
.picea .content .name {color:#7c3aed;font-weight:600}
.picea .content .view-path {font-size:90%;color:#666}
.picea .grid:nth-child(even) {background: #fafafa }
</style>
{% endsection %}
+6 -1
View File
@@ -7,7 +7,12 @@
{% section "content" %}
<section>
<header>
<h2>{{ $path }}</h2>
<div class="flex align-items-center">
<div class="icon-logs icon-purple">
{% include "lean-console/svg/icon-logs.svg" %}
</div>
<h2>{{ $path }}</h2>
</div>
{% ui:form.get current_url() %}
<small>{% _ 'logs.line' %} {% ui:text 'line', get('line') ?? 100, [ 'onchange' => "this.closest('form').submit()" ] %}</small>
+24 -12
View File
@@ -9,28 +9,36 @@
{% endsection %}
{% function routeHtml($route) %}
<div class="grid">
<strong class="col-2 route-name">{{ $route->name }}</strong>
<div class="grid grid-nogutter content">
<strong class="col-3 route-name">{{ $route->name }}</strong>
<div class="col-3 route-uri">{{ $route->getRoute() }}</div>
<div class="col-2 route-methods">{{ implode(', ', (array) ( $route->method ?? $route->methods )) }}</div>
<div class="col-1 route-methods">
{% foreach (array) $route->method as $method %}
<span class="http-method-{% echo.lc $method %}">{{ $method }}</span>
{% endforeach %}
</div>
<div class="col controller-method">
<span class="class">{{ $route->class }}</span>::<span>{{ $route->classMethod }}</span>
<span class="class">{{ ltrim($route->class, '\\') }}</span>::<span>{{ $route->classMethod }}</span>
</div>
</div>
{% endfunction %}
{% section "content" %}
<section>
<section class="routes">
<header>
<div class="icon-routes icon-purple">
{% include "lean-console/svg/icon-route.svg" %}
</div>
<h2>{% _ 'route.header' %}</h2>
</header>
<article class="routes">
<article class="has-table">
{% if $routes %}
<strong class="grid">
<div class="col-2 route-name">{% _ 'route.name' %}</div>
<strong class="grid grid-nogutter">
<div class="col-3 route-name">{% _ 'route.name' %}</div>
<div class="col-3 route-uri">{% _ 'route.uri' %}</div>
<div class="col-2 route-methods">{% _ 'route.methods' %}</div>
<div class="col-1 route-methods">{% _ 'route.methods' %}</div>
<div class="col controller-method">{% _ 'route.target' %}</div>
</strong>
@@ -52,9 +60,13 @@
</section>
<style>
.routes strong.grid {background: #242528;color: #fff;}
[class*="http-method-"]:not(:last-child):after {content: ",";color: #5e5e5e}
.routes strong.grid {background: #8b93a4;color: #fff;}
.routes .content .route-name {color:#7c3aed}
.routes .content .route-methods {font-weight:normal}
.routes .content .controller-method {color:#777;font-size:90%}
.routes .content .route-uri {font-size:90%}
.routes .grid {padding:0.66rem 0.3rem}
.routes .grid strong {color:#444}
.routes .grid:nth-child(even) {background: #e3e3e3 }
.routes .grid:nth-child(even) {background: #fafafa}
</style>
{% endsection %}
+58 -86
View File
@@ -13,110 +13,82 @@
{% section "content" %}
{% if $connections %}
{% foreach $connections as $connection %}
<section>
{% php $conf = $connection->getConfiguration(); %}
<article class="databases">
<strong class="grid db-grid">
<div class="col db-connection">{% _ 'database.connection' %}</div>
<div class="col db-adapter">{% _ 'database.adapter' %}</div>
<div class="col db-host">{% _ 'database.host' %}</div>
<div class="col db-name">{% _ 'database.name' %}</div>
<div class="col db-username">{% _ 'database.username' %}</div>
</strong>
{% php $conf = $connection->getConfiguration(); %}
<div class="grid db-grid">
<div class="col db-connection">{{ $connection->name }}</div>
<div class="col db-adapter">{{ $connection->adapter()::class }}</div>
<div class="col db-host">{{ $connection->adapter()->hostname ?? '-' }}:{{ $connection->adapter()->port ?? '-' }}</div>
<div class="col db-name">{{ $connection->adapter()->database ?? $connection->adapter()->path ?? '-' }}</div>
<div class="col db-username">{{ $connection->adapter()->username ?? '-' }}</div>
<section class="connection">
<header>
<div class="icon-database icon-purple">
{% include "lean-console/svg/icon-database.svg" %}
</div>
<div class="tables">
<strong class="grid table-item">
<div class="col col-4">{% _ 'database.table.name' %}</div>
<div class="col col-2 text-center">{% _ 'database.table.table-fields' %}</div>
<div class="col col-3 text-center">{% _ 'database.table.query' %}</div>
<div class="col col-2 text-center">{% _ 'database.table.count' %}</div>
<div class="col col-1 text-center">{% _ 'database.table.actions' %}</div>
</strong>
<h2>{% _.raw 'database.connection', [ 'name' => $connection->name ] %}</h2>
</header>
{% ui:form.post "database.migrate", current_url() %}
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
<div class="grid table-item align-items-center">
<div class="col col-4"><span>📄</span> <span>{{ $item->tableName() }}</span></div>
<div class="col col-2 text-center">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</div>
<div class="col col-3 text-center">
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
<code>{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
{% else %}
<div style="color:#abecab">&#x2713 {% _ 'database.table.uptodate' %}</div>
{% endif %}
<article>
{% ui:form.post "database.migrate", current_url() %}
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
<div class="single-table grid">
<div class="col-5 col-xxl flex align-items-center">
<div class="icon-yellow">
{% include "lean-console/svg/icon-table.svg" %}
</div>
<div class="col col-2 text-center">
{% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %}
{{ $entity::repository()->count() }}
{% endif %}
</div>
<div>
<div class="tablename">{{ $item->tableName() }}</div>
<div class="classname">{{ $entity }}</div>
<div class="tableinfo">
<span class="fieldcount">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</span>
<div class="col col-1 text-center">
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
{% case ModifierTypeEnum::Create %}
{% php $createAll[] = $entity %}
<div class="text-right">
<button name="create" value="{{$entity}}" class="btn-blue">&#x2713; {% _ 'database.table.create' %}</button>
</div>
{% break %}
{% case ModifierTypeEnum::Alter %}
{% php $alterAll[] = $entity %}
<div class="text-right">
<button name="alter" value="{{$entity}}" class="btn-blue">&#x2713; {% _ 'database.table.alter' %}</button>
</div>
{% break %}
{% endswitch %}
<div class="text-right">
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-gray">{% _ 'database.table.add-column' %}</a>
{% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %}
<span class="entriescount">{% _.raw 'database.table.entries', [ 'count' => $entity::repository()->count() ] %}</span>
{% endif %}
</div>
</div>
</div>
{% endforeach %}
{% if ($createAll ?? 0) > 1 %}
<div class="text-right" style="padding:0.5rem 0">
<button name="createAll" value="{{ implode(',', $createAll) }}" class="btn-red">&#x2713; {% _ 'database.table.createAll' %}</button>
<div class="col-5 col-lg flex align-items-center">
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
<code class="query">{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
{% else %}
<code class="uptodate">&#x2713 {% _ 'database.table.uptodate' %}</code>
{% endif %}
</div>
{% endif %}
{% if ($alterAll ?? 0) > 1 %}
<div class="text-right" style="padding:0.5rem 0">
<button name="alterAll" value="{{ implode(',', $alterAll) }}" class="btn-red">&#x2713; {% _ 'database.table.alterAll' %}</button>
<div class="col-2 col-lg flex align-items-center">
<div class="btn-wrapper">
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
{% case ModifierTypeEnum::Create %}
{% php $createAll[] = $entity %}
<button name="create" value="{{$entity}}" class="btn-red btn-sm">&#x2713; {% _ 'database.table.create' %}</button>
</div>
{% break %}
{% case ModifierTypeEnum::Alter %}
{% php $alterAll[] = $entity %}
<button name="alter" value="{{$entity}}" class="btn-blue btn-sm">&#x2713; {% _ 'database.table.alter' %}</button>
{% break %}
{% endswitch %}
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-purple btn-sm">{% _ 'database.table.add-column' %}</a>
</div>
</div>
{% endif %}
{% ui:endform %}
</div>
</div>
{% endforeach %}
{% ui:endform %}
</article>
</section>
{% endforeach %}
{% endif %}
<style>
.databases strong.grid {background: #888a91;color:#fff}
.databases .db-grid {padding:0.66rem 0.3rem}
.databases .db-grid strong {color:#444}
.databases .db-grid:nth-child(even) {background: #e3e3e3;line-height: 1.5em;font-size: 1.3em;}
.databases .tables .table-item {padding:0.33rem 0;background:rgba(255,255,255,0.1);line-height: 1.8em;}
.databases .tables .table-item:nth-child(even) {background:rgba(255,255,255,0.2)}
.databases summary {background: #172841;color:#fff;margin: 0 -8px 0 -8px;padding:7px 10px}
.tables {background: #2d3137;margin: 0 -8px 0 -8px;color: #fff;padding: 2px 10px;}
.tables label {padding:10px 5px;display:block}
section + section { margin-top:15px; }
.connection .single-table {padding: 10px 5px 10px 5px;}
.connection .single-table:nth-child(2n + 1) {background: #fafafa;}
.connection .single-table + .single-table {border-top: 1px solid #eaeaea;}
.connection + .connection { margin-top:25px ;}
.connection .tablename {font-weight:bold;margin-bottom:5px;text-transform: uppercase}
.connection .tableinfo {color: #9c9b9b;font-size:85%;margin-top:2px}
.connection .classname {color: #601a7b; line-height:1.2rem}
.connection .entriescount:before {content:"•"; padding-right: 8px; padding-left: 2px}
.connection .query {color:#6f0463;white-space: pre;border-color:#c9a5c7}
.connection .uptodate {color:#0a9178;border-color:#a0d2ca}
.connection .btn-wrapper {display:flex; flex-direction:column; gap:5px; max-width:80%; margin-left:auto }
</style>
{% endsection %}
@@ -0,0 +1,123 @@
{% use Lean\Console\Lib\Database\ModifierTypeEnum %}
{% extends "lean-console/base/layout" %}
{% language.set "lean.storage" %}
{% title _("title") %}
{% section "breadcrumb-items" %}
<li class="breadcrumb-item">{% _ 'database.breadcrumb' %}</li>
{% endsection %}
{% section "content" %}
{% if $connections %}
{% foreach $connections as $connection %}
<section>
{% php $conf = $connection->getConfiguration(); %}
<article class="databases">
<strong class="grid db-grid">
<div class="col db-connection">{% _ 'database.connection' %}</div>
<div class="col db-adapter">{% _ 'database.adapter' %}</div>
<div class="col db-host">{% _ 'database.host' %}</div>
<div class="col db-name">{% _ 'database.name' %}</div>
<div class="col db-username">{% _ 'database.username' %}</div>
</strong>
<div class="grid db-grid">
<div class="col db-connection">{{ $connection->name }}</div>
<div class="col db-adapter">{{ $connection->adapter()::class }}</div>
<div class="col db-host">{{ $connection->adapter()->hostname ?? '-' }}:{{ $connection->adapter()->port ?? '-' }}</div>
<div class="col db-name">{{ $connection->adapter()->database ?? $connection->adapter()->path ?? '-' }}</div>
<div class="col db-username">{{ $connection->adapter()->username ?? '-' }}</div>
</div>
<div class="tables">
<strong class="grid table-item">
<div class="col col-4">{% _ 'database.table.name' %}</div>
<div class="col col-2 text-center">{% _ 'database.table.table-fields' %}</div>
<div class="col col-3 text-center">{% _ 'database.table.query' %}</div>
<div class="col col-2 text-center">{% _ 'database.table.count' %}</div>
<div class="col col-1 text-center">{% _ 'database.table.actions' %}</div>
</strong>
{% ui:form.post "database.migrate", current_url() %}
{% foreach array_filter($migrations->entities, fn($e) => $e->databaseAdapter() === $connection) as $entity => $item %}
<div class="grid table-item align-items-center">
<div class="col col-4"><span>📄</span> <span>{{ $item->tableName() }}</span></div>
<div class="col col-2 text-center">{% _ "database.table.fields", [ 'count' => count( $item->fieldList() ) ] %}</div>
<div class="col col-3 text-center">
{% if $context->definition[$entity]['table']->modifier->query ?? false %}
<code>{{= implode('<br><br>',(array) $context->definition[$entity]['table']->modifier->query) }}</code>
{% else %}
<div style="color:#abecab">&#x2713 {% _ 'database.table.uptodate' %}</div>
{% endif %}
</div>
<div class="col col-2 text-center">
{% if $context->definition[$entity]['table']->modifier->type !== ModifierTypeEnum::Create %}
{{ $entity::repository()->count() }}
{% endif %}
</div>
<div class="col col-1 text-center">
{% switch $context->definition[$entity]['table']->modifier->type ?? false %}
{% case ModifierTypeEnum::Create %}
{% php $createAll[] = $entity %}
<div class="text-right">
<button name="create" value="{{$entity}}" class="btn-blue">&#x2713; {% _ 'database.table.create' %}</button>
</div>
{% break %}
{% case ModifierTypeEnum::Alter %}
{% php $alterAll[] = $entity %}
<div class="text-right">
<button name="alter" value="{{$entity}}" class="btn-blue">&#x2713; {% _ 'database.table.alter' %}</button>
</div>
{% break %}
{% endswitch %}
<div class="text-right">
<a href="{% route 'lean.console:storage.database_insert', [ 'source' => $entity ] %}" class="btn-gray">{% _ 'database.table.add-column' %}</a>
</div>
</div>
</div>
{% endforeach %}
{% if ($createAll ?? 0) > 1 %}
<div class="text-right" style="padding:0.5rem 0">
<button name="createAll" value="{{ implode(',', $createAll) }}" class="btn-red">&#x2713; {% _ 'database.table.createAll' %}</button>
</div>
{% endif %}
{% if ($alterAll ?? 0) > 1 %}
<div class="text-right" style="padding:0.5rem 0">
<button name="alterAll" value="{{ implode(',', $alterAll) }}" class="btn-red">&#x2713; {% _ 'database.table.alterAll' %}</button>
</div>
{% endif %}
{% ui:endform %}
</div>
</article>
</section>
{% endforeach %}
{% endif %}
<style>
.databases strong.grid {background: #888a91;color:#fff}
.databases .db-grid {padding:0.66rem 0.3rem}
.databases .db-grid strong {color:#444}
.databases .db-grid:nth-child(even) {background: #e3e3e3;line-height: 1.5em;font-size: 1.3em;}
.databases .tables .table-item {padding:0.33rem 0;background:rgba(255,255,255,0.1);line-height: 1.8em;}
.databases .tables .table-item:nth-child(even) {background:rgba(255,255,255,0.2)}
.databases summary {background: #172841;color:#fff;margin: 0 -8px 0 -8px;padding:7px 10px}
.tables {background: #2d3137;margin: 0 -8px 0 -8px;color: #fff;padding: 2px 10px;}
.tables label {padding:10px 5px;display:block}
section + section { margin-top:15px; }
</style>
{% endsection %}
+20 -14
View File
@@ -1,31 +1,36 @@
{% extends "lean-console/base/layout" %}
{% language.set "lean.storage" %}
{% language.set "lean.storage.session" %}
{% title _("title") %}
{% section "breadcrumb-items" %}
<li class="breadcrumb-item">{% _ 'session.breadcrumb' %}</li>
<li class="breadcrumb-item">{% _ 'breadcrumb' %}</li>
{% endsection %}
{% section "content" %}
<section>
<section class="sessions">
<header>
<h2>{% _ 'session.header' %}</h2>
<div class="icon-session icon-purple">
{% include "lean-console/svg/icon-user.svg" %}
</div>
<h2>{% _ 'header' %}</h2>
</header>
<article class="sessions">
<strong class="grid">
<div class="col route-name">{% _ 'session.count', [ 'count' => count($sessions) ] %}</div>
<article class="has-table">
<strong class="grid grid-nogutter">
<div class="col filename">{% _ 'count', [ 'count' => count($sessions) ] %}</div>
</strong>
{% foreach $sessions as $session %}
<div class="grid">
<strong class="col route-name">{{ $session }}</strong>
<div class="grid grid-nogutter content">
<div class="col filename">{{ $session }}</div>
<div class="col">{{ filesize(realpath($path . DIRECTORY_SEPARATOR . $session)) }} byte(s)</div>
<div class="col">{{ date('Y-m-d H:i:s', filemtime(realpath($path . DIRECTORY_SEPARATOR . $session))) }}</div>
<div class="col text-right">
<a target="_blank" class="btn-red" href="{% route 'lean.console:storage.session_content', [ 'hash' => $session ] %}">
Voir
<a target="_blank" class="btn-purple btn-sm" href="{% route 'lean.console:storage.session_content', [ 'hash' => $session ] %}">
{% _ "table.view" %}
</a>
</div>
</div>
@@ -34,9 +39,10 @@
</section>
<style>
.sessions strong.grid {background: #242528;color: #fff;}
.sessions strong.grid {background: #8b93a4;color: #fff;}
.sessions .grid {padding:0.66rem 0.3rem;align-items:center;justify-content:space-between;}
.sessions .grid strong {color:#444}
.sessions .grid:nth-child(even) {background: #e3e3e3 }
.sessions .content .filename {color:#7c3aed;font-weight:bold}
.sessions .grid {padding:0.66rem 0.3rem}
.sessions .grid:nth-child(even) {background: #fafafa }
</style>
{% endsection %}
+35 -19
View File
@@ -9,33 +9,49 @@
{% endsection %}
{% section "content" %}
{% foreach $list as $path => $folder %}
<section>
<header>
<h2>{{ $path }}</h2>
</header>
<section class="picea">
<header>
<div class="icon-picea icon-purple">
{% include "lean-console/svg/icon-picea.svg" %}
</div>
<h2>{% _ "header" %}</h2>
</header>
<article class="has-table">
<strong class="grid grid-nogutter">
<div class="col folder">{% _ "filename" %}</div>
</strong>
{% foreach $list as $path => $folder %}
<div class="path">{{ $path }}</div>
<article class="picea">
{% foreach $folder as $file %}
<div class="grid">
<strong class="col route-name">{{ substr((string) $file, strlen($path)) }}</strong>
<div>
{#<a target="_blank" class="btn-red" href="">
<div class="grid grid-nogutter content">
<strong class="col filename">{{ substr((string) $file, strlen($path)) }}</strong>
{#<div>
<a target="_blank" class="btn-red" href="">
Voir
</a>#}
</div>
</a>
</div>#}
</div>
{% or %}
<div class="grid grid-nogutter content">
<i class="col empty">{% _ "table.empty" %}</i>
</div>
{% endforeach %}
</article>
</section>
{% endforeach %}
{% endforeach %}
</article>
</section>
<style>
.picea h5 {font-size:1.5em; line-height:2em; font-weight:bold;text-decoration:underline}
.picea strong.grid {background: #242528;color: #fff;}
.picea strong.grid {background: #8b93a4;color: #fff;}
.picea .grid {padding:0.66rem 0.3rem;align-items:center}
.picea .grid strong {color:#444}
.picea .grid:nth-child(even) {background: #e3e3e3 }
section + section {margin-top:1.2rem}
.picea .path {background: #eee;font-weight:bold; line-height:1.8rem; padding: 0 8px;color: #797979;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;}
.picea .content .filename {color:#7c3aed}
.picea .empty {color:#888}
.picea .grid.content:nth-child(even) {background: #fafafa }
</style>
{% endsection %}
@@ -0,0 +1,92 @@
{% extends "lean-console/base/layout" %}
{% language.set "lean.testing" %}
{% title _("title") %}
{% section "breadcrumb-items" %}
<li class="breadcrumb-item">{% _ 'breadcrumb' %}</li>
{% endsection %}
{% section "content" %}
<section class="test-suite">
<header class="justify-content-between">
<div class="flex align-items-center">
<div class="icon-test icon-purple">
{% include "lean-console/svg/icon-test.svg" %}
</div>
<h2>{% _ "header" %}</h2>
</div>
<div><button class="btn-green btn-sm">Run all &gt;︎</button></div>
</header>
<article>
{% foreach $this->testFetcher->compile() as $class => $definition %}
<console-test class="test-class" data-class="{{ $class }}">
<div class="subheader flex align-items-center w-100">
<div class="icon-pink">
{% include "lean-console/svg/icon-php.svg" %}
</div>
<div class="classname">
<h3>{{ ltrim($class, '\\') }}</h3>
<button class="btn-pink btn-sm run-full">Run full class &gt;︎</button>
</div>
</div>
{% foreach $definition->methods as $method %}
<div class="single-test grid align-items-center" data-status="awaiting" data-method="{{ $method->name }}" data-http-method="{% echo.uc $method->attribute->method %}" data-name="{{ $method->attribute->name }}">
<div class="col-6 basic-info flex align-items-center">
<div class="icon-gray icon-sm awaiting">{% include "lean-console/svg/icon-awaiting.svg" %}</div>
<div class="icon-yellow icon-sm pending">{% include "lean-console/svg/icon-pending.svg" %}</div>
<div class="icon-red icon-sm failure">{% include "lean-console/svg/icon-failure.svg" %}</div>
<div class="icon-green icon-sm success">{% include "lean-console/svg/icon-success.svg" %}</div>
<span class="method-name">{{ $method->name }}()</span><span class="method-description">{{ $method->attribute->name }}</span>
</div>
<div class="col-5">
<span class="http-method-{% echo.lc $method->attribute->method %}">{{ $method->attribute->method }}</span>
</div>
<div class="col-1 text-right">
{% ui:form.post "tests.run" %}
{% ui:hidden "class", $class %}
{% ui:hidden "name", $method->attribute->name %}
{% ui:hidden "method", $method->attribute->method %}
<button type="submit" class="btn-purple btn-sm " {% if $method->attribute->after %}disabled="disabled"{% endif %}>Run ></button>
{% ui:endform %}
</div>
</div>
{% endforeach %}
</console-test>
{% endforeach %}
</article>
</section>
<style>
#main-content section [data-status] [class*="icon-"] {display:none}
#main-content section [data-status="awaiting"] .awaiting,
#main-content section [data-status="failure"] .failure,
#main-content section [data-status="pending"] .pending,
#main-content section [data-status="success"] .success {display:flex;}
.test-suite [data-status="awaiting"] .single-test {color: #727272;}
.test-suite [data-status="failure"] .single-test {color: #bd1e1e;}
.test-suite [data-status="pending"] .single-test {color: #c8a704;}
.test-suite [data-status="success"] .single-test {color: #2fac31;}
.test-suite console-test {display:block;}
.test-suite .test-class + .test-class {margin-top:15px}
.test-suite .single-test:nth-child(2n+1) {background: #f7f7f7;}
.test-suite .classname {border-bottom: 1px solid #a41a92;padding:6px 0 0 0; margin-bottom:10px; display:flex;justify-content: space-between; align-items:center; flex:1}
.test-suite .classname .btn-sm {margin-bottom:5px;}
.test-suite h3 {color:#a41a92;font-weight: 600;text-transform: uppercase}
.test-suite .method-name {color:#b24286;min-width:100px;}
.test-suite .method-description {padding-left:8px}
.test-suite .basic-info {padding:3px 0 3px 15px;}
.test-suite .icon-database-table {background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);color: #d97706;}
</style>
{% endsection %}
+42 -7
View File
@@ -29,14 +29,15 @@
{% endfunction %}
{% section "content" %}
<section>
<section class="updates">
<header>
<div class="icon-updates">{% include "lean-console/svg/icon-update.svg" %}</div>
<h1>{% _ 'git.header' %}</h1>
</header>
<article class="updates">
<article>
<div class="git-status">
<strong style="display:block;margin-bottom:7px">'git status' output</strong>
<div class="git-cmd">'git status' output</div>
<code style="white-space:normal;font-size:120%">
{% foreach $status as $line %}
@@ -45,12 +46,19 @@
{{ $line }}
{% endif %}
</div>
{% or %}
<div class="empty">
<div style="text-align: center;">
{% include "lean-console/svg/icon-empty.svg" %}
<div>{% _ "git.status:nothing" %}</div>
</div>
</div>
{% endforeach %}
</code>
</div>
<div class="git-diff" style="margin-top:2rem">
<strong style="display:block;margin-bottom:7px">'git diff' output</strong>
<div class="git-cmd">'git diff' output</div>
<code style="white-space:normal;font-size:120%">
{% foreach $diff as $line %}
@@ -59,18 +67,45 @@
{{ $line }}
{% endif %}
</div>
{% or %}
<div class="empty">
<div style="text-align: center;">
{% include "lean-console/svg/icon-empty.svg" %}
<div>{% _ "git.status:nothing" %}</div>
</div>
</div>
{% endforeach %}
</code>
</div>
</article>
<footer>
<div class="flex justify-content-between stats">
<div class="commits">
<h5>Commits</h5>
<div>24<br></div>
<div><small>1 this month</small></div>
</div>
<div class="branches">
<h5>Branches</h5>
2<br>
<div><small>master, production</small></div>
</div>
<div class="stash">
<h5>Stash</h5>
No stashed changes
</div>
</div>
{{ $lastUpdate }}
</footer>
</section>
{% endsection %}
<style>
.action-delete {color:#f88}
.action-add {color: #88ff8a}
.action-group {color:#88bcff}
.git-status {margin-bottom: 20px}
.stats {text-align:center; max-width: 90%;margin: auto;color: #535353;font-size:90%}
.stats h5 {font-size: 1.3rem; line-height:2rem}
.updates .git-cmd {display:block;margin-bottom:7px;color: #a1a1aa;}
</style>
+4
View File
@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 9.5 C9 7 10.5 5.5 12 5.5 C13.8 5.5 15 7 15 8.5 C15 10.5 13 11 12 12.5"/>
<line x1="12" y1="16.5" x2="12" y2="17"/>
</svg>

After

Width:  |  Height:  |  Size: 290 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"></path></svg>

After

Width:  |  Height:  |  Size: 208 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 6v6l4 2"></path></svg>

After

Width:  |  Height:  |  Size: 174 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"></path></svg>

After

Width:  |  Height:  |  Size: 150 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="9" rx="1"></rect><rect x="14" y="3" width="7" height="5" rx="1"></rect><rect x="14" y="12" width="7" height="9" rx="1"></rect><rect x="3" y="16" width="7" height="5" rx="1"></rect></svg>

After

Width:  |  Height:  |  Size: 321 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>

After

Width:  |  Height:  |  Size: 257 B

+1
View File
@@ -0,0 +1 @@
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path></svg>

After

Width:  |  Height:  |  Size: 172 B

+4
View File
@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 6 L18 18"/>
<path d="M18 6 L6 18"/>
</svg>

After

Width:  |  Height:  |  Size: 211 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"></path><path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"></path></svg>

After

Width:  |  Height:  |  Size: 226 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"></path></svg>

After

Width:  |  Height:  |  Size: 154 B

+33
View File
@@ -0,0 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" width="80" height="80">
<defs>
<!-- Dégradé grayscale -->
<linearGradient id="leanGray" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#e4e4e7"/>
<stop offset="50%" stop-color="#a1a1aa"/>
<stop offset="100%" stop-color="#52525b"/>
</linearGradient>
<!-- Ombre douce -->
<filter id="softShadow" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="2" stdDeviation="4" flood-color="#000000" flood-opacity="0.4"/>
</filter>
</defs>
<!-- Icône : dodécagone + L monogramme -->
<g filter="url(#softShadow)">
<!-- Forme principale : dodécagone régulier -->
<path d="M 40 4 L 58.04 8.82 L 71.18 21.96 L 76 40 L 71.18 58.04 L 58.04 71.18 L 40 76 L 21.96 71.18 L 8.82 58.04 L 4 40 L 8.82 21.96 L 21.96 8.82 Z"
fill="url(#leanGray)" opacity="0.12"/>
<path d="M 40 4 L 58.04 8.82 L 71.18 21.96 L 76 40 L 71.18 58.04 L 58.04 71.18 L 40 76 L 21.96 71.18 L 8.82 58.04 L 4 40 L 8.82 21.96 L 21.96 8.82 Z"
stroke="url(#leanGray)" stroke-width="2.5" stroke-linejoin="round"/>
<!-- L monogramme -->
<path d="M 31 25 L 31 54 L 57 54"
stroke="url(#leanGray)" stroke-width="7"
stroke-linecap="round" stroke-linejoin="round"/>
<!-- Accent : point de données -->
<circle cx="57" cy="29" r="4.5" fill="#d4d4d8"/>
<circle cx="57" cy="29" r="8" fill="none" stroke="#d4d4d8" stroke-width="1" opacity="0.35"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

+13
View File
@@ -0,0 +1,13 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- document -->
<path d="M6 3 H14 L18 7 V17"/>
<path d="M6 3 H14 L18 7 V21 H6 Z"/>
<!-- log lines -->
<line x1="8.5" y1="10.5" x2="15.5" y2="10.5"/>
<line x1="8.5" y1="13.5" x2="15.5" y2="13.5"/>
<line x1="8.5" y1="16.5" x2="12" y2="16.5"/>
<!-- alert badge -->
<circle cx="17.5" cy="17.5" r="3.2"/>
<line x1="17.5" y1="15.8" x2="17.5" y2="18"/>
<line x1="17.5" y1="19.2" x2="17.5" y2="19.4"/>
</svg>

After

Width:  |  Height:  |  Size: 595 B

+5
View File
@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<line x1="4" y1="12" x2="4.01" y2="12"/>
<line x1="12" y1="12" x2="12.01" y2="12"/>
<line x1="20" y1="12" x2="20.01" y2="12"/>
</svg>

After

Width:  |  Height:  |  Size: 294 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- ellipse badge -->
<ellipse cx="12" cy="12" rx="10" ry="6.5"/>
<!-- plain php text -->
<text x="12" y="14" text-anchor="middle" font-family="monospace" font-size="7" font-weight="700" fill="currentColor" stroke="none">php</text>
</svg>

After

Width:  |  Height:  |  Size: 404 B

+10
View File
@@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- left brace: top hook, diagonal to point, diagonal back, bottom hook -->
<path d="M7 4 H5.5 C4.5 4 4 4.8 4 6 V9.2 C4 10 3.5 10.6 2.5 11 C3.5 11.4 4 12 4 12.8 V16 C4 17.2 4.5 18 5.5 18 H7"/>
<!-- right brace: mirrored -->
<path d="M17 4 H18.5 C19.5 4 20 4.8 20 6 V9.2 C20 10 20.5 10.6 21.5 11 C20.5 11.4 20 12 20 12.8 V16 C20 17.2 19.5 18 18.5 18 H17"/>
<!-- mini spruce -->
<path d="M12 7.5 L10.3 10.2 H13.7 Z"/>
<path d="M12 9.8 L9.2 13.8 H14.8 Z"/>
<line x1="12" y1="13.8" x2="12" y2="16.5"/>
</svg>

After

Width:  |  Height:  |  Size: 686 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="3" x2="12" y2="21"/>
<line x1="7" y1="21" x2="17" y2="21"/>
<path d="M12 6 H5.5 L3 8.5 L5.5 11 H12 Z"/>
<path d="M12 13 H18.5 L21 15.5 L18.5 18 H12 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 342 B

+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M4.5 12.5 L9.5 17.5 L19.5 6.5"/>
</svg>

After

Width:  |  Height:  |  Size: 201 B

+1
View File
@@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"></circle><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"></path></svg>

After

Width:  |  Height:  |  Size: 249 B

+1
View File
@@ -0,0 +1 @@
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M3 9h18M3 15h18M9 3v18M15 3v18"></path></svg>

After

Width:  |  Height:  |  Size: 208 B

+13
View File
@@ -0,0 +1,13 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- document outline -->
<rect x="4" y="3" width="16" height="18" rx="2"/>
<!-- row 1: line + check -->
<line x1="7" y1="8" x2="12.5" y2="8"/>
<path d="M14.5 7.5 L15.5 8.5 L18 6"/>
<!-- row 2: line + check -->
<line x1="7" y1="12" x2="12.5" y2="12"/>
<path d="M14.5 11.5 L15.5 12.5 L18 10"/>
<!-- row 3: line + check -->
<line x1="7" y1="16" x2="12.5" y2="16"/>
<path d="M14.5 15.5 L15.5 16.5 L18 14"/>
</svg>

After

Width:  |  Height:  |  Size: 603 B

+12
View File
@@ -0,0 +1,12 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- top commit -->
<circle cx="6" cy="6" r="2.5"/>
<!-- bottom commit -->
<circle cx="6" cy="18" r="2.5"/>
<!-- right commit -->
<circle cx="18" cy="12" r="2.5"/>
<!-- branch lines -->
<path d="M6 8.5 V15.5"/>
<path d="M8.2 6.8 C13 7.5 13 10.5 15.8 11.3"/>
<path d="M8.2 17.2 C13 16.5 13 13.5 15.8 12.7"/>
</svg>

After

Width:  |  Height:  |  Size: 502 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- head -->
<circle cx="12" cy="8" r="4"/>
<!-- shoulders -->
<path d="M4.5 20 C4.5 16 8 14 12 14 C16 14 19.5 16 19.5 20"/>
</svg>

After

Width:  |  Height:  |  Size: 297 B