Skip to content

Docker: orphan image row is 2 columns short — "Created" renders under "CPU & Memory load" instead of "Uptime" #2694

Description

@chodeus

Problem

On the Docker tab in Advanced view, an orphan image row renders its "Created ..." date under the CPU & Memory load column instead of Uptime, and the row's background stops at the Autostart column boundary instead of spanning the table.

Cause

emhttp/plugins/dynamix.docker.manager/DockerContainers.page declares a 10-column thead (the <td colspan='10'> placeholder in #docker_list corroborates this):

# Column
1 Application
2 Version
3 Network
4 Container IP / MAC
5 Container Port
6 LAN IP:Port
7 Volume Mappings
8 CPU & Memory load (th.load.advanced)
9 Autostart (th.nine)
10 Uptime (th.five)

emhttp/plugins/dynamix.docker.manager/include/DockerContainers.php (L306-310) emits the orphan row as only three cells:

echo "<tr class='advanced'><td style='width:220px;padding:8px'>";
echo "<span class='outer apps'>...(orphan image)...stopped...</span>";
echo "</td><td colspan='6'>"._('Image ID').": $id<br>";
echo implode(', ',$image['Tags']);
echo "</td><td>"._('Created')." ".htmlspecialchars(_($image['Created'],0))."</td></tr>";

Which maps to:

col 1     td #1              icon + "(orphan image)"
cols 2-7  td #2 colspan='6'  "Image ID: ..." + tags
col 8     td #3              "Created ..."   <-- lands under CPU & Memory load
col 9     (no cell)          Autostart
col 10    (no cell)          Uptime

1 + 6 + 1 = 8 of 10. Columns 9 and 10 receive no cell, which is also why the row background terminates exactly where Autostart begins — a short row has no box to paint in the missing slots. Container rows, by comparison, emit all 10 cells.

Measured on a live 7.3.2 box: the Created cell occupies x 1426→1592, byte-identical to the CPU & Memory load header's range; the Uptime header sits at 1692.

Regression history

This is not long-standing behaviour — colspan='6' used to be correct:

  • b5f2e9da9 (2023-03-25, "Fix table layout for orphan images") set colspan='5''6'. The thead then had 8 columns (Application, Version, Network, Port Mappings, Volume Mappings, CPU & Memory load, Autostart, Uptime), so 1+6+1 = 8 fit exactly and "Created" correctly landed in the last column, Uptime.
  • 8cabad6f0 (2024-08-08) split Port Mappings into Container IP / Container Port / LAN IP:Port, taking the thead from 8 → 10. The orphan row's colspan='6' was not updated, so "Created" stayed in column 8 — which is now CPU & Memory load.

The colspan bookkeeping in this file has drifted before: the #docker_list placeholder row went 8 → 9 → 10 across the same period, while the orphan row was missed in each pass.

Suggested fix

Widen the Image ID cell by the two added columns, restoring the row to a full 10 slots and matching the pre-split shape (where the colspan also covered through Autostart):

-  echo "</td><td colspan='6'>"._('Image ID').": $id<br>";
+  echo "</td><td colspan='8'>"._('Image ID').": $id<br>";

1 + 8 + 1 = 10 → "Created" returns to column 10 (Uptime) and the row background spans the full width.

Reproduction

  1. Have at least one orphan image (a (orphan image) row on the Docker tab).
  2. Switch the Docker tab to Advanced view — orphan rows are tr.advanced, hidden in Basic view.
  3. Observe "Created ..." under CPU & Memory load, and the row ending at the Autostart boundary.

Reproduces on stock Unraid with no plugins installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions