[WebProfilerBundle] added a profiler panel for the router

This commit is contained in:
Fabien Potencier 2011-10-22 10:02:24 +02:00
parent 8cc3158d89
commit 8fa061cc6e
2 changed files with 38 additions and 0 deletions

View File

@ -433,3 +433,11 @@ td.main, td.menu {
margin-bottom: 15px;
margin-top: 5px;
}
#collector_content .routing tr.matches td {
background-color: #0e0;
}
#collector_content .routing tr.almost td {
background-color: #fa0;
}

View File

@ -0,0 +1,30 @@
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
{% block toolbar %}
{% endblock %}
{% block menu %}
<span class="label">
<span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/routing.png') }}" alt="Routing" /></span>
<strong>Routing</strong>
</span>
{% endblock %}
{% block panel %}
<h2>Routing for "{{ collector.pathinfo }}"</h2>
<table class="routing">
<tr>
<th>Route name</th>
<th>Pattern</th>
<th>Log</th>
</tr>
{% for trace in collector.traces %}
<tr class="{{ 1 == trace.level ? 'almost' : 2 == trace.level ? 'matches' : '' }}">
<td>{{ trace.name }}</td>
<td>{{ trace.pattern }}</td>
<td>{{ trace.log }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}