fix(ui): открыть крайние колонки сводной статистики

This commit is contained in:
Denozordec committed 2026-10-04 04:11:53 +07:00
1 parent 8d6d82082c
commit 488f2fe482
9 files changed
+100 -6

No files matched your search

@@ -47,20 +47,24 @@ export function StatisticsPivotGrid({
accessorKey: `c:${col.id}` as const,
cell: (row: PivotGridRow) => {
const value = Number(row[`c:${col.id}`] ?? 0)
const label = data.metric === "packets" ? value.toLocaleString("ru-RU") : formatBytes(value)
if (col.id === "__other__" || row.id === "__other__") {
return <span className="tabular-nums text-muted-foreground">{label}</span>
}
return (
<button
type="button"
aria-label={`${row.label}, ${col.label}: ${label}. Показать срез`}
className={cn(
"tabular-nums text-left hover:underline",
col.id === "__other__" || row.id === "__other__" ? "text-muted-foreground" : "",
)}
onClick={(e) => {
e.stopPropagation()
if (row.id === "__other__" || col.id === "__other__") return
onCellClick?.(row.id, col.id)
}}
>
{data.metric === "packets" ? value.toLocaleString("ru-RU") : formatBytes(value)}
{label}
</button>
)
},
@@ -80,6 +84,7 @@ export function StatisticsPivotGrid({
return (
<CompactDataGrid
data={rows}
horizontalScroll
columns={columns}
isLoading={isLoading}
emptyTitle="Нет данных сводной"