From 3d8db53e5216179aeaee5679776877ee61786d36 Mon Sep 17 00:00:00 2001 From: henrygd Date: Sat, 31 Jan 2026 15:01:35 -0500 Subject: [PATCH] fix container uptime sorting edge case (#1696) --- .../components/containers-table/containers-table-columns.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/site/src/components/containers-table/containers-table-columns.tsx b/internal/site/src/components/containers-table/containers-table-columns.tsx index 80d70ccb..a356b02c 100644 --- a/internal/site/src/components/containers-table/containers-table-columns.tsx +++ b/internal/site/src/components/containers-table/containers-table-columns.tsx @@ -31,7 +31,8 @@ const unitSeconds = [ // Convert docker status string to number of seconds ("Up X minutes", "Up X hours", etc.) function getStatusValue(status: string): number { const [_, num, unit] = status.split(" ") - const numValue = Number(num) + // Docker uses "a" or "an" instead of "1" for singular units (e.g., "Up a minute", "Up an hour") + const numValue = num === "a" || num === "an" ? 1 : Number(num) for (const [unitName, value] of unitSeconds) { if (unit.startsWith(unitName)) { return numValue * value