|
19 | 19 | {% endif %}
|
20 | 20 |
|
21 | 21 | {% set icon %}
|
22 |
| - {% if collector.symfonyState is defined %} |
| 22 | + {% if collector.applicationname %} |
| 23 | + <span class="sf-toolbar-label">{{ collector.applicationname }}</span> |
| 24 | + <span class="sf-toolbar-value">{{ collector.applicationversion }}</span> |
| 25 | + {% elseif collector.symfonyState is defined %} |
23 | 26 | <span class="sf-toolbar-label">
|
24 | 27 | {{ include('@WebProfiler/Icon/symfony.svg') }}
|
25 | 28 | </span>
|
26 | 29 | <span class="sf-toolbar-value">{{ collector.symfonyversion }}</span>
|
27 |
| - {% elseif collector.applicationname %} |
28 |
| - <span class="sf-toolbar-label">{{ collector.applicationname }}</span> |
29 |
| - <span class="sf-toolbar-value">{{ collector.applicationversion }}</span> |
30 | 30 | {% endif %}
|
31 | 31 | {% endset %}
|
32 | 32 |
|
33 | 33 | {% set text %}
|
34 | 34 | {% if collector.applicationname %}
|
35 | 35 | <div class="sf-toolbar-info-piece">
|
36 |
| - {{ collector.applicationname }} <b>{{ collector.applicationversion }}</b> |
| 36 | + <b>{{ collector.applicationname }}</b> |
| 37 | + <span>{{ collector.applicationversion }}</span> |
37 | 38 | </div>
|
38 | 39 | {% endif %}
|
39 | 40 |
|
|
88 | 89 | <span>{{ collector.sapiName }}</span>
|
89 | 90 | </div>
|
90 | 91 |
|
| 92 | + |
91 | 93 | {% if collector.symfonyversion is defined %}
|
92 | 94 | <div class="sf-toolbar-info-piece">
|
93 | 95 | <b>Resources</b>
|
94 | 96 | <span>
|
95 |
| - <a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help"> |
96 |
| - Read Symfony {{ collector.symfonyversion }} Docs |
97 |
| - </a> |
| 97 | + {% if 'Silex' == collector.applicationname %} |
| 98 | + <a href="http://silex.sensiolabs.org/documentation" rel="help"> |
| 99 | + Read Silex Docs |
| 100 | + </a> |
| 101 | + {% else %} |
| 102 | + <a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help"> |
| 103 | + Read Symfony {{ collector.symfonyversion }} Docs |
| 104 | + </a> |
| 105 | + {% endif %} |
98 | 106 | </span>
|
99 | 107 | </div>
|
100 | 108 | {% endif %}
|
101 | 109 | {% endset %}
|
102 | 110 |
|
103 |
| - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }} |
| 111 | + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status }) }} |
104 | 112 | {% endblock %}
|
105 | 113 |
|
106 | 114 | {% block menu %}
|
107 |
| -<span class="label"> |
108 |
| - <span class="icon"><svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M5 17H1c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C6 16.6 5.6 17 5 17z"/><path fill="#3F3F3F" d="M19 17h-4c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C20 16.6 19.6 17 19 17z"/><path fill="#3F3F3F" d="M12.1 20h-4c-0.5 0-1-0.4-1-1v-7c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C13.1 19.5 12.6 20 12.1 20z"/><rect x="9.1" y="5.8" fill="#3F3F3F" width="2" height="4.5"/><rect x="16" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="2.1" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="9.1" y="20.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="2.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="16.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/></g></svg></span> |
109 |
| - <strong>Config</strong> |
110 |
| -</span> |
| 115 | + <span class="label label-status-{{ collector.symfonyState == 'eol' ? 'red' : collector.symfonyState in ['eom', 'dev'] ? 'yellow' : '' }}"> |
| 116 | + <span class="icon">{{ include('@WebProfiler/Icon/config.svg') }}</span> |
| 117 | + <strong>Configuration</strong> |
| 118 | + </span> |
111 | 119 | {% endblock %}
|
112 | 120 |
|
113 | 121 | {% block panel %}
|
114 |
| - <h2>Project Configuration</h2> |
115 |
| - <table> |
116 |
| - <tr> |
117 |
| - <th>Key</th> |
118 |
| - <th>Value</th> |
119 |
| - </tr> |
120 |
| - <tr> |
121 |
| - {% if collector.applicationname %} |
122 |
| - <th>Application</th> |
123 |
| - <td>{{ collector.applicationname }} {{ collector.applicationversion }} (on Symfony {{ collector.symfonyversion }})</td> |
124 |
| - {% else %} |
125 |
| - <th>Symfony version</th> |
126 |
| - <td>{{ collector.symfonyversion }}</td> |
| 122 | + {% if collector.applicationname %} |
| 123 | + {# this application is not the Symfony framework #} |
| 124 | + <h2>Project Configuration</h2> |
| 125 | + |
| 126 | + <div class="metrics"> |
| 127 | + <div class="metric"> |
| 128 | + <span class="value">{{ collector.applicationname }}</span> |
| 129 | + <span class="label">Application name</span> |
| 130 | + </div> |
| 131 | + |
| 132 | + <div class="metric"> |
| 133 | + <span class="value">{{ collector.applicationversion }}</span> |
| 134 | + <span class="label">Application version</span> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + |
| 138 | + <p> |
| 139 | + Based on <a class="text-bold" href="https://symfony.com">Symfony {{ collector.symfonyversion }}</a> |
| 140 | + </p> |
| 141 | + {% else %} |
| 142 | + <h2>Symfony Configuration</h2> |
| 143 | + |
| 144 | + <div class="metrics"> |
| 145 | + <div class="metric"> |
| 146 | + <span class="value">{{ collector.symfonyversion }}</span> |
| 147 | + <span class="label">Symfony version</span> |
| 148 | + </div> |
| 149 | + |
| 150 | + {% if 'n/a' != collector.appname %} |
| 151 | + <div class="metric"> |
| 152 | + <span class="value">{{ collector.appname }}</span> |
| 153 | + <span class="label">Application name</span> |
| 154 | + </div> |
127 | 155 | {% endif %}
|
128 |
| - </tr> |
129 |
| - {% if 'n/a' != collector.appname %} |
130 |
| - <tr> |
131 |
| - <th>Application name</th> |
132 |
| - <td>{{ collector.appname }}</td> |
133 |
| - </tr> |
134 |
| - {% endif %} |
135 |
| - {% if 'n/a' != collector.env %} |
136 |
| - <tr> |
137 |
| - <th>Environment</th> |
138 |
| - <td>{{ collector.env }}</td> |
139 |
| - </tr> |
140 |
| - {% endif %} |
141 |
| - {% if 'n/a' != collector.debug %} |
142 |
| - <tr> |
143 |
| - <th>Debug</th> |
144 |
| - <td>{{ collector.debug ? 'enabled' : 'disabled' }}</td> |
145 |
| - </tr> |
146 |
| - {% endif %} |
147 |
| - </table> |
148 |
| - |
149 |
| - <h2>PHP configuration</h2> |
150 |
| - <table> |
151 |
| - <tr> |
152 |
| - <th>Key</th> |
153 |
| - <th>Value</th> |
154 |
| - </tr> |
155 |
| - <tr> |
156 |
| - <th>PHP version</th> |
157 |
| - <td>{{ collector.phpversion }}</td> |
158 |
| - </tr> |
159 |
| - <tr> |
160 |
| - <th>Xdebug</th> |
161 |
| - <td>{{ collector.hasxdebug ? 'enabled' : 'disabled' }}</td> |
162 |
| - </tr> |
163 |
| - <tr> |
164 |
| - <th>PHP acceleration</th> |
165 |
| - <td>{{ collector.hasaccelerator ? 'enabled' : 'disabled' }}</td> |
166 |
| - </tr> |
167 |
| - <tr> |
168 |
| - <th>XCache</th> |
169 |
| - <td>{{ collector.hasxcache ? 'enabled' : 'disabled' }}</td> |
170 |
| - </tr> |
171 |
| - <tr> |
172 |
| - <th>APC</th> |
173 |
| - <td>{{ collector.hasapc ? 'enabled' : 'disabled' }}</td> |
174 |
| - </tr> |
175 |
| - <tr> |
176 |
| - <th>Zend OPcache</th> |
177 |
| - <td>{{ collector.haszendopcache ? 'enabled' : 'disabled' }}</td> |
178 |
| - </tr> |
179 |
| - <tr> |
180 |
| - <th>EAccelerator</th> |
181 |
| - <td>{{ collector.haseaccelerator ? 'enabled' : 'disabled' }}</td> |
182 |
| - </tr> |
183 |
| - <tr> |
184 |
| - <th>Full PHP configuration</th> |
185 |
| - <td><a href="{{ path('_profiler_phpinfo') }}"><code>phpinfo</code></a></td> |
186 |
| - </tr> |
187 |
| - </table> |
| 156 | + |
| 157 | + {% if 'n/a' != collector.env %} |
| 158 | + <div class="metric"> |
| 159 | + <span class="value">{{ collector.env }}</span> |
| 160 | + <span class="label">Environment</span> |
| 161 | + </div> |
| 162 | + {% endif %} |
| 163 | + |
| 164 | + {% if 'n/a' != collector.debug %} |
| 165 | + <div class="metric"> |
| 166 | + <span class="value">{{ collector.debug ? 'enabled' : 'disabled' }}</span> |
| 167 | + <span class="label">Debug</span> |
| 168 | + </div> |
| 169 | + {% endif %} |
| 170 | + </div> |
| 171 | + {% endif %} |
| 172 | + |
| 173 | + <h2>PHP Configuration</h2> |
| 174 | + |
| 175 | + <div class="metrics"> |
| 176 | + <div class="metric"> |
| 177 | + <span class="value">{{ collector.phpversion }}</span> |
| 178 | + <span class="label">PHP version</span> |
| 179 | + </div> |
| 180 | + |
| 181 | + <div class="metric"> |
| 182 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasaccelerator ? 'yes' : 'no') ~ '.svg') }}</span> |
| 183 | + <span class="label">PHP acceleration</span> |
| 184 | + </div> |
| 185 | + |
| 186 | + <div class="metric"> |
| 187 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no') ~ '.svg') }}</span> |
| 188 | + <span class="label">Xdebug</span> |
| 189 | + </div> |
| 190 | + </div> |
| 191 | + |
| 192 | + <div class="metrics metrics-horizontal"> |
| 193 | + <div class="metric"> |
| 194 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }}</span> |
| 195 | + <span class="label">OPcache</span> |
| 196 | + </div> |
| 197 | + |
| 198 | + <div class="metric"> |
| 199 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasapc ? 'yes' : 'no') ~ '.svg') }}</span> |
| 200 | + <span class="label">APC</span> |
| 201 | + </div> |
| 202 | + |
| 203 | + <div class="metric"> |
| 204 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.hasxcache ? 'yes' : 'no') ~ '.svg') }}</span> |
| 205 | + <span class="label">XCache</span> |
| 206 | + </div> |
| 207 | + |
| 208 | + <div class="metric"> |
| 209 | + <span class="value">{{ include('@WebProfiler/Icon/' ~ (collector.haseaccelerator ? 'yes' : 'no') ~ '.svg') }}</span> |
| 210 | + <span class="label">EAccelerator</span> |
| 211 | + </div> |
| 212 | + </div> |
| 213 | + |
| 214 | + <p> |
| 215 | + <a href="{{ path('_profiler_phpinfo') }}">View full PHP configuration</a> |
| 216 | + </p> |
188 | 217 |
|
189 | 218 | {% if collector.bundles %}
|
190 |
| - <h2>Active bundles</h2> |
| 219 | + <h2>Enabled Bundles <small>({{ collector.bundles|length }})</small></h2> |
191 | 220 | <table>
|
192 |
| - <tr> |
193 |
| - <th>Name</th> |
194 |
| - <th>Path</th> |
195 |
| - </tr> |
196 |
| - {% set bundles = collector.bundles %} |
197 |
| - {% for name in bundles|keys|sort %} |
198 |
| - <tr> |
199 |
| - <th>{{ name }}</th> |
200 |
| - <td>{{ bundles[name] }}</td> |
201 |
| - </tr> |
202 |
| - {% endfor %} |
| 221 | + <thead> |
| 222 | + <tr> |
| 223 | + <th class="key">Name</th> |
| 224 | + <th>Path</th> |
| 225 | + </tr> |
| 226 | + </thead> |
| 227 | + <tbody> |
| 228 | + {% for name in collector.bundles|keys|sort %} |
| 229 | + <tr> |
| 230 | + <th scope="row" class="font-normal">{{ name }}</th> |
| 231 | + <td class="font-normal">{{ collector.bundles[name] }}</td> |
| 232 | + </tr> |
| 233 | + {% endfor %} |
| 234 | + </tbody> |
203 | 235 | </table>
|
204 | 236 | {% endif %}
|
205 | 237 | {% endblock %}
|
0 commit comments