Skip to content

Commit 9343fb7

Browse files
authored
Adapt Icon to profiler redesign (minor) (#83)
* Add `empty-panel` class when panel is empty * Fix message table HTML * Use `currentColor` in the SVG icon
1 parent e21ad84 commit 9343fb7

File tree

2 files changed

+19
-35
lines changed

2 files changed

+19
-35
lines changed

src/Resources/views/Collector/mercure.html.twig

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<h2>Messages</h2>
2727

2828
{% if collector.count == 0 %}
29-
<div class="empty">
29+
<div class="empty empty-panel">
3030
<p>No messages have been collected.</p>
3131
</div>
3232
{% else %}
@@ -60,19 +60,21 @@
6060
<th>Retry</th>
6161
</tr>
6262
</thead>
63-
{% for i, message in data.messages %}
64-
<tr>
65-
<td class="font-normal text-small text-muted nowrap">{{ i + 1 }}</td>
66-
<td class="nowrap">{{ '%.0f'|format(message.duration) }} ms</td>
67-
<td class="nowrap">{{ '%.2f'|format(message.memory / 1024 / 1024) }} MB</td>
68-
<td class="font-normal text-small text-bold nowrap">{{ message.object.topics|join(',') }}</td>
69-
<td>{{ dump(message.object.data) }}</td>
70-
<td>{{ dump(message.object.private) }}</td>
71-
<td class="nowrap">{{ message.object.id }}</td>
72-
<td class="nowrap">{{ message.object.type }}</td>
73-
<td class="nowrap">{{ message.object.retry }}</td>
74-
</tr>
75-
{% endfor %}
63+
<tbody>
64+
{% for message in data.messages %}
65+
<tr>
66+
<td class="font-normal text-small text-muted nowrap">{{ loop.index }}</td>
67+
<td class="nowrap">{{ '%.0f'|format(message.duration) }} ms</td>
68+
<td class="nowrap">{{ '%.2f'|format(message.memory / 1024 / 1024) }} MB</td>
69+
<td class="font-normal text-small text-bold nowrap">{{ message.object.topics|join(',') }}</td>
70+
<td>{{ dump(message.object.data) }}</td>
71+
<td>{{ dump(message.object.private) }}</td>
72+
<td class="nowrap">{{ message.object.id }}</td>
73+
<td class="nowrap">{{ message.object.type }}</td>
74+
<td class="nowrap">{{ message.object.retry }}</td>
75+
</tr>
76+
{% endfor %}
77+
</tbody>
7678
</table>
7779
</div>
7880
</div>
Lines changed: 3 additions & 21 deletions
Loading

0 commit comments

Comments
 (0)