Skip to content

Commit 0545c9d

Browse files
authored
fix: vertical centering no-results on exceptions card (#439)
1 parent 514ed5e commit 0545c9d

File tree

1 file changed

+45
-47
lines changed

1 file changed

+45
-47
lines changed

resources/views/livewire/exceptions.blade.php

+45-47
Original file line numberDiff line numberDiff line change
@@ -22,54 +22,52 @@
2222
</x-pulse::card-header>
2323

2424
<x-pulse::scroll :expand="$expand" wire:poll.5s="">
25-
<div class="min-h-full flex flex-col">
26-
@if ($exceptions->isEmpty())
27-
<x-pulse::no-results />
28-
@else
29-
<x-pulse::table>
30-
<colgroup>
31-
<col width="100%" />
32-
<col width="0%" />
33-
<col width="0%" />
34-
</colgroup>
35-
<x-pulse::thead>
36-
<tr>
37-
<x-pulse::th>Type</x-pulse::th>
38-
<x-pulse::th class="text-right">Latest</x-pulse::th>
39-
<x-pulse::th class="text-right">Count</x-pulse::th>
25+
@if ($exceptions->isEmpty())
26+
<x-pulse::no-results />
27+
@else
28+
<x-pulse::table>
29+
<colgroup>
30+
<col width="100%" />
31+
<col width="0%" />
32+
<col width="0%" />
33+
</colgroup>
34+
<x-pulse::thead>
35+
<tr>
36+
<x-pulse::th>Type</x-pulse::th>
37+
<x-pulse::th class="text-right">Latest</x-pulse::th>
38+
<x-pulse::th class="text-right">Count</x-pulse::th>
39+
</tr>
40+
</x-pulse::thead>
41+
<tbody>
42+
@foreach ($exceptions->take(100) as $exception)
43+
<tr wire:key="{{ $exception->class.$exception->location }}-spacer" class="h-2 first:h-0"></tr>
44+
<tr wire:key="{{ $exception->class.$exception->location }}-row">
45+
<x-pulse::td class="max-w-[1px]">
46+
<code class="block text-xs text-gray-900 dark:text-gray-100 truncate" title="{{ $exception->class }}">
47+
{{ $exception->class }}
48+
</code>
49+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400 truncate" title="{{ $exception->location }}">
50+
{{ $exception->location }}
51+
</p>
52+
</x-pulse::td>
53+
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
54+
{{ $exception->latest->ago(syntax: Carbon\CarbonInterface::DIFF_ABSOLUTE, short: true) }}
55+
</x-pulse::td>
56+
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
57+
@if ($config['sample_rate'] < 1)
58+
<span title="Sample rate: {{ $config['sample_rate'] }}, Raw value: {{ number_format($exception->count) }}">~{{ number_format($exception->count * (1 / $config['sample_rate'])) }}</span>
59+
@else
60+
{{ number_format($exception->count) }}
61+
@endif
62+
</x-pulse::td>
4063
</tr>
41-
</x-pulse::thead>
42-
<tbody>
43-
@foreach ($exceptions->take(100) as $exception)
44-
<tr wire:key="{{ $exception->class.$exception->location }}-spacer" class="h-2 first:h-0"></tr>
45-
<tr wire:key="{{ $exception->class.$exception->location }}-row">
46-
<x-pulse::td class="max-w-[1px]">
47-
<code class="block text-xs text-gray-900 dark:text-gray-100 truncate" title="{{ $exception->class }}">
48-
{{ $exception->class }}
49-
</code>
50-
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400 truncate" title="{{ $exception->location }}">
51-
{{ $exception->location }}
52-
</p>
53-
</x-pulse::td>
54-
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
55-
{{ $exception->latest->ago(syntax: Carbon\CarbonInterface::DIFF_ABSOLUTE, short: true) }}
56-
</x-pulse::td>
57-
<x-pulse::td numeric class="text-gray-700 dark:text-gray-300 font-bold">
58-
@if ($config['sample_rate'] < 1)
59-
<span title="Sample rate: {{ $config['sample_rate'] }}, Raw value: {{ number_format($exception->count) }}">~{{ number_format($exception->count * (1 / $config['sample_rate'])) }}</span>
60-
@else
61-
{{ number_format($exception->count) }}
62-
@endif
63-
</x-pulse::td>
64-
</tr>
65-
@endforeach
66-
</tbody>
67-
</x-pulse::table>
68-
@endif
64+
@endforeach
65+
</tbody>
66+
</x-pulse::table>
67+
@endif
6968

70-
@if ($exceptions->count() > 100)
71-
<div class="mt-2 text-xs text-gray-400 text-center">Limited to 100 entries</div>
72-
@endif
73-
</div>
69+
@if ($exceptions->count() > 100)
70+
<div class="mt-2 text-xs text-gray-400 text-center">Limited to 100 entries</div>
71+
@endif
7472
</x-pulse::scroll>
7573
</x-pulse::card>

0 commit comments

Comments
 (0)