File tree 1 file changed +19
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector
1 file changed +19
-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
+ {{ dump (trace ) }}
124
128
{% endfor %}
125
129
{% endif %}
126
130
</div >
127
131
</div >
128
132
{% endfor %}
129
133
{% endif %}
130
134
</div >
135
+
136
+ <script type =" text/javascript" >// <![CDATA[
137
+
138
+ document .querySelectorAll (' [data-clipboard-text]' ).forEach (function (button ) {
139
+ button .addEventListener (' click' , function () {
140
+ navigator .clipboard .writeText (button .getAttribute (' data-clipboard-text' ));
141
+ })
142
+ });
143
+
144
+ // ]]> </script >
145
+
131
146
{% endblock %}
147
+
148
+ {% macro render_curl(trace ) %}
149
+ curl {{ trace .url }}
150
+ {% endmacro %}
You can’t perform that action at this time.
0 commit comments