Update Helpers.php

This commit is contained in:
Squidly271
2023-03-04 13:32:26 -05:00
committed by GitHub
parent 2264954040
commit 7b51e00a65

View File

@@ -495,6 +495,8 @@ function setXmlVal(&$xml, $value, $el, $attr=null, $pos=0) {
function getAllocations() {
global $DockerClient, $host;
$ports = [];
foreach ($DockerClient->getDockerContainers() as $ct) {
$list = $port = [];
$nat = $ip = false;
@@ -509,7 +511,7 @@ function getAllocations() {
$list['Port'] = "<span class='net'>{$ct['NetworkMode']}</span><span class='ip'>$ip</span>".(implode(', ',array_unique($port)) ?: '???');
$ports[] = $list;
}
return $ports ?? [];
return $ports;
}
function getCurlHandle($url, $method='GET') {