This commit is contained in:
Marek
2026-03-24 00:04:55 +01:00
commit c5229e48ed
4225 changed files with 511461 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" data-icon-name="icon-tabler-versions" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="10" y="5" width="10" height="14" rx="2"></rect>
<line x1="7" y1="7" x2="7" y2="17"></line>
<line x1="4" y1="8" x2="4" y2="16"></line>
</svg>

After

Width:  |  Height:  |  Size: 446 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<polygon fill="#AAA" points="0 0 24 0 24 7 17.5 7 16.5 3 15.5 7 11 7 12 3 3 3 4 7 0 7" />
<polygon fill="#AAA" points="0 8.5 4.5 8.5 6 15.5 0 15.5" />
<polygon fill="#AAA" points="10.5 8.5 15 8.5 13.5 15.5 9 15.5" />
<polygon fill="#AAA" points="18 8.5 24 8.5 24 15.5 19.5 15.5" />
<polygon fill="#AAA" points="0 17 6.5 17 7.5 21 8.5 17 13 17 12 21 21 21 20 17 24 17 24 24 0 24" />
</svg>

After

Width:  |  Height:  |  Size: 493 B

View File

@@ -0,0 +1,252 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{% if collector.data.unavailable_migrations_count is defined %}
{% set unavailable_migrations = collector.data.unavailable_migrations_count %}
{% set new_migrations = collector.data.new_migrations|length %}
{% if unavailable_migrations > 0 or new_migrations > 0 %}
{% set executed_migrations = collector.data.executed_migrations|length %}
{% set available_migrations = collector.data.available_migrations_count %}
{% set status_color = unavailable_migrations > 0 ? 'yellow' : '' %}
{% set status_color = new_migrations > 0 ? 'red' : status_color %}
{% set icon %}
{% if profiler_markup_version < 3 %}
{{ include('@DoctrineMigrations/Collector/icon.svg') }}
{% else %}
{{ include('@DoctrineMigrations/Collector/icon-v3.svg') }}
{% endif %}
<span class="sf-toolbar-value">{{ new_migrations + unavailable_migrations }}</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-group">
<div class="sf-toolbar-info-piece">
<b>Current Migration</b>
<span>{{ executed_migrations > 0 ? collector.data.executed_migrations|last.version|split('\\')|last : 'n/a' }}</span>
</div>
</div>
<div class="sf-toolbar-info-group">
<div class="sf-toolbar-info-piece">
<span class="sf-toolbar-header">
<b>Database Migrations</b>
</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Executed</b>
<span class="sf-toolbar-status">{{ executed_migrations }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Unavailable</b>
<span class="sf-toolbar-status {{ unavailable_migrations > 0 ? 'sf-toolbar-status-yellow' }}">{{ unavailable_migrations }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Available</b>
<span class="sf-toolbar-status">{{ available_migrations }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>New</b>
<span class="sf-toolbar-status {{ new_migrations > 0 ? 'sf-toolbar-status-red' }}">{{ new_migrations }}</span>
</div>
</div>
{% endset %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endif %}
{% endblock %}
{% block menu %}
{% if collector.data.unavailable_migrations_count is defined %}
{% set unavailable_migrations = collector.data.unavailable_migrations_count %}
{% set new_migrations = collector.data.new_migrations|length %}
{% set label = unavailable_migrations > 0 ? 'label-status-warning' : '' %}
{% set label = new_migrations > 0 ? 'label-status-error' : label %}
<span class="label {{ label }}">
<span class="icon">
{% if profiler_markup_version < 3 %}
{{ include('@DoctrineMigrations/Collector/icon.svg') }}
{% else %}
{{ include('@DoctrineMigrations/Collector/icon-v3.svg') }}
{% endif %}
</span>
<strong>Migrations</strong>
{% if unavailable_migrations > 0 or new_migrations > 0 %}
<span class="count">
<span>{{ new_migrations + unavailable_migrations }}</span>
</span>
{% endif %}
</span>
{% endif %}
{% endblock %}
{% block panel %}
{% set num_executed_migrations = collector.data.executed_migrations|length %}
{% set num_unavailable_migrations = collector.data.unavailable_migrations_count %}
{% set num_available_migrations = collector.data.available_migrations_count %}
{% set num_new_migrations = collector.data.new_migrations|length %}
<h2>Doctrine Migrations</h2>
<div class="metrics">
<div class="metric">
<span class="value">{{ num_executed_migrations }}</span>
<span class="label">Executed</span>
</div>
{% if profiler_markup_version >= 3 %}
<div class="metric-group">
{% endif %}
<div class="metric">
<span class="value">{{ num_unavailable_migrations }}</span>
<span class="label">Unavailable</span>
</div>
<div class="metric">
<span class="value">{{ num_available_migrations }}</span>
<span class="label">Available</span>
</div>
<div class="metric">
<span class="value">{{ num_new_migrations }}</span>
<span class="label">New</span>
</div>
{% if profiler_markup_version >= 3 %}
</div> {# closes the <div class="metric-group"> #}
{% endif %}
</div>
<div class="sf-tabs">
<div class="tab">
<h3 class="tab-title">
Migrations
<span class="badge {{ num_new_migrations > 0 ? 'status-error' : num_unavailable_migrations > 0 ? 'status-warning' }}">
{{ num_new_migrations > 0 ? num_new_migrations : num_unavailable_migrations > 0 ? num_unavailable_migrations : num_executed_migrations }}
</span>
</h3>
<div class="tab-content">
{{ _self.render_migration_details(collector, profiler_markup_version) }}
</div>
</div>
<div class="tab">
<h3 class="tab-title">Configuration</h3>
<div class="tab-content">
{{ _self.render_configuration_details(collector, profiler_markup_version) }}
</div>
</div>
</div>
{% endblock %}
{% macro render_migration_details(collector) %}
<table>
<thead>
<tr>
<th class="colored font-normal">Version</th>
<th class="colored font-normal">Description</th>
<th class="colored font-normal">Status</th>
<th class="colored font-normal">Executed at</th>
<th class="colored font-normal text-right">Execution time</th>
</tr>
</thead>
{% for migration in collector.data.new_migrations %}
{{ _self.render_migration(migration) }}
{% endfor %}
{% for migration in collector.data.executed_migrations|reverse %}
{{ _self.render_migration(migration) }}
{% endfor %}
</table>
{% endmacro %}
{% macro render_configuration_details(collector) %}
<table>
<thead>
<tr>
<th colspan="2" class="colored font-normal">Storage</th>
</tr>
</thead>
<tr>
<td class="font-normal">Type</td>
<td class="font-normal">{{ collector.data.storage }}</td>
</tr>
{% if collector.data.table is defined %}
<tr>
<td class="font-normal">Table Name</td>
<td class="font-normal">{{ collector.data.table }}</td>
</tr>
{% endif %}
{% if collector.data.column is defined %}
<tr>
<td class="font-normal">Column Name</td>
<td class="font-normal">{{ collector.data.column }}</td>
</tr>
{% endif %}
</table>
<table>
<thead>
<tr>
<th colspan="2" class="colored font-normal">Database</th>
</tr>
</thead>
<tr>
<td class="font-normal">Driver</td>
<td class="font-normal">{{ collector.data.driver }}</td>
</tr>
<tr>
<td class="font-normal">Name</td>
<td class="font-normal">{{ collector.data.name }}</td>
</tr>
</table>
<table>
<thead>
<tr>
<th colspan="2" class="colored font-normal">Migration Namespaces</th>
</tr>
</thead>
{% for namespace, directory in collector.data.namespaces %}
<tr>
<td class="font-normal">{{ namespace }}</td>
<td class="font-normal">{{ directory }}</td>
</tr>
{% endfor %}
</table>
{% endmacro %}
{% macro render_migration(migration, profiler_markup_version) %}
<tr>
<td class="font-normal">
{% if migration.file %}
<a href="{{ migration.file|file_link(1) }}" title="{{ migration.file }}">{{ migration.version }}</a>
{% else %}
{{ migration.version }}
{% endif %}
</td>
<td class="font-normal">{{ migration.description }}</td>
<td class="font-normal align-right">
{% if migration.is_new %}
<span class="{{ profiler_markup_version >= 3 ? 'badge badge-error' : 'label status-error' }}">NOT EXECUTED</span>
{% elseif migration.is_unavailable %}
<span class="{{ profiler_markup_version >= 3 ? 'badge badge-warning' : 'label status-warning' }}">UNAVAILABLE</span>
{% else %}
<span class="{{ profiler_markup_version >= 3 ? 'badge badge-success' : 'label status-success' }}">EXECUTED</span>
{% endif %}
</td>
<td class="font-normal">{{ migration.executed_at ? migration.executed_at|date('M j, Y H:i') : 'n/a' }}</td>
<td class="font-normal text-right">
{% if migration.execution_time is null %}
n/a
{% elseif migration.execution_time < 1 %}
{{ (migration.execution_time * 1000)|number_format(0) }} ms
{% else %}
{{ migration.execution_time|number_format(2) }} seconds
{% endif %}
</td>
</tr>
{% endmacro %}