|
1 | 1 | {% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
2 | 2 |
|
| 3 | +{% macro serviceInstantiation(infos) %} |
| 4 | + {% if infos is null %} |
| 5 | + Not instantiated |
| 6 | + {% elseif infos.ocramiusLazy %} |
| 7 | + <span class="label status-warning">Ocramius Lazy</span> |
| 8 | + {% else %} |
| 9 | + <span class="label status-success">Normal</span> |
| 10 | + {% endif %} |
| 11 | +{% endmacro %} |
| 12 | + |
3 | 13 | {% block toolbar %}
|
4 | 14 | {% set icon %}
|
5 | 15 | {{ include('@ContainerIntrospection/DataCollector/container.svg') }}
|
6 |
| - <span class="sf-toolbar-value">{{ collector.countInstantiatedServices()|localizednumber }} / {{ collector.countRegisteredServices()|localizednumber }}</span> |
| 16 | + <span class="sf-toolbar-value"> |
| 17 | + {{ collector.countInstantiatedServices()|number_format(0, '.', ',') }} |
| 18 | + / {{ collector.countServices()|number_format(0, '.', ',') }} |
| 19 | + </span> |
7 | 20 | {% endset %}
|
8 | 21 |
|
9 | 22 | {% set text %}
|
10 | 23 | <div class="sf-toolbar-info-piece">
|
11 |
| - <b>Instantiated services</b> |
12 |
| - <span>{{ collector.countInstantiatedServices()|localizednumber }}</span> |
| 24 | + <b>Instantiated</b> |
| 25 | + <span>{{ collector.countInstantiatedServices()|number_format(0, '.', ',') }}</span> |
13 | 26 | </div>
|
14 | 27 |
|
15 | 28 | <div class="sf-toolbar-info-piece">
|
16 |
| - <b>Registered services</b> |
17 |
| - <span>{{ collector.countRegisteredServices()|localizednumber }}</span> |
| 29 | + <b>Removed</b> |
| 30 | + <span>{{ collector.countRemovedServices()|number_format(0, '.', ',') }}</span> |
18 | 31 | </div>
|
19 | 32 |
|
20 | 33 | <div class="sf-toolbar-info-piece">
|
21 |
| - <b>Public services</b> |
22 |
| - <span>{{ collector.countPublicServices()|localizednumber }}</span> |
| 34 | + <b>Public</b> |
| 35 | + <span>{{ collector.countPublicServices()|number_format(0, '.', ',') }}</span> |
23 | 36 | </div>
|
24 | 37 |
|
25 | 38 | <div class="sf-toolbar-info-piece">
|
26 |
| - <b>Private services</b> |
27 |
| - <span>{{ collector.countPrivateServices()|localizednumber }}</span> |
| 39 | + <b>Total</b> |
| 40 | + <span>{{ collector.countServices()|number_format(0, '.', ',') }}</span> |
28 | 41 | </div>
|
29 | 42 |
|
30 | 43 | <div class="sf-toolbar-info-piece">
|
31 | 44 | <b>Parameters</b>
|
32 |
| - <span>{{ collector.countParameters()|localizednumber }}</span> |
| 45 | + <span>{{ collector.countParameters()|number_format(0, '.', ',') }}</span> |
33 | 46 | </div>
|
34 | 47 | {% endset %}
|
35 | 48 |
|
|
59 | 72 | color: #8959A8;
|
60 | 73 | font-weight: bold;
|
61 | 74 | }
|
| 75 | +
|
| 76 | + .label.visibility-public { |
| 77 | + background: #269cce; |
| 78 | + color: #FFF; |
| 79 | + } |
| 80 | +
|
| 81 | + .label.visibility-private { |
| 82 | + background: #666666; |
| 83 | + color: #FFF; |
| 84 | + } |
62 | 85 | </style>
|
63 | 86 | {% endblock %}
|
64 | 87 |
|
65 | 88 | {% block panel %}
|
| 89 | + {% import _self as self %} |
| 90 | + |
66 | 91 | <h2>Statistics</h2>
|
67 | 92 |
|
68 | 93 | <div class="metrics">
|
69 | 94 | <div class="metric">
|
70 | 95 | <span class="value" title="{{ collector.getContainerCachePath() }}">{{ collector.getContainerCacheDir() }}</span>
|
71 |
| - <span class="label">Cache dir</span> |
| 96 | + <span class="label">Container</span> |
72 | 97 | </div>
|
73 | 98 |
|
74 | 99 | <div class="metric">
|
75 |
| - <span class="value">{{ collector.countContainerCacheFiles() }}</span> |
| 100 | + <span class="value" title="{{ collector.countServices()|number_format(0, '.', ',') }}"> |
| 101 | + {{ collector.countServices()|number_format(0, '.', ',') }} |
| 102 | + </span> |
| 103 | + <span class="label">Services</span> |
| 104 | + </div> |
| 105 | + |
| 106 | + <div class="metric"> |
| 107 | + <span class="value">{{ collector.countContainerCacheFiles()|number_format(0, '.', ',') }}</span> |
76 | 108 | <span class="label">Cache files</span>
|
77 | 109 | </div>
|
78 | 110 |
|
|
92 | 124 | <div class="sf-tabs">
|
93 | 125 | <div class="tab">
|
94 | 126 | <h3 class="tab-title">
|
95 |
| - Instantiated services |
96 |
| - <span class="badge">{{ collector.countInstantiatedServices()|localizednumber }}</span> |
| 127 | + Instantiated |
| 128 | + <span class="badge">{{ collector.countInstantiatedServices()|number_format(0, '.', ',') }}</span> |
97 | 129 | </h3>
|
98 | 130 |
|
99 | 131 | <p class="text-muted">
|
100 |
| - Note that only shared services are shown here, |
| 132 | + Note that only shared (singleton) services are shown here, |
101 | 133 | we can't handle <a href="https://symfony.com/doc/current/service_container/shared.html" target="_blank">non shared service</a> creation.
|
102 | 134 | </p>
|
103 | 135 |
|
104 | 136 | <div class="tab-content">
|
105 | 137 | <table class="table-striped">
|
106 | 138 | <thead>
|
107 | 139 | <tr>
|
108 |
| - <th>#</th> |
109 |
| - <th>Service Id</th> |
| 140 | + <th>Visibility</th> |
| 141 | + <th>Service id</th> |
110 | 142 | <th>FQCN</th>
|
111 | 143 | <th>Instantiation</th>
|
112 | 144 | </tr>
|
113 | 145 | </thead>
|
114 | 146 | <tbody>
|
115 | 147 | {% for serviceId, serviceInfos in collector.getInstantiatedServices() %}
|
116 | 148 | <tr>
|
117 |
| - <td>{{ loop.index }}</td> |
| 149 | + <td> |
| 150 | + {% if serviceInfos.public %} |
| 151 | + <span class="label visibility-public">Public</span> |
| 152 | + {% else %} |
| 153 | + <span class="label visibility-private">Private</span> |
| 154 | + {% endif %} |
| 155 | + </td> |
118 | 156 | <td>
|
119 | 157 | {{ serviceId }}
|
120 | 158 |
|
|
166 | 204 | <i>Unknown value</i>
|
167 | 205 | {% endif %}
|
168 | 206 | </td>
|
169 |
| - <td> |
170 |
| - {% if serviceInfos.ocramiusLazy %} |
171 |
| - <span class="label status-warning">Ocramius Lazy</span> |
172 |
| - {% else %} |
173 |
| - <span class="label status-success">Normal</span> |
174 |
| - {% endif %} |
175 |
| - </td> |
| 207 | + <td>{{ self.serviceInstantiation(serviceInfos) }}</td> |
176 | 208 | </tr>
|
177 | 209 | {% endfor %}
|
178 | 210 | </tbody>
|
|
182 | 214 |
|
183 | 215 | <div class="tab">
|
184 | 216 | <h3 class="tab-title">
|
185 |
| - Registered services |
186 |
| - <span class="badge">{{ collector.countRegisteredServices()|localizednumber }}</span> |
| 217 | + Removed |
| 218 | + <span class="badge">{{ collector.countRemovedServices()|number_format(0, '.', ',') }}</span> |
187 | 219 | </h3>
|
188 | 220 |
|
189 |
| - <div class="tab-content"> |
190 |
| - <table> |
191 |
| - <thead> |
192 |
| - <tr> |
193 |
| - <th>#</th> |
194 |
| - <th>Service ID</th> |
195 |
| - </tr> |
196 |
| - </thead> |
197 |
| - <tbody> |
198 |
| - {% for service in collector.getRegisteredServices() %} |
199 |
| - <tr> |
200 |
| - <td>{{ loop.index }}</td> |
201 |
| - <td>{{ service }}</td> |
202 |
| - </tr> |
203 |
| - {% endfor %} |
204 |
| - </tbody> |
205 |
| - </table> |
206 |
| - </div> |
207 |
| - </div> |
208 |
| - |
209 |
| - <div class="tab"> |
210 |
| - <h3 class="tab-title"> |
211 |
| - Public services |
212 |
| - <span class="badge">{{ collector.countPublicServices()|localizednumber }}</span> |
213 |
| - </h3> |
| 221 | + <p class="text-muted"> |
| 222 | + Some privates, all inlined and all tagged services are removed from Container. |
| 223 | + </p> |
214 | 224 |
|
215 | 225 | <div class="tab-content">
|
216 | 226 | <table>
|
217 | 227 | <thead>
|
218 | 228 | <tr>
|
219 |
| - <th>#</th> |
220 |
| - <th>Service ID</th> |
| 229 | + <th>Service id</th> |
221 | 230 | </tr>
|
222 | 231 | </thead>
|
223 |
| - <tbody> |
224 |
| - {% for service in collector.getPublicServices() %} |
| 232 | + <tbody> |
| 233 | + {% for service in collector.getRemovedServices() %} |
225 | 234 | <tr>
|
226 |
| - <td>{{ loop.index }}</td> |
227 | 235 | <td>{{ service }}</td>
|
228 | 236 | </tr>
|
229 | 237 | {% endfor %}
|
|
234 | 242 |
|
235 | 243 | <div class="tab">
|
236 | 244 | <h3 class="tab-title">
|
237 |
| - Private services |
238 |
| - <span class="badge">{{ collector.countPrivateServices()|localizednumber }}</span> |
| 245 | + Public |
| 246 | + <span class="badge">{{ collector.countPublicServices()|number_format(0, '.', ',') }}</span> |
239 | 247 | </h3>
|
240 | 248 |
|
241 | 249 | <div class="tab-content">
|
242 | 250 | <table>
|
243 | 251 | <thead>
|
244 | 252 | <tr>
|
245 |
| - <th>#</th> |
246 |
| - <th>Service ID</th> |
| 253 | + <th>Service id</th> |
| 254 | + <th>Instantiated</th> |
247 | 255 | </tr>
|
248 | 256 | </thead>
|
249 | 257 | <tbody>
|
250 |
| - {% for service in collector.getPrivateServices() %} |
| 258 | + {% for service in collector.getPublicServices() %} |
251 | 259 | <tr>
|
252 |
| - <td>{{ loop.index }}</td> |
253 | 260 | <td>{{ service }}</td>
|
| 261 | + <td>{{ self.serviceInstantiation(collector.getInstantiatedInfos(service)) }}</td> |
254 | 262 | </tr>
|
255 | 263 | {% endfor %}
|
256 | 264 | </tbody>
|
|
261 | 269 | <div class="tab">
|
262 | 270 | <h3 class="tab-title">
|
263 | 271 | Parameters
|
264 |
| - <span class="badge">{{ collector.countParameters()|localizednumber }}</span> |
| 272 | + <span class="badge">{{ collector.countParameters()|number_format(0, '.', ',') }}</span> |
265 | 273 | </h3>
|
266 | 274 |
|
267 | 275 | <div class="tab-content">
|
268 | 276 | <table>
|
269 | 277 | <thead>
|
270 | 278 | <tr>
|
271 |
| - <th>#</th> |
272 |
| - <th>Parameter name</th> |
| 279 | + <th>Name</th> |
| 280 | + <th>Value</th> |
273 | 281 | </tr>
|
274 | 282 | </thead>
|
275 |
| - <tbody> |
| 283 | + <tbody> |
276 | 284 | {% for parameterName, parameterValue in collector.getParameters() %}
|
277 | 285 | <tr>
|
278 |
| - <td>{{ loop.index }}</td> |
279 | 286 | <td>{{ parameterName }}</td>
|
| 287 | + <td>{{ collector.dumpParameterValue(parameterValue) }}</td> |
280 | 288 | </tr>
|
281 | 289 | {% endfor %}
|
282 | 290 | </tbody>
|
|
0 commit comments