diff --git a/frontend-modern/src/components/Docker/DockerUnifiedTable.tsx b/frontend-modern/src/components/Docker/DockerUnifiedTable.tsx index edcdd4ccb..15694f791 100644 --- a/frontend-modern/src/components/Docker/DockerUnifiedTable.tsx +++ b/frontend-modern/src/components/Docker/DockerUnifiedTable.tsx @@ -42,6 +42,15 @@ const typeBadgeClass = (type: 'container' | 'service' | 'task' | 'unknown') => { } }; +// Extract just the image name + tag from a full image path +// e.g., "ghcr.io/org/image-name:tag" → "image-name:tag" +const getShortImageName = (fullImage: string | undefined): string => { + if (!fullImage) return '—'; + // Get everything after the last slash + const lastSlash = fullImage.lastIndexOf('/'); + return lastSlash >= 0 ? fullImage.slice(lastSlash + 1) : fullImage; +}; + type StatsFilter = | { type: 'host-status'; value: string } | { type: 'container-state'; value: string } @@ -130,9 +139,9 @@ interface DockerColumnDef extends ColumnConfig { // - supplementary: Visible on large screens and up (lg: 1024px+) // - detailed: Visible on extra large screens and up (xl: 1280px+) export const DOCKER_COLUMNS: DockerColumnDef[] = [ - { id: 'resource', label: 'Resource', priority: 'essential', minWidth: 'auto', flex: 1, sortKey: 'resource', width: '15%' }, + { id: 'resource', label: 'Resource', priority: 'essential', minWidth: 'auto', flex: 1, sortKey: 'resource', width: '18%' }, { id: 'type', label: 'Type', priority: 'essential', minWidth: 'auto', maxWidth: 'auto', sortKey: 'type', width: '70px' }, - { id: 'image', label: 'Image / Stack', priority: 'essential', minWidth: '80px', maxWidth: '200px', sortKey: 'image', width: '15%' }, + { id: 'image', label: 'Image / Stack', priority: 'essential', minWidth: '80px', maxWidth: '200px', sortKey: 'image', width: '12%' }, { id: 'status', label: 'Status', priority: 'essential', minWidth: 'auto', maxWidth: 'auto', sortKey: 'status', width: '90px' }, // Metric columns - need fixed width to match progress bar max-width (140px + padding) // Note: Disk column removed - Docker API rarely provides this data @@ -1211,15 +1220,15 @@ const DockerContainerRow: Component<{