panel.html.twig 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <h2>Routing</h2>
  2. <div class="metrics">
  3. <div class="metric">
  4. <span class="value">{{ request.route ?: '(none)' }}</span>
  5. <span class="label">Matched route</span>
  6. </div>
  7. </div>
  8. {% if request.route %}
  9. <h3>Route Parameters</h3>
  10. {% if request.routeParams is empty %}
  11. <div class="empty">
  12. <p>No parameters.</p>
  13. </div>
  14. {% else %}
  15. {{ include('@WebProfiler/Profiler/table.html.twig', { data: request.routeParams, labels: ['Name', 'Value'] }, with_context = false) }}
  16. {% endif %}
  17. {% endif %}
  18. {% if router.redirect %}
  19. <h3>Route Redirection</h3>
  20. <p>This page redirects to:</p>
  21. <div class="card break-long-words">
  22. {{ router.targetUrl }}
  23. {% if router.targetRoute %}<span class="text-muted">(route: "{{ router.targetRoute }}")</span>{% endif %}
  24. </div>
  25. {% endif %}
  26. <h3>Route Matching Logs</h3>
  27. <div class="card">
  28. <strong>Path to match:</strong> <code>{{ request.pathinfo }}</code>
  29. </div>
  30. <table id="router-logs">
  31. <thead>
  32. <tr>
  33. <th>#</th>
  34. <th>Route name</th>
  35. <th>Path</th>
  36. <th>Log</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. {% for trace in traces %}
  41. <tr class="{{ trace.level == 1 ? 'status-warning' : trace.level == 2 ? 'status-success' }}">
  42. <td class="font-normal text-muted nowrap">{{ loop.index }}</td>
  43. <td class="break-long-words">{{ trace.name }}</td>
  44. <td class="break-long-words">{{ trace.path }}</td>
  45. <td class="font-normal">
  46. {% if trace.level == 1 %}
  47. Path almost matches, but
  48. <span class="newline">{{ trace.log }}</span>
  49. {% elseif trace.level == 2 %}
  50. {{ trace.log }}
  51. {% else %}
  52. Path does not match
  53. {% endif %}
  54. </td>
  55. </tr>
  56. {% endfor %}
  57. </tbody>
  58. </table>
  59. <p class="help">
  60. Note: These matching logs are based on the current router configuration,
  61. which might differ from the configuration used when profiling this request.
  62. </p>