Files
ops-Gazelle/templates/debug/mysql.twig
2025-08-27 16:44:44 +02:00

50 lines
1.6 KiB
Twig

{% set nr = list|length %}
{% for q in list %}
{% if loop.first %}
<table class="layout" width="100%">
<tr>
<td><strong><a href="#" id="debug-view-query-my" class="brackets">View</a>
{{ list|length|number_format }} Mysql {% if list|length == 1 %}query{% else %}queries{% endif %}
({{ elapsed|number_format(2) }} ms)</strong> (mean: {{ (elapsed/nr)|number_format(5) }} ms)</td>
</tr>
</table>
<table id="debug-query-my" class="debug_table hidden">
{% endif %}
<tr valign="top">
<td class="debug_data debug_query_data">{{ q.query|nl2br }}
<br /><a class="brackets" href="tools.php?action=db_sandbox&amp;debug={{
{"query": q.query}|json_encode|b64 }}">Inspect</a>
</td>
<td class="rowa debug_info debug_query_time" style="width: 130px;">{{
q.elapsed|number_format(5) }} ms</td>
{% if q.warning is defined %}
{% for w in q.warning %}
{% if loop.first %}
</tr>
<tr valign="top">
<td colspan="2" class="row{{ cycle(['a', 'b'], loop.index0) }} debug_info debug_query_warnings">
<table>
<tr>
<td colspan="2"><strong class="important">Warnings</strong></td>
</tr>
<tr>
<td>Code</td>
<td>Message</td>
</tr>
{% endif %}
<tr>
<td>{{ w.code }}</td>
<td>{{ w.message }}</td>
</tr>
{% if loop.last %}
</table>
</td>
{% endif %}
{% endfor %}
{% endif %}
</tr>
{% if loop.last %}
</table>
{% endif %}
{% endfor %}