fix: add column headers to analytics tables

This commit is contained in:
Andras Bacsai
2026-10-04 12:35:53 +02:00
parent 4c2253c2ad
commit 51c1a2ad4a
3 changed files with 28 additions and 3 deletions
+10 -1
View File
@@ -255,6 +255,13 @@ $appListboxOptions = array_merge(
@else
@php $maxAppRequests = max(1, (int) collect($topApps)->max('requests')); @endphp
<div x-data="{ page: 0, per: 10, total: {{ count($topApps) }} }">
<div class="flex items-center gap-3 border-b border-neutral-200 px-4 py-2 text-[11px] font-medium text-neutral-500 dark:border-white/[0.07] dark:text-fg-dim">
<span class="min-w-0 flex-1">Application / service</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Request volume relative to the busiest row in this list">Volume</span>
<span class="w-16 shrink-0 text-right">Requests</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Total response data sent">Bandwidth</span>
<span class="size-3.5 shrink-0" aria-hidden="true"></span>
</div>
@foreach ($topApps as $row)
@php
$appHref = $row['link'] ?? null;
@@ -279,7 +286,7 @@ $appListboxOptions = array_merge(
<div class="hidden h-1 w-16 shrink-0 overflow-hidden rounded-full bg-neutral-100 sm:block dark:bg-white/[0.06]">
<div class="h-full rounded-full bg-[var(--chart-status-3xx)]" style="width: {{ $appWidth }}%;"></div>
</div>
<span class="w-12 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
<span class="w-16 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
title="{{ number_format($row['requests']) }} requests">{{ compactNumber($row['requests']) }}</span>
<span class="hidden w-16 shrink-0 text-right text-[11px] tabular-nums text-neutral-400 sm:inline dark:text-fg-faint">{{ formatBytes($row['bandwidth']) }}</span>
@if ($appHref)
@@ -287,6 +294,8 @@ $appListboxOptions = array_merge(
fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
</svg>
@else
<span class="size-3.5 shrink-0" aria-hidden="true"></span>
@endif
</{{ $appHref ? 'a' : 'div' }}>
@endforeach
@@ -16,6 +16,12 @@
icon-name="unordered-list" />
@else
<div x-data="{ page: 0, per: 10, total: {{ count($hosts) }} }">
<div class="flex items-center gap-3 border-b border-neutral-200 px-4 py-2 text-[11px] font-medium text-neutral-500 dark:border-white/[0.07] dark:text-fg-dim">
<span class="min-w-0 flex-1">Host</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Request volume relative to the busiest row in this list">Volume</span>
<span class="w-16 shrink-0 text-right">Requests</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Total response data sent">Bandwidth</span>
</div>
@foreach ($hosts as $row)
@php
$host = (string) ($row['host'] ?? '');
@@ -35,7 +41,7 @@
<div class="hidden h-1 w-16 shrink-0 overflow-hidden rounded-full bg-neutral-100 sm:block dark:bg-white/[0.06]">
<div class="h-full rounded-full bg-[var(--chart-status-3xx)]" style="width: {{ $width }}%;"></div>
</div>
<span class="w-12 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
<span class="w-16 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
title="{{ number_format($requests) }} requests">{{ compactNumber($requests) }}</span>
<span class="hidden w-16 shrink-0 text-right text-[11px] tabular-nums text-neutral-400 sm:inline dark:text-fg-faint">{{ formatBytes((int) ($row['bandwidth'] ?? 0)) }}</span>
</div>
@@ -18,6 +18,16 @@
icon-name="unordered-list" />
@else
<div x-data="{ page: 0, per: 10, total: {{ count($paths) }} }">
<div class="flex items-center gap-3 border-b border-neutral-200 px-4 py-2 text-[11px] font-medium text-neutral-500 dark:border-white/[0.07] dark:text-fg-dim">
<span class="min-w-0 flex-1">Path</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Request volume relative to the busiest row in this list">Volume</span>
<span class="w-16 shrink-0 text-right">Requests</span>
<span class="hidden w-14 shrink-0 text-right sm:inline" title="HTTP 4xx client-error responses">4xx errors</span>
<span class="w-14 shrink-0 text-right" title="HTTP 5xx server-error responses">5xx errors</span>
<span class="hidden w-12 shrink-0 text-right lg:inline" title="Percentage of requests with a 4xx or 5xx response">Error %</span>
<span class="hidden w-16 shrink-0 text-right sm:inline" title="Total response data sent">Bandwidth</span>
<span class="hidden w-16 shrink-0 text-right md:inline" title="95% of requests completed within this response time">p95 latency</span>
</div>
@foreach ($paths as $path)
@php
$domain = $path['domain'] ?? null;
@@ -41,7 +51,7 @@
<div class="hidden h-1 w-16 shrink-0 overflow-hidden rounded-full bg-neutral-100 sm:block dark:bg-white/[0.06]">
<div class="h-full rounded-full bg-[var(--chart-status-3xx)]" style="width: {{ $width }}%;"></div>
</div>
<span class="w-12 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
<span class="w-16 shrink-0 text-right text-[12px] font-medium tabular-nums text-black dark:text-fg"
title="{{ number_format($requests) }} requests">{{ compactNumber($requests) }}</span>
<span class="hidden w-14 shrink-0 text-right text-[11px] font-medium tabular-nums text-pink-600 sm:inline dark:text-pink-400"
title="{{ number_format($s4xx) }} client-error responses">{{ compactNumber($s4xx) }} 4xx</span>