diff --git a/beszel/site/src/components/systems-table/systems-table.tsx b/beszel/site/src/components/systems-table/systems-table.tsx index 7364c03..2caeabd 100644 --- a/beszel/site/src/components/systems-table/systems-table.tsx +++ b/beszel/site/src/components/systems-table/systems-table.tsx @@ -88,10 +88,10 @@ import { Dialog } from "../ui/dialog" type ViewMode = "table" | "grid" function CellFormatter(info: CellContext) { - const val = (info.getValue() as number) || 0 + const val = Number(info.getValue()) || 0 return (
- {decimalString(val, 1)}% + {decimalString(val, val >= 10 ? 1 : 2)}% decimalString(info.cpu, info.cpu >= 10 ? 1 : 2), + accessorFn: ({ info }) => info.cpu, id: "cpu", name: () => t`CPU`, cell: CellFormatter, @@ -198,7 +198,7 @@ export default function SystemsTable() { }, { // accessorKey: "info.mp", - accessorFn: (originalRow) => originalRow.info.mp, + accessorFn: ({ info }) => info.mp, id: "memory", name: () => t`Memory`, cell: CellFormatter, @@ -206,7 +206,7 @@ export default function SystemsTable() { header: sortableHeader, }, { - accessorFn: (originalRow) => originalRow.info.dp, + accessorFn: ({ info }) => info.dp, id: "disk", name: () => t`Disk`, cell: CellFormatter, @@ -214,7 +214,7 @@ export default function SystemsTable() { header: sortableHeader, }, { - accessorFn: (originalRow) => originalRow.info.g, + accessorFn: ({ info }) => info.g, id: "gpu", name: () => "GPU", cell: CellFormatter, @@ -281,7 +281,7 @@ export default function SystemsTable() { }, }, { - accessorFn: (originalRow) => originalRow.info.dt, + accessorFn: ({ info }) => info.dt, id: "temp", name: () => t({ message: "Temp", comment: "Temperature label in systems table" }), size: 50, @@ -303,7 +303,7 @@ export default function SystemsTable() { }, }, { - accessorFn: (originalRow) => originalRow.info.v, + accessorFn: ({ info }) => info.v, id: "agent", name: () => t`Agent`, // invertSorting: true,