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:
parent
c76239b1d4
commit
d3f22f06bf
1 changed files with 12 additions and 2 deletions
|
|
@ -1281,7 +1281,12 @@ const DockerContainerRow: Component<{
|
||||||
{(column) => (
|
{(column) => (
|
||||||
<td
|
<td
|
||||||
class="py-0.5 align-middle whitespace-nowrap"
|
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)}
|
{renderCell(column)}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -1986,7 +1991,12 @@ const DockerServiceRow: Component<{
|
||||||
{(column) => (
|
{(column) => (
|
||||||
<td
|
<td
|
||||||
class="py-0.5 align-middle whitespace-nowrap"
|
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)}
|
{renderCell(column)}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue