From 70e11f9f3d3a593ca137c2bddc47a9afa9c50e25 Mon Sep 17 00:00:00 2001 From: Neagu Cristian-Doru Date: Sun, 19 Jan 2020 19:37:46 +0200 Subject: [PATCH] [WebProfilerBundle][HttpClient] Added profiler links in the Web Profiler -> Http Client panel --- .../views/Collector/http_client.html.twig | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig index 68716153dafd..8b9595142e55 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/http_client.html.twig @@ -54,6 +54,18 @@ {% else %}

Requests

{% for trace in client.traces %} + {% set profiler_token = '' %} + {% set profiler_link = '' %} + {% if trace.info.response_headers is defined %} + {% for header in trace.info.response_headers %} + {% if header matches '/^x-debug-token: .*$/i' %} + {% set profiler_token = (header.getValue | slice('x-debug-token: ' | length)) %} + {% endif %} + {% if header matches '/^x-debug-token-link: .*$/i' %} + {% set profiler_link = (header.getValue | slice('x-debug-token-link: ' | length)) %} + {% endif %} + {% endfor %} + {% endif %} @@ -66,6 +78,11 @@ {{ profiler_dump(trace.options, maxDepth=1) }} {% endif %} + {% if profiler_token and profiler_link %} + + {% endif %} @@ -85,6 +102,11 @@ + {% if profiler_token and profiler_link %} + + {% endif %}
+ Profile +
{{ profiler_dump(trace.info, maxDepth=1) }} + {{ profiler_token }} +