Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1b3ce7

Browse files
committed
merged branch fabpot/webprofiler-master (PR #7286)
This PR was merged into the master branch. Commits ------- 6ead8a1 [WebProfilerBundle] removed the display of some information when their value is n/a Discussion ---------- [WebProfilerBundle] removed the display of some information when their value is n/a | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7002 | License | MIT | Doc PR | n/a
2 parents ea7c685 + 6ead8a1 commit e1b3ce7

File tree

1 file changed

+42
-27
lines changed

1 file changed

+42
-27
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,33 @@
4949
<img width="21" height="28" alt="Environment" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAMAAAC5xgRsAAAAZlBMVEX///////////////////////////////////////////////////////////////////////////////////////////+ZmZmZmZlISEhJSUmdnZ1HR0fR0dFZWVlpaWlfX18/Pz+puygPAAAAIXRSTlMACwwlJygpLzIzNjs8QEtMUmd6e32AucDBw8fIydTm6u5l8MjvAAAAo0lEQVR42r2P2Q6CMBBFL6XsZRGRfZv//0nbDBNEE19MnJeTc5ILKf58ahiUwzy/AJpIWwREwQnEXRdbGCLjrO+djWRvVMiJcigxB7viGogxDdJpSmHEmCVPS7YczJvgUu+CS30IvtbNYZMvsGVo2mVpG/kbm4auiCpdcC3YPCAhSpAdUzaAn6qPKZtUT6ZSzb4bi2hdo9MQ1nX4ASjfV+/4/Z40pyCHrNTbIgAAAABJRU5ErkJggg==">
5050
<span class="sf-toolbar-info-piece-additional-detail {{ debug_status_class }}"> </span>
5151
<span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ token }}</span>
52-
<span class="sf-toolbar-info-piece-additional-detail">
53-
<span class="sf-toolbar-info-with-delimiter">{{ collector.appname }}</span><span>{{ collector.env }}</span>
54-
</span>
52+
{% if 'n/a' != collector.appname or 'n/a' != collector.env %}
53+
<span class="sf-toolbar-info-piece-additional-detail">
54+
<span class="sf-toolbar-info-with-delimiter">{{ collector.appname }}</span>
55+
<span>{{ collector.env }}</span>
56+
</span>
57+
{% endif %}
5558
{% endset %}
5659
{% set text %}
5760
{% spaceless %}
58-
<div class="sf-toolbar-info-piece">
59-
<b>Name</b>
60-
<span>{{ collector.appname }}</span>
61-
</div>
62-
<div class="sf-toolbar-info-piece">
63-
<b>Environment</b>
64-
<span>{{ collector.env }}</span>
65-
</div>
66-
<div class="sf-toolbar-info-piece">
67-
<b>Debug</b>
68-
<span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
69-
</div>
61+
{% if 'n/a' != collector.appname %}
62+
<div class="sf-toolbar-info-piece">
63+
<b>Name</b>
64+
<span>{{ collector.appname }}</span>
65+
</div>
66+
{% endif %}
67+
{% if 'n/a' != collector.env %}
68+
<div class="sf-toolbar-info-piece">
69+
<b>Environment</b>
70+
<span>{{ collector.env }}</span>
71+
</div>
72+
{% endif %}
73+
{% if 'n/a' != collector.debug %}
74+
<div class="sf-toolbar-info-piece">
75+
<b>Debug</b>
76+
<span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
77+
</div>
78+
{% endif %}
7079
<div class="sf-toolbar-info-piece">
7180
<b>Token</b>
7281
<span>
@@ -100,18 +109,24 @@
100109
<th>Symfony version</th>
101110
<td>{{ collector.symfonyversion }}</td>
102111
</tr>
103-
<tr>
104-
<th>Application name</th>
105-
<td>{{ collector.appname }}</td>
106-
</tr>
107-
<tr>
108-
<th>Environment</th>
109-
<td>{{ collector.env }}</td>
110-
</tr>
111-
<tr>
112-
<th>Debug</th>
113-
<td>{{ collector.debug ? 'enabled' : 'disabled' }}</td>
114-
</tr>
112+
{% if 'n/a' != collector.appname %}
113+
<tr>
114+
<th>Application name</th>
115+
<td>{{ collector.appname }}</td>
116+
</tr>
117+
{% endif %}
118+
{% if 'n/a' != collector.env %}
119+
<tr>
120+
<th>Environment</th>
121+
<td>{{ collector.env }}</td>
122+
</tr>
123+
{% endif %}
124+
{% if 'n/a' != collector.debug %}
125+
<tr>
126+
<th>Debug</th>
127+
<td>{{ collector.debug ? 'enabled' : 'disabled' }}</td>
128+
</tr>
129+
{% endif %}
115130
</table>
116131

117132
<h2>PHP configuration</h2>

0 commit comments

Comments
 (0)