Skip to content

Commit 395b206

Browse files
authored
Add packet loss to latest result stats (alexjustesen#2495)
Co-authored-by: Alex Justesen <[email protected]>
1 parent a47e322 commit 395b206

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

resources/views/livewire/latest-result-stats.blade.php

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,6 @@
1616
</x-filament::button>
1717
</div>
1818

19-
<x-filament::section class="col-span-1" icon="tabler-ruler" icon-size="md">
20-
<x-slot name="heading">
21-
Benchmark status
22-
</x-slot>
23-
24-
<div class="flex items-center gap-x-2">
25-
@if($this->latestResult->healthy === true)
26-
<div class="flex-none rounded-full bg-emerald-500/20 p-1">
27-
<div class="size-2 rounded-full bg-emerald-500"></div>
28-
</div>
29-
30-
<span class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ __('general.healthy') }}</span>
31-
@elseif($this->latestResult->healthy === false)
32-
<div class="flex-none rounded-full bg-amber-500/20 p-1">
33-
<div class="size-2 rounded-full bg-amber-500"></div>
34-
</div>
35-
36-
<span class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ __('general.unhealthy') }}</span>
37-
@else
38-
<div class="flex-none rounded-full bg-zinc-500/20 p-1">
39-
<div class="size-2 rounded-full bg-zinc-500"></div>
40-
</div>
41-
42-
<span class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ __('general.not_measured') }}</span>
43-
@endif
44-
</div>
45-
</x-filament::section>
46-
4719
<x-filament::section class="col-span-1" icon="tabler-download" icon-size="md">
4820
<x-slot name="heading">
4921
{{ __('general.download') }}
@@ -148,6 +120,17 @@
148120
<span class="text-sm text-zinc-600 dark:text-zinc-400">ms</span>
149121
</p>
150122
</x-filament::section>
123+
124+
<x-filament::section class="col-span-1" icon="tabler-square-percentage" icon-size="sm">
125+
<x-slot name="heading">
126+
{{ __('results.packet_loss') }}
127+
</x-slot>
128+
129+
<p class="flex items-baseline gap-x-2">
130+
<span class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ $this->latestResult?->packet_loss }}</span>
131+
<span class="text-sm text-zinc-600 dark:text-zinc-400">%</span>
132+
</p>
133+
</x-filament::section>
151134
</div>
152135
@endfilled
153-
</div>
136+
</div>

resources/views/livewire/platform-stats.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<x-filament::section class="col-span-1">
5353
<x-slot name="heading">
54-
Total successful tests
54+
Total completed tests
5555
</x-slot>
5656

5757
<p class="text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100">{{ $this->platformStats['completed'] }}</p>

0 commit comments

Comments
 (0)