added doku for installatin in README
This commit is contained in:
@@ -19,14 +19,23 @@ $containers=json_decode(join($res), true);
|
||||
foreach ($containers as $c) {
|
||||
$name = preg_replace(',^/,', '', $c['Name']);
|
||||
$ports = "<ul>";
|
||||
if ($c['NetworkSettings']['Ports'])
|
||||
if ($c['NetworkSettings']['Ports']) {
|
||||
foreach ($c['NetworkSettings']['Ports'] as $from => $to) {
|
||||
if ($to)
|
||||
foreach ($to as $p) {
|
||||
if (isset($p['HostPort']))
|
||||
$ports.="<li>-p ".($p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'</li>';
|
||||
$ports.="<li>-p ".($p['HostIp']&&$p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'</li>';
|
||||
}
|
||||
}
|
||||
} elseif ($c['HostConfig']['PortBindings']) {
|
||||
foreach ($c['HostConfig']['PortBindings'] as $from => $to) {
|
||||
if ($to)
|
||||
foreach ($to as $p) {
|
||||
if (isset($p['HostPort']))
|
||||
$ports.="<li>-p ".($p['HostIp']&&$p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$ports .= "</ul>";
|
||||
$volumes = "?";
|
||||
$links = "<ul>";
|
||||
|
@@ -10,7 +10,7 @@ echo "</thead><tbody>";
|
||||
foreach ($containers as $c) {
|
||||
$name = preg_replace(',^/,', '', $c['Name']);
|
||||
$ports = "<ul>";
|
||||
if ($c['NetworkSettings']['Ports'])
|
||||
if ($c['NetworkSettings']['Ports']) {
|
||||
foreach ($c['NetworkSettings']['Ports'] as $from => $to) {
|
||||
if ($to)
|
||||
foreach ($to as $p) {
|
||||
@@ -18,6 +18,15 @@ foreach ($containers as $c) {
|
||||
$ports.="<li>".($p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'</li>';
|
||||
}
|
||||
}
|
||||
} elseif ($c['HostConfig']['PortBindings']) {
|
||||
foreach ($c['HostConfig']['PortBindings'] as $from => $to) {
|
||||
if ($to)
|
||||
foreach ($to as $p) {
|
||||
if (isset($p['HostPort']))
|
||||
$ports.="<li>".($p['HostIp']&&$p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$ports .= "</ul>";
|
||||
$links = "<ul>";
|
||||
if ($c['HostConfig']['Links'])
|
||||
@@ -29,7 +38,7 @@ foreach ($containers as $c) {
|
||||
elseif ($c['State']['Restarting']) {$status = "restarted"; $actions=Array();}
|
||||
elseif ($c['State']['Paused']) {$status = "paused"; $actions=Array("unpause", "rm");}
|
||||
elseif ($c['State']['Running']) {$status = "running"; $actions=Array("pause", "stop");}
|
||||
else {$status="dead"; $actions=Array("start", "remove");}
|
||||
else {$status="dead"; $actions=Array("start", "rm");}
|
||||
$action="";
|
||||
foreach($actions as $a)
|
||||
$action.='<a class="toolbutton" href="javascript:action('."'".$c['Id']."', '".$a."'".');">'.$a.'</a>';
|
||||
|
@@ -17,7 +17,7 @@ if ($ret==0) {
|
||||
foreach ($containers as $c) {
|
||||
$name = preg_replace(',^/,', '', $c['Name']);
|
||||
$ports = null;
|
||||
if ($c['NetworkSettings']['Ports'])
|
||||
if ($c['NetworkSettings']['Ports']) {
|
||||
foreach ($c['NetworkSettings']['Ports'] as $ps) {
|
||||
if (isset($ps))
|
||||
foreach ($ps as $p) {
|
||||
@@ -26,6 +26,16 @@ if ($ret==0) {
|
||||
else $ports = $p['HostPort'];
|
||||
}
|
||||
}
|
||||
} elseif ($c['HostConfig']['PortBindings']) {
|
||||
foreach ($c['HostConfig']['PortBindings'] as $ps) {
|
||||
if (isset($ps))
|
||||
foreach ($ps as $p) {
|
||||
if (isset($p['HostPort']))
|
||||
if (isset($ports)) $ports .= ", ".$p['HostPort'];
|
||||
else $ports = $p['HostPort'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$attrs=$name.'\\n'.$c['Config']['Image'].'",URL="javascript:details('."'".$c['Id']."'".')",style=filled';
|
||||
if (isset($ports)) $attrs = $ports.'\\n'.$attrs.',peripheries=2';
|
||||
if ($c['State']['Dead']) $attrs.=',fillcolor=red';
|
||||
|
@@ -18,7 +18,7 @@ div {
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ table.docker li+li {
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0 1em 0 1em;
|
||||
background-color: green;
|
||||
background-color: blue;
|
||||
color: white;
|
||||
}
|
||||
#header #togglemenu {
|
||||
|
Reference in New Issue
Block a user