mirror of
https://github.com/unraid/webgui.git
synced 2026-03-14 06:51:27 -05:00
Fixes and improvements for Docker
- fixed deletion of orphan images - inline list update when removing container or image - fixed list updating after execution error - added animation when removing container or image - delete old xml file when container is renamed - fixed IP assignment with multiple containers based on the same image
This commit is contained in:
@@ -113,15 +113,16 @@ foreach ($all_containers as $ct) {
|
||||
}
|
||||
foreach ($DockerClient->getDockerImages() as $image) {
|
||||
if (count($image['usedBy'])) continue;
|
||||
$menu[] = sprintf("addDockerImageContext('%s','%s');",$image['Id'],implode(', ',$image['Tags']));
|
||||
$id = $image['Id'];
|
||||
$menu[] = sprintf("addDockerImageContext('%s','%s');",$id,implode(',',$image['Tags']));
|
||||
echo "<tr class='advanced'><td style='width:48px;padding:4px'>";
|
||||
echo "<div id='context-{$image['Id']}' style='display:block;cursor:pointer'>";
|
||||
echo "<div id='$id' style='display:block;cursor:pointer'>";
|
||||
echo "<div style='position:relative;width:48px;height:48px;margin:0 auto'>";
|
||||
echo "<img src='/webGui/images/disk.png' style='position:absolute;opacity:0.3;top:0;bottom:0;left:0;right:0;width:48px;height:48px'>";
|
||||
echo "</div></div></td>";
|
||||
echo "<td data-sort-value='ZZZZZZZZZZZ'><i>(orphan image)</i><div style='width:160px;'>Image ID: ".htmlspecialchars($image['Id'])."</div>";
|
||||
if (strpos(implode($image['Tags']),"<none>:<none>")===false) echo "<div style='width:'160px'>".implode('<br>',array_map('htmlspecialchars',$image['Tags']))."</div>";
|
||||
echo "</td><td> </td><td> </td><td> </td><td> </td>";
|
||||
echo "<td><i>(orphan image)</i><div style='width:160px;'>Image ID: $id</div>";
|
||||
echo "<div style='width:160px'>".implode('<br>',array_map('htmlspecialchars',$image['Tags']))."</div></td>";
|
||||
echo "<td colspan=4'> </td>";
|
||||
echo "<td><div class='advanced' style='width:124px'>Created ".htmlspecialchars($image['Created'])."</div></td></tr>";
|
||||
}
|
||||
echo "\0".implode($menu).implode($docker);
|
||||
|
||||
Reference in New Issue
Block a user