request.html.twig 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
  2. {% block toolbar %}
  3. {% set icon %}
  4. <img width="28" height="28" alt="Request" style="border-width: 0; vertical-align: middle; margin-right: 5px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABOZJREFUeNrsVmsspFcY9jHMMsxKE9sxM1SUNHRpSNR9bbQqrrNUCG1E1z3ZyIpq+dEfIiToRtomEiFi/zQrWdlZFFstDYK632ZRu2yxFNu4GzOY6fPKN80YVu1m41dP8uac75zz3t/3OR+jVqv1LnLo613wuHCFnJcdTExM8LOzs+9vb28HaPZMTU1bSkpKohwcHDbPI3xwcPBMhUx+fv6V4eHhG0KhsMfd3V2srYwGfQ8MDPiWlZUtYHjZ2dlJYcBfOFK/qof6YHTs7OxsUigU4rW1tQNjY+NHpzGMjo6my2SyQJVKxcH6mzt37gRmZWXJcKQ6j0IGVcpUV1e/W1NT0y6Xyy1fNScwbCkmJuZaQkLCU11PTwspFc0lhPHW6yijQXzET3LOG9JLYWFhywiTan9//1jVisVilbe3946FhYVieXmZ297ezsN87I6hoaEqODj4BatQfh6FKlipCA8Pf1ZbW2urOQgICNjKzMxsNzExofxQVZrHx8c7FRQUXOvp6THW3CM+GCo/dw4lEsnP6+vrx6rRxsZGWVlZWcHhcH7a2tpaKCwsdElOTpbZ2tqKNjc3I5KSkj5fWVk51lLm5ubNUqk0CsudM3O4sbHxke6mj4/PYyirr6urm4+MjPy1u7v7bkpKyi9VVVV/8/l8qa+v71NdHsj5BJPwP0OKKj2BNmhwCuPs2NiYBOGyoL2DgwPzycnJT7G8y+Vyn2B+T5uHlUN3pzV7rq6uJz3EONG0s7OzXEyHKKZ1Ho93cGQZh6MODQ1dof3FxUXDUwSRHOPY2NjoiIiI22R3XFzcFyEhIT9ibfKvh6jCuY6Ojne0mYEmPsgV19nZ+Y/S0tIHQ0NDHo6OjqNOTk4j8JKP3Hyoq5DkUNEyDHMTwBEI427v7u6KDAwMFNgXgGY0jf/1/Py8pKGh4X00P18jwMrKqjE3N/dLKBJTh4CWR0ZGloqKir6Hhz6ae1FRUZsovMcI+RByzjQ1NcXv7e2ZaBuDtpIhNf2BgYFfkULHxsbGzwBROYeHh/o6KLKAy40I6zJwVLi6uhoKYW9r34EHqpycnO9aWlquA+pccK7n6em5nZqa+ufMzAwfcoU7OzsGkLWOar9Opf28q6tLoKuMRRHx3NxcyllVR3y9vb3CtLS0uoyMjKsU1vT09GZra+s2tJcFKjwVxliiX0ddXFz0SYkB+moQL4T8daBNIBDsARAGkC8F4TLtwYBZTA9Bj2DwUdG1tbU5jI+Pc0ihHJaMFRcXP0Tejg5R9nqJiYmnGkD7dE5DJBIdIGTEN15eXv4xQncEBhUVFbdQod9GR0f/MDU1ZUV7CDWvv7/fnmGtegvkBYbI1tZWLzc3t+dAGDXQxV9XIYS1mpmZMX19fSI/P7/fAQT3sT2pVCo94cHN+vr6D+DNZW2evLy8J7hbj+U9DvukrIE6URwv0HtNWO8iVJYeHh5XgZtXNIz4XrG3t7+H5RLu8TDPkzKQ0sjIqA+NzkxPT6dCoUdQUNAagUFzc/NlROQ33Kml1mC0/trIUyOWCIhtQDdAniAei5HdICnoGfu0KVlSsw+BAD0Yir6V+Pv7L5AcGMCBkTXkEDnCnPGbSL0kYuHKiBW8SlVNjC/hoeRas3zbhIisIcRzhFLMG/4vZVgFBqwyFRsJleb5Yv7/EX7T4x8BBgDTTU7fbnA/yAAAAABJRU5ErkJggg=="/>
  5. {% endset %}
  6. {% set text %}
  7. {% spaceless %}
  8. {% if collector.controller.class is defined %}
  9. <span>{{ collector.controller.class|abbr_class }}</span>
  10. <span>::</span>
  11. {% set link = collector.controller.file|file_link(collector.controller.line) %}
  12. <span>{% if link %}<a style="color: #2f2f2f" href="{{ link }}">{{ collector.controller.method }}</a>{% else %}{{ collector.controller.method }}{% endif %}</span>
  13. {% else %}
  14. <span>{{ collector.controller }}</span>
  15. {% endif %}
  16. <span style="margin: 0; padding: 0; color: #979696;">|</span>
  17. <span{{ not collector.route ? ' style="color:#a33"' : '' }}>{{ collector.route ? collector.route : 'NONE' }}</span>
  18. <span style="margin: 0; padding: 0; color: #979696;">|</span>
  19. <span style="color: {{ 200 == collector.statuscode ? '#759e1a' : '#a33' }}">{{ collector.statuscode }}</span>
  20. {% endspaceless %}
  21. {% endset %}
  22. {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
  23. {% endblock %}
  24. {% block menu %}
  25. <span class="label">
  26. <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/request.png') }}" alt="Request" /></span>
  27. <strong>Request</strong>
  28. </span>
  29. {% endblock %}
  30. {% block panel %}
  31. <h2>Request GET Parameters</h2>
  32. {% if collector.requestquery.all|length %}
  33. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestquery } only %}
  34. {% else %}
  35. <p>
  36. <em>No GET parameters</em>
  37. </p>
  38. {% endif %}
  39. <h2>Request POST Parameters</h2>
  40. {% if collector.requestrequest.all|length %}
  41. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestrequest } only %}
  42. {% else %}
  43. <p>
  44. <em>No POST parameters</em>
  45. </p>
  46. {% endif %}
  47. <h2>Request Attributes</h2>
  48. {% if collector.requestattributes.all|length %}
  49. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestattributes } only %}
  50. {% else %}
  51. <p>
  52. <em>No attributes</em>
  53. </p>
  54. {% endif %}
  55. <h2>Request Cookies</h2>
  56. {% if collector.requestcookies.all|length %}
  57. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestcookies } only %}
  58. {% else %}
  59. <p>
  60. <em>No cookies</em>
  61. </p>
  62. {% endif %}
  63. <h2>Request Headers</h2>
  64. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestheaders } only %}
  65. <h2>Request Content</h2>
  66. <p>
  67. {% if collector.content == false %}
  68. <em>Request content not available (it was retrieved as a resource).</em>
  69. {% elseif collector.content %}
  70. <pre>{{ collector.content }}</pre>
  71. {% else %}
  72. <em>No content</em>
  73. {% endif %}
  74. </p>
  75. <h2>Request Server Parameters</h2>
  76. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.requestserver } only %}
  77. <h2>Response Headers</h2>
  78. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': collector.responseheaders } only %}
  79. <h2>Session Attributes</h2>
  80. {% if collector.sessionattributes|length %}
  81. <table>
  82. <tr>
  83. <th>Key</th>
  84. <th>Value</th>
  85. </tr>
  86. {% set attributes = collector.sessionattributes %}
  87. {% for key in attributes|keys|sort %}
  88. <tr>
  89. <th>{{ key }}</th>
  90. <td>{{ attributes[key]|yaml_dump }}</td>
  91. </tr>
  92. {% endfor %}
  93. </table>
  94. {% else %}
  95. <p>
  96. <em>No session attributes</em>
  97. </p>
  98. {% endif %}
  99. {% if profiler.parent %}
  100. <h2><a href="{{ path('_profiler', { 'token': profiler.parent }) }}">Parent request: {{ profiler.parent }}</a></h2>
  101. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': profiler.parenttoken.get('request').requestattributes } only %}
  102. {% endif %}
  103. {% if profiler.children|length %}
  104. <h2>Sub requests</h2>
  105. {% for subrequest in profiler.children %}
  106. <h3><a href="{{ path('_profiler', { 'token': subrequest.token }) }}">{{ subrequest.token }}</a></h3>
  107. {% include 'WebProfilerBundle:Profiler:bag.html.twig' with { 'bag': subrequest.get('request').requestattributes } only %}
  108. {% endfor %}
  109. {% endif %}
  110. {% endblock %}