Restored all the code removed by mistake
This commit is contained in:
parent
b6f413fc2c
commit
4eee931381
@ -82,21 +82,31 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% if collector.logs %}
|
{% if collector.logs %}
|
||||||
<ul class="alt">
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Priority</th>
|
||||||
|
<th>Channel</th>
|
||||||
|
<th>Message and context</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
{% set log_loop_index = 0 %}
|
{% set log_loop_index = 0 %}
|
||||||
{% for log in collector.logs %}
|
{% for log in collector.logs %}
|
||||||
{% set is_deprecation = log.context.level is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %}
|
{% set is_deprecation = log.context.level is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %}
|
||||||
{% if priority == '-100' ? is_deprecation : log.priority >= priority %}
|
{% if priority == '-100' ? is_deprecation : log.priority >= priority %}
|
||||||
{% set log_loop_index = log_loop_index + 1 %}
|
{% set log_loop_index = log_loop_index + 1 %}
|
||||||
<li class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 or is_deprecation %} warning{% endif %}">
|
<tr class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 or is_deprecation %} warning{% endif %}">
|
||||||
{{ logger.display_message(loop.index, log, is_deprecation) }}
|
<td>{{ log_loop_index }}</td>
|
||||||
</li>
|
<td>{{ is_deprecation ? 'DEPRECATION' : log.priorityName }}</td>
|
||||||
|
<td>{{ log.channel is defined ? log.channel }}</td>
|
||||||
|
<td>{{ logger.display_message(loop.index, log, is_deprecation) }}</td>
|
||||||
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><em>No logs available for this priority.</em></li>
|
<tr><td colspan="4"><em>No logs available for {{ priority }} priority.</em></td></tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
<em>No logs available.</em>
|
<em>No logs available.</em>
|
||||||
@ -106,11 +116,13 @@
|
|||||||
|
|
||||||
|
|
||||||
{% macro display_message(log_index, log, is_deprecation) %}
|
{% macro display_message(log_index, log, is_deprecation) %}
|
||||||
|
{{ is_deprecation ? 'DEPRECATED' : log.priorityName }} - {{ log.message }}
|
||||||
|
|
||||||
{% if is_deprecation %}
|
{% if is_deprecation %}
|
||||||
{% set stack = log.context.stack|default([]) %}
|
{% set stack = log.context.stack|default([]) %}
|
||||||
{% set id = 'sf-call-stack-' ~ log_index %}
|
{% set id = 'sf-call-stack-' ~ log_index %}
|
||||||
|
|
||||||
DEPRECATED - {{ log.message }}
|
{{ log.message }}
|
||||||
|
|
||||||
{% if stack %}
|
{% if stack %}
|
||||||
<a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;">
|
<a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;">
|
||||||
@ -140,7 +152,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ log.priorityName }} - {{ log.message }}
|
|
||||||
{% if log.context is defined and log.context is not empty %}
|
{% if log.context is defined and log.context is not empty %}
|
||||||
<br />
|
<br />
|
||||||
<small>
|
<small>
|
||||||
|
@ -54,6 +54,14 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block panelContent %}
|
{% block panelContent %}
|
||||||
|
{% set filter = request.query.get('state', '-1') %}
|
||||||
|
{% set filterOptions = {
|
||||||
|
'-1': '',
|
||||||
|
(constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED')): 'Defined messages',
|
||||||
|
(constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING')): 'Missing messages',
|
||||||
|
(constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK')): 'Fallback messages',
|
||||||
|
} %}
|
||||||
|
|
||||||
<h2>Translation Stats</h2>
|
<h2>Translation Stats</h2>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -69,6 +77,22 @@
|
|||||||
<th>Missing messages</th>
|
<th>Missing messages</th>
|
||||||
<td><pre>{{ collector.countMissings }}</pre></td>
|
<td><pre>{{ collector.countMissings }}</pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Filter</th>
|
||||||
|
<td>
|
||||||
|
<form id="filter-form" action="" method="get" style="display: inline">
|
||||||
|
<input type="hidden" name="panel" value="translation">
|
||||||
|
<select id="filter" name="state" onchange="document.getElementById('filter-form').submit(); ">
|
||||||
|
{% for key,option in filterOptions %}
|
||||||
|
<option value="{{ key }}"{{ filter == key ? ' selected' : '' }}>{{ option }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<noscript>
|
||||||
|
<input type="submit" value="refresh">
|
||||||
|
</noscript>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -80,7 +104,7 @@
|
|||||||
<th>Id</th>
|
<th>Id</th>
|
||||||
<th>Message Preview</th>
|
<th>Message Preview</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for message in collector.messages %}
|
{% for message in collector.messages if message.state == filter or filter == '-1' %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>{{ translator.state(message) }}</code></td>
|
<td><code>{{ translator.state(message) }}</code></td>
|
||||||
<td><code>{{ message.locale }}</code></td>
|
<td><code>{{ message.locale }}</code></td>
|
||||||
|
Reference in New Issue
Block a user