File tree 1 file changed +20
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1
1
{% extends ' @WebProfiler/Profiler/layout.html.twig' %}
2
2
3
+ {% import _self as helper %}
4
+
3
5
{% block toolbar %}
4
6
{% if collector .requestCount %}
5
7
{% set icon %}
88
90
{% if trace .options is not empty %}
89
91
{{ profiler_dump(trace .options , maxDepth=1) }}
90
92
{% endif %}
93
+ <button class =" btn btn-sm" data-clipboard-text =" {{ helper.render_curl (trace ) }}" >Copy-as-Curl</button >
91
94
</th >
92
95
{% if profiler_token and profiler_link %}
93
96
<th >
121
124
</tr >
122
125
</tbody >
123
126
</table >
127
+ {# tmp: introspect the "trace" #}
128
+ {{ dump (trace ) }}
124
129
{% endfor %}
125
130
{% endif %}
126
131
</div >
127
132
</div >
128
133
{% endfor %}
129
134
{% endif %}
130
135
</div >
136
+
137
+ <script type =" text/javascript" >// <![CDATA[
138
+
139
+ document .querySelectorAll (' [data-clipboard-text]' ).forEach (function (button ) {
140
+ button .addEventListener (' click' , function () {
141
+ navigator .clipboard .writeText (button .getAttribute (' data-clipboard-text' ));
142
+ })
143
+ });
144
+
145
+ // ]]> </script >
146
+
131
147
{% endblock %}
148
+
149
+ {% macro render_curl(trace ) %}
150
+ curl "{{ trace .url }}" --compressed -H "Connection: keep-alive" -v
151
+ {% endmacro %}
You can’t perform that action at this time.