Skip to content

Commit

Permalink
fix(ui): show proper duration (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond authored Nov 28, 2024
1 parent cdab715 commit cb1ff73
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion templates/components/messages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<a href="{{ path('zenstruck_messenger_monitor_history', app.request.query.all|merge({transport: message.transport})) }}" class="badge align-text-top text-bg-secondary">{{ message.transport }}</a>
</td>
<td class="text-center">
<abbr title="{{ message.timeToHandle }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
<abbr title="{{ (message.timeToHandle / 1000)|round(3) }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
</td>
<td class="text-center">
{{ message.memoryUsage }}
Expand Down
4 changes: 2 additions & 2 deletions templates/components/snapshot.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
<tr>
<th class="text-end">Average Wait Time</th>
<td>
<abbr title="{{ snapshot.averageWaitTime|round }}s">{{ helper.formatDuration(snapshot.averageWaitTime) }}</abbr>
<abbr title="{{ (snapshot.averageWaitTime / 1000)|round(3) }}s">{{ helper.formatDuration(snapshot.averageWaitTime) }}</abbr>
</td>
</tr>
<tr>
<th class="text-end">Average Handling Time</th>
<td>
<abbr title="{{ snapshot.averageHandlingTime|round }}s">{{ helper.formatDuration(snapshot.averageHandlingTime) }}</abbr>
<abbr title="{{ (snapshot.averageHandlingTime / 1000)|round(3) }}s">{{ helper.formatDuration(snapshot.averageHandlingTime) }}</abbr>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions templates/detail.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
<tr>
<th class="text-end text-nowrap">Time in Queue</th>
<td>
<abbr title="{{ message.timeInQueue }}s">{{ helper.formatDuration(message.timeInQueue) }}</abbr>
<abbr title="{{ (message.timeInQueue / 1000)|round(3) }}s">{{ helper.formatDuration(message.timeInQueue) }}</abbr>
</td>
</tr>
<tr>
<th class="text-end text-nowrap">Time to Handle</th>
<td>
<abbr title="{{ message.timeToHandle }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
<abbr title="{{ (message.timeToHandle / 1000)|round(3) }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/schedule.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
</td>
<td class="text-center">
{% if message %}
<abbr title="{{ message.timeToHandle }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
<abbr title="{{ (message.timeToHandle / 1000)|round(3) }}s">{{ helper.formatDuration(message.timeToHandle) }}</abbr>
{% else %}
<em class="text-secondary">-</em>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions templates/statistics.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
{% endif %}
</td>
<td>
<abbr title="{{ metric.averageWaitTime|round }}s">{{ helper.formatDuration(metric.averageWaitTime) }}</abbr>
<abbr title="{{ (metric.averageWaitTime / 1000)|round(3) }}s">{{ helper.formatDuration(metric.averageWaitTime) }}</abbr>
</td>
<td>
<abbr title="{{ metric.averageHandlingTime|round }}s">{{ helper.formatDuration(metric.averageHandlingTime) }}</abbr>
<abbr title="{{ (metric.averageHandlingTime / 1000)|round(3) }}s">{{ helper.formatDuration(metric.averageHandlingTime) }}</abbr>
</td>
<td>
{{ metric.handledPerMinute|round(2) }}
Expand Down

0 comments on commit cb1ff73

Please sign in to comment.