Skip to content

Commit

Permalink
Adapt Icon to profiler redesign (minor) (#83)
Browse files Browse the repository at this point in the history
* Add `empty-panel` class when panel is empty

* Fix message table HTML

* Use `currentColor` in the SVG icon
  • Loading branch information
smnandre committed Jan 30, 2024
1 parent e21ad84 commit 9343fb7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
30 changes: 16 additions & 14 deletions src/Resources/views/Collector/mercure.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h2>Messages</h2>

{% if collector.count == 0 %}
<div class="empty">
<div class="empty empty-panel">
<p>No messages have been collected.</p>
</div>
{% else %}
Expand Down Expand Up @@ -60,19 +60,21 @@
<th>Retry</th>
</tr>
</thead>
{% for i, message in data.messages %}
<tr>
<td class="font-normal text-small text-muted nowrap">{{ i + 1 }}</td>
<td class="nowrap">{{ '%.0f'|format(message.duration) }} ms</td>
<td class="nowrap">{{ '%.2f'|format(message.memory / 1024 / 1024) }} MB</td>
<td class="font-normal text-small text-bold nowrap">{{ message.object.topics|join(',') }}</td>
<td>{{ dump(message.object.data) }}</td>
<td>{{ dump(message.object.private) }}</td>
<td class="nowrap">{{ message.object.id }}</td>
<td class="nowrap">{{ message.object.type }}</td>
<td class="nowrap">{{ message.object.retry }}</td>
</tr>
{% endfor %}
<tbody>
{% for message in data.messages %}
<tr>
<td class="font-normal text-small text-muted nowrap">{{ loop.index }}</td>
<td class="nowrap">{{ '%.0f'|format(message.duration) }} ms</td>
<td class="nowrap">{{ '%.2f'|format(message.memory / 1024 / 1024) }} MB</td>
<td class="font-normal text-small text-bold nowrap">{{ message.object.topics|join(',') }}</td>
<td>{{ dump(message.object.data) }}</td>
<td>{{ dump(message.object.private) }}</td>
<td class="nowrap">{{ message.object.id }}</td>
<td class="nowrap">{{ message.object.type }}</td>
<td class="nowrap">{{ message.object.retry }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
Expand Down
24 changes: 3 additions & 21 deletions src/Resources/views/Icon/mercure.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9343fb7

Please sign in to comment.