|
1 | 1 | {% extends '@WebProfiler/Profiler/layout.html.twig' %} |
2 | 2 |
|
3 | | -{% macro css_custom_status_styles() %} |
4 | | - |
5 | | - <style> |
6 | | - .simplehttpprofiler-status-count .sf-toolbar-value { |
7 | | - border-radius: 1px; |
8 | | - padding: 0 5px; |
9 | | - display: inline-block; |
10 | | - line-height: 22px; |
11 | | - } |
12 | | -
|
13 | | - #menu-profiler .selected .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-red, |
14 | | - .sf-toolbar-block:hover .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-red { |
15 | | - background: rgb(176, 65, 62); |
16 | | - } |
17 | | - } |
18 | | -
|
19 | | - .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-red { |
20 | | - background: rgb(125, 46, 44); |
21 | | - } |
22 | | -
|
23 | | - #menu-profiler .selected .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-yellow, |
24 | | - .sf-toolbar-block:hover .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-yellow { |
25 | | - background: rgb(164, 105, 23); |
26 | | - } |
27 | | -
|
28 | | - .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-yellow { |
29 | | - background: rgb(125, 80, 18); |
30 | | - } |
31 | | -
|
32 | | - #menu-profiler .selected .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-green, |
33 | | - .sf-toolbar-block:hover .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-green { |
34 | | - background: rgb(80, 127, 91); |
35 | | - } |
36 | | -
|
37 | | - .simplehttpprofiler-status-count .sf-toolbar-value.sf-toolbar-status-green { |
38 | | - background: rgb(58, 86, 65); |
39 | | - } |
40 | | -
|
41 | | - </style> |
42 | | -{% endmacro %} |
43 | | - |
44 | | - |
45 | | - |
46 | 3 | {% block toolbar %} |
47 | | - |
48 | | - {% set icon %} |
49 | | - |
50 | | - {% import _self as customMacro %} |
51 | | - {{ customMacro.css_custom_status_styles() }} |
52 | | - |
53 | | - <span class="icon"><img alt="" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiBpZD0iTGF5ZXJfMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojQUFBO308L3N0eWxlPjwvZGVmcz48dGl0bGUvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTQsMTZhNyw3LDAsMCwxLDctN2g4LjM2bC0xLjUyLjM5LTEuMjYsMS4yNmEyLDIsMCwxLDAsMi44MywyLjgzbDUtNWEyLDIsMCwwLDAsMC0yLjgzbC01LTVhMiwyLDAsMCwwLTIuODMsMi44M2wxLjE3LDEuMTdMMTkuMyw1SDExQTExLDExLDAsMCwwLDIuNzgsMjMuMzFhMiwyLDAsMCwwLDMtMi42NkE3LDcsMCwwLDEsNCwxNloiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yOS4xOCw4LjY0YTIsMiwwLDAsMC0zLDIuNjhBNyw3LDAsMCwxLDIxLDIzSDEzbDEuMjQtLjQyLDEuMTYtMS4xNmEyLDIsMCwwLDAtMi44My0yLjgzbC01LDVhMiwyLDAsMCwwLDAsMi44M2w1LDVhMiwyLDAsMCwwLDIuODMtMi44M2wtMS4yMi0xLjIyTDEzLDI3aDhBMTEsMTEsMCwwLDAsMjkuMTgsOC42NFoiLz48L3N2Zz4=" /></span> |
54 | | - |
55 | | - <span class="simplehttpprofiler-status-count"> |
56 | | - {% if collector.hasServerErrors %} |
57 | | - <span class="sf-toolbar-value sf-toolbar-status-red">{{ collector.serverErrorsCount }}</span> |
58 | | - {% endif %} |
59 | | - {% if collector.hasClientErrors %} |
60 | | - <span class="sf-toolbar-value sf-toolbar-status-yellow">{{ collector.clientErrorsCount }}</span> |
61 | | - {% endif %} |
62 | | - {% if collector.countSuccessfullRequest %} |
63 | | - <span class="sf-toolbar-value sf-toolbar-status-green">{{ collector.countSuccessfullRequest }}</span> |
64 | | - {% endif %} |
65 | | - </span> |
66 | | - |
67 | | - <span class="sf-toolbar-value">{{ collector.totalTime|simple_http_format_ms }}</span> |
68 | | - |
69 | | - |
70 | | - {% endset %} |
| 4 | + {% set icon %} |
| 5 | + <svg width="24" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" fill="#AAAAAA"> |
| 6 | + <path d="M4,16a7,7,0,0,1,7-7h8.36l-1.52.39-1.26,1.26a2,2,0,1,0,2.83,2.83l5-5a2,2,0,0,0,0-2.83l-5-5a2,2,0,0,0-2.83,2.83l1.17,1.17L19.3,5H11A11,11,0,0,0,2.78,23.31a2,2,0,0,0,3-2.66A7,7,0,0,1,4,16Z"/> |
| 7 | + <path d="M29.18,8.64a2,2,0,0,0-3,2.68A7,7,0,0,1,21,23H13l1.24-.42,1.16-1.16a2,2,0,0,0-2.83-2.83l-5,5a2,2,0,0,0,0,2.83l5,5a2,2,0,0,0,2.83-2.83l-1.22-1.22L13,27h8A11,11,0,0,0,29.18,8.64Z"/> |
| 8 | + </svg> |
| 9 | + |
| 10 | + <span class="sf-toolbar-value">{{ collector.countRequests }}</span> |
| 11 | + <span class="sf-toolbar-info-piece-additional-detail"> |
| 12 | + <span class="sf-toolbar-label">in</span> |
| 13 | + <span class="sf-toolbar-value">{{ '%0.2f'|format(collector.totalTime) }}</span> |
| 14 | + <span class="sf-toolbar-label">s</span> |
| 15 | + </span> |
| 16 | + {% endset %} |
71 | 17 |
|
72 | 18 | {% set text %} |
73 | | - |
74 | 19 | {% for index, call in collector.calls %} |
75 | | - |
76 | 20 | <div class="sf-toolbar-info-piece"> |
77 | 21 | <span style="display: table-cell"> |
78 | 22 | {% if call.response %} |
|
84 | 28 |
|
85 | 29 | <a style="display: table-cell" |
86 | 30 | href="{{ path('_profiler', { 'token': token, 'panel': 'simplehttpprofiler' }) }}#request{{ index }}"> |
87 | | - <span>{{ call.request.method }} {{ call.request.requestUri }}</span> |
| 31 | + <span>{{ call.request.method }} {{ call.request.requestUri }}</span> |
88 | 32 | </a> |
89 | 33 |
|
90 | 34 |
|
91 | 35 | </div> |
92 | 36 |
|
93 | 37 | <div class="sf-toolbar-info-piece"> |
94 | | - <b style="font-weight: normal">{{ call.time.total|simple_http_format_ms }}</b> |
| 38 | + <b style="font-weight: normal">{{ '%0.2f'|format(call.time.total * 1000) ~ 'ms' }}</b> |
95 | 39 | <b> |
96 | 40 | {{ call.request.schemeAndHttpHost }} |
97 | 41 | {% if call.debugLink %} |
98 | | - - |
| 42 | + - |
99 | 43 | <a style="text-transform: uppercase; |
100 | 44 | font-variant: small-caps; |
101 | 45 | display: inline-block; |
|
150 | 94 | {% endblock %} |
151 | 95 |
|
152 | 96 | {% block menu %} |
153 | | - <span class="label"> |
154 | | - <span class="icon"><img alt="" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiBpZD0iTGF5ZXJfMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojQUFBO308L3N0eWxlPjwvZGVmcz48dGl0bGUvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTQsMTZhNyw3LDAsMCwxLDctN2g4LjM2bC0xLjUyLjM5LTEuMjYsMS4yNmEyLDIsMCwxLDAsMi44MywyLjgzbDUtNWEyLDIsMCwwLDAsMC0yLjgzbC01LTVhMiwyLDAsMCwwLTIuODMsMi44M2wxLjE3LDEuMTdMMTkuMyw1SDExQTExLDExLDAsMCwwLDIuNzgsMjMuMzFhMiwyLDAsMCwwLDMtMi42NkE3LDcsMCwwLDEsNCwxNloiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yOS4xOCw4LjY0YTIsMiwwLDAsMC0zLDIuNjhBNyw3LDAsMCwxLDIxLDIzSDEzbDEuMjQtLjQyLDEuMTYtMS4xNmEyLDIsMCwwLDAtMi44My0yLjgzbC01LDVhMiwyLDAsMCwwLDAsMi44M2w1LDVhMiwyLDAsMCwwLDIuODMtMi44M2wtMS4yMi0xLjIyTDEzLDI3aDhBMTEsMTEsMCwwLDAsMjkuMTgsOC42NFoiLz48L3N2Zz4=" /></span> |
| 97 | + <span class="label {% if collector.hasServerErrors %}label-status-error{% elseif collector.hasClientErrors %}label-status-warning{% endif %}"> |
| 98 | + <span class="icon"> |
| 99 | + <svg width="24" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" fill="#AAAAAA"> |
| 100 | + <path d="M4,16a7,7,0,0,1,7-7h8.36l-1.52.39-1.26,1.26a2,2,0,1,0,2.83,2.83l5-5a2,2,0,0,0,0-2.83l-5-5a2,2,0,0,0-2.83,2.83l1.17,1.17L19.3,5H11A11,11,0,0,0,2.78,23.31a2,2,0,0,0,3-2.66A7,7,0,0,1,4,16Z"/> |
| 101 | + <path d="M29.18,8.64a2,2,0,0,0-3,2.68A7,7,0,0,1,21,23H13l1.24-.42,1.16-1.16a2,2,0,0,0-2.83-2.83l-5,5a2,2,0,0,0,0,2.83l5,5a2,2,0,0,0,2.83-2.83l-1.22-1.22L13,27h8A11,11,0,0,0,29.18,8.64Z"/> |
| 102 | + </svg> |
| 103 | + </span> |
155 | 104 |
|
156 | 105 | <strong>HTTP</strong> |
157 | 106 |
|
158 | | - {% import _self as customMacro %} |
159 | | - {{ customMacro.css_custom_status_styles() }} |
160 | | - |
161 | | - <span class="count simplehttpprofiler-status-count" style="background: transparent"> |
162 | | - {% if collector.hasServerErrors %} |
163 | | - <b class="sf-toolbar-value sf-toolbar-status-red">{{ collector.serverErrorsCount }}</b> |
164 | | - {% endif %} |
165 | | - {% if collector.hasClientErrors %} |
166 | | - <b class="sf-toolbar-value sf-toolbar-status-yellow">{{ collector.clientErrorsCount }}</b> |
167 | | - {% endif %} |
168 | | - {% if collector.countSuccessfullRequest %} |
169 | | - <b class="sf-toolbar-value sf-toolbar-status-green">{{ collector.countSuccessfullRequest }}</b> |
170 | | - {% endif %} |
171 | | - |
172 | | - <span>{{ collector.totalTime|simple_http_format_ms }}</span> |
| 107 | + <span class="count"> |
| 108 | + {{ collector.countRequests }} - {{ '%0.2f'|format(collector.totalTime * 1000) ~ 'ms' }} |
173 | 109 | </span> |
174 | | - |
175 | 110 | </span> |
176 | 111 | {% endblock %} |
177 | 112 |
|
178 | 113 | {% block head %} |
179 | | - |
180 | 114 | {{ parent() }} |
181 | 115 |
|
182 | | - |
183 | 116 | <link rel="stylesheet" href="{{ asset('bundles/simplehttp/libs/highlightjs/highlightjs-8.5.css') }}" /> |
184 | 117 | <link rel="stylesheet" href="{{ asset('bundles/simplehttp/simple-http-bundle.css') }}" /> |
185 | | - |
186 | | - |
187 | 118 | {% endblock %} |
188 | 119 |
|
189 | | - |
190 | | - |
191 | | - |
192 | 120 | {% block panel %} |
193 | | - |
194 | | - |
195 | | - <style> |
196 | | - .http-call__title__method { |
197 | | - display: inline-block; |
198 | | - vertical-align: top; |
199 | | - } |
200 | | -
|
201 | | - .http-call__path { |
202 | | - text-overflow: ellipsis; |
203 | | - width: 85%; |
204 | | - white-space: nowrap; |
205 | | - display: inline-block; |
206 | | - overflow-x: hidden; |
207 | | - text-decoration: none; |
208 | | - border-bottom: 0; |
209 | | - } |
210 | | - </style> |
211 | | - |
212 | | - |
213 | 121 | <table> |
214 | 122 | <tr> |
215 | 123 | <th width="120"> |
|
225 | 133 | </tr> |
226 | 134 | </table> |
227 | 135 |
|
228 | | - |
229 | 136 | {% for index, call in collector.calls %} |
230 | 137 | <a name="request{{ index }}"></a> |
231 | 138 | {% include '@SimpleHttp/Collector/partials/call.html.twig' with { 'call': call } %} |
232 | 139 | {% endfor %} |
233 | 140 |
|
234 | | - |
235 | 141 | <script type="text/javascript" src="{{ asset('bundles/simplehttp/libs/jquery/jquery-1.12.1.js') }}"></script> |
236 | 142 | <script type="text/javascript" src="{{ asset('bundles/simplehttp/libs/highlightjs/highlightjs-8.5.js') }}"></script> |
237 | 143 | <script type="text/javascript" src="{{ asset('bundles/simplehttp/simple-http-bundle.js') }}"></script> |
238 | | - |
239 | | - |
240 | 144 | {% endblock %} |
0 commit comments