Skip to content

Commit 7e3f458

Browse files
authored
Merge pull request #374 from php-enqueue/symfony-print-command-name
[symfony] Print command name
2 parents faa2786 + a6e4cc6 commit 7e3f458

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

Diff for: pkg/enqueue-bundle/Resources/views/Profiler/panel.html.twig

+17-10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<tr>
3535
<th>#</th>
3636
<th>Topic</th>
37+
<th>Command</th>
3738
<th>Message</th>
3839
<th>Priority</th>
3940
</tr>
@@ -42,19 +43,25 @@
4243
{% for sentMessage in collector.sentMessages %}
4344
<tr>
4445
<td>{{ loop.index }}</td>
45-
<td>{{ sentMessage.topic }}</td>
46+
<td>{{ sentMessage.topic|default(null) }}</td>
47+
<td>{{ sentMessage.command|default(null) }}</td>
4648
<td style="width: 70%">
47-
<span class="metadata">
48-
<span>
49-
{{ collector.ensureString(sentMessage.body)[0:40] }}{% if collector.ensureString(sentMessage.body)[0:40] != collector.ensureString(sentMessage.body) %}...{% endif %}
50-
</span>
51-
<a class="btn btn-link text-small sf-toggle" data-toggle-selector="#message-body-{{ loop.index }}" data-toggle-alt-content="Hide trace">Show trace</a>
49+
<span class="metadata">
50+
<span>
51+
{{ collector.ensureString(sentMessage.body)[0:40] }}{% if collector.ensureString(sentMessage.body)[0:40] != collector.ensureString(sentMessage.body) %}...{% endif %}
52+
</span>
53+
54+
{% if collector.ensureString(sentMessage.body)|length > 40 %}
55+
<a class="btn btn-link text-small sf-toggle" data-toggle-selector="#message-body-{{ loop.index }}" data-toggle-alt-content="Hide body">Show body</a>
5256

5357
<div id="message-body-{{ loop.index }}" class="context sf-toggle-content sf-toggle-hidden">
54-
{{ profiler_dump(sentMessage.body) }}
55-
</div>
56-
</span>
57-
<td><span title="{{ sentMessage.priority }}">{{ collector.prettyPrintPriority(sentMessage.priority) }}</span></td>
58+
{{ profiler_dump(sentMessage.body) }}
59+
</div>
60+
{% endif %}
61+
</span>
62+
<td>
63+
<span title="{{ sentMessage.priority }}">{{ collector.prettyPrintPriority(sentMessage.priority) }}</span>
64+
</td>
5865
</tr>
5966
{% endfor %}
6067
</tbody>

0 commit comments

Comments
 (0)