[Profiler][Logger] fixed cycle odd/even.
This commit is contained in:
parent
80546293af
commit
9a9c56f4fe
@ -88,10 +88,12 @@
|
|||||||
|
|
||||||
{% if collector.logs %}
|
{% if collector.logs %}
|
||||||
<ul class="alt">
|
<ul class="alt">
|
||||||
|
{% 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 %}
|
||||||
<li class="{{ cycle(['odd', 'even'], loop.index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 %} warning{% endif %}">
|
{% 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 %} warning{% endif %}">
|
||||||
{{ logger.display_message(loop.index, log, is_deprecation) }}
|
{{ logger.display_message(loop.index, log, is_deprecation) }}
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user