fix: add orphaned status for containers with invalid stats (#4441)

- Add 'orphaned' container state to handle containers with null/undefined cpu_stats.online_cpus
- Display orphaned containers with gray badge in UI
- Prevent 'Cannot read properties of undefined (reading online_cpus)' error
- Add translations for 'orphaned' status in all supported languages
- Containers with invalid stats are now marked as orphaned instead of causing errors
This commit is contained in:
Derek Mäekask
2025-12-28 15:13:12 +02:00
committed by GitHub
parent 7712ab410b
commit f04f53759b
2 changed files with 48 additions and 20 deletions

View File

@@ -76,6 +76,7 @@ const createColumns = (
accessorKey: "ports",
header: t("docker.field.ports.label"),
Cell({ cell }) {
if (!cell.row.original.ports.length) return null;
return (
<OverflowBadge overflowCount={1} data={cell.row.original.ports.map((port) => port.PrivatePort.toString())} />
);