diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6140e1304..16d22acab 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,8 @@ onlyBuiltDependencies: - '@tailwindcss/oxide' + - core-js-pure - dprint - esbuild - harperdb - lmdb + - reo-census diff --git a/src/features/cluster/Instances.tsx b/src/features/cluster/Instances.tsx index 9d588c41a..228b61ee4 100644 --- a/src/features/cluster/Instances.tsx +++ b/src/features/cluster/Instances.tsx @@ -10,7 +10,6 @@ import { Instance } from '@/integrations/api/api.patch'; import { clusterIsSelfManaged } from '@/integrations/api/clusterIsSelfManaged'; import { excludeFalsy } from '@/lib/arrays/excludeFalsy'; import { byInstanceFqdnThenPort } from '@/lib/arrays/sort/byInstanceFqdnThenPort'; -import { humanFileSize } from '@/lib/humanFileSize'; import { capitalizeWords } from '@/lib/string/capitalizeWords'; import { useQuery } from '@tanstack/react-query'; import { useParams } from '@tanstack/react-router'; @@ -80,7 +79,17 @@ export function Instances() { header: 'Storage', cell: (cell) => { const value = cell.getValue() as number; - return humanFileSize(value, Math.pow(1024, 3)); + return `${value} GB`; // This is already in GB + }, + }, + !isSelfManaged && { + accessorKey: 'usedStorageGb', + size: 1, + minSize: 1, + header: 'Used Storage GB', + cell: (cell) => { + const value = cell.getValue(); + return value === undefined ? '-' : `${value} GB`; }, }, !isSelfManaged && { @@ -99,7 +108,7 @@ export function Instances() { header: 'Memory', cell: (cell) => { const value = cell.getValue() as number; - return humanFileSize(value, Math.pow(1024, 2)); + return `${value / 1024} GB`; // The value is in MiB since that's how memory is sold, but alwayas says MB or GB instead of MiB or GiB }, }, ] satisfies Array | false>).filter(excludeFalsy),