8000 [WebProfilerBundle] added a profiler panel for the router · vatson/symfony@8fa061c · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fa061c

Browse files
committed
[WebProfilerBundle] added a profiler panel for the router
1 parent 8cc3158 commit 8fa061c

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,3 +433,11 @@ td.main, td.menu {
433433
margin-bottom: 15px;
434434
margin-top: 5px;
435435
}
436+
437+
#collector_content .routing tr.matches td {
438+
background-color: #0e0;
439+
}
440+
441+
#collector_content .routing tr.almost td {
442+
background-color: #fa0;
443+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
2+
3+
{% block toolbar %}
4+
{% endblock %}
5+
6+
{% block menu %}
7+
<span class="label">
8+
<span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/routing.png') }}" alt="Routing" /></span>
9+
<strong>Routing</strong>
10+
</span>
11+
{% endblock %}
12+
13+
{% block panel %}
14+
<h2>Routing for "{{ collector.pathinfo }}"</h2>
15+
16+
<table class="routing">
17+
<tr>
18+
<th>Route name</th>
19+
<th>Pattern</th>
20+
<th>Log</th>
21+
</tr>
22+
{% for trace in collector.traces %}
23+
<tr class="{{ 1 == trace.level ? 'almost' : 2 == trace.level ? 'matches' : '' }}">
24+
<td>{{ trace.name }}</td>
25+
<td>{{ trace.pattern }}</td>
26+
<td>{{ trace.log }}</td>
27+
</tr>
28+
{% endfor %}
29+
</table>
30+
{% endblock %}

0 commit comments

Comments
 (0)
0