fix: Truncate very long container names in Docker table

Add max-width constraint to the resource column in the Docker table to
ensure very long container names (like Kubernetes UUID-based names) are
properly truncated instead of extending the table width.

Related to #789
This commit is contained in:
rcourtman 2025-12-03 14:09:16 +00:00
parent c76239b1d4
commit d3f22f06bf

View file

@ -1281,7 +1281,12 @@ const DockerContainerRow: Component<{
{(column) => (
<td
class="py-0.5 align-middle whitespace-nowrap"
style={{ "min-width": column.id === 'cpu' || column.id === 'memory' ? '140px' : undefined }}
style={{
"min-width": column.id === 'cpu' || column.id === 'memory' ? '140px' : undefined,
// Force resource column to respect truncation for very long names (issue #789)
"max-width": column.id === 'resource' ? '0' : undefined,
"width": column.id === 'resource' ? '40%' : undefined,
}}
>
{renderCell(column)}
</td>
@ -1986,7 +1991,12 @@ const DockerServiceRow: Component<{
{(column) => (
<td
class="py-0.5 align-middle whitespace-nowrap"
style={{ "min-width": column.id === 'cpu' || column.id === 'memory' ? '140px' : undefined }}
style={{
"min-width": column.id === 'cpu' || column.id === 'memory' ? '140px' : undefined,
// Force resource column to respect truncation for very long names (issue #789)
"max-width": column.id === 'resource' ? '0' : undefined,
"width": column.id === 'resource' ? '40%' : undefined,
}}
>
{renderCell(column)}
</td>