From 299bf065918096134c253f0d6be56c6c943435ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 20 Nov 2015 15:14:56 +0000 Subject: [PATCH] better image overview --- html/images.php | 20 +++++++++++++++++--- html/servicedock.css | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/html/images.php b/html/images.php index 10035ac..4ac9829 100644 --- a/html/images.php +++ b/html/images.php @@ -19,13 +19,27 @@ if ($ret==0) { if (isset($i['RepoTags']) && count($i['RepoTags'])>0) { $name = join("\\n", $i['RepoTags']); if (isset($i['Author']) && $i['Author']!="") $name .= '\\n['.$i['Author'].']'; + echo ' "'.$i['Id'].'" [label="'.$name.'"];'."\n"; } - echo ' "'.$i['Id'].'" [label="'.$name.'"];'."\n"; } foreach ($images as $i) { - if (isset($i['Parent']) && $i['Parent']!="") - echo ' "'.$i['Parent'].'" -> "'.$i['Id'].'";'."\n"; + if (isset($i['RepoTags']) && count($i['RepoTags'])>0) { + for ($p = $i['Parent']; isset($p) && $p!="";) { + $next = null; + foreach ($images as $i2) + if ($i2['Id'] == $p) { + $next = $i2; + break; + } + if (!$next) break; + $p = $next['Parent']; + if (isset($next['RepoTags']) && count($next['RepoTags'])>0) { + echo ' "'.$next['Id'].'" -> "'.$i['Id'].'";'."\n"; + break; + } + } + } } echo "}"; diff --git a/html/servicedock.css b/html/servicedock.css index da00fdc..cf6dbfc 100644 --- a/html/servicedock.css +++ b/html/servicedock.css @@ -19,6 +19,8 @@ div { svg { max-width: 100%; + max-height: 100%; + width: auto; height: auto; }