Apply suggestions from code review

Co-authored-by: FunkeCoder23 <12570656+FunkeCoder23@users.noreply.github.com>
This commit is contained in:
Matt
2024-04-06 13:04:22 +13:00
committed by GitHub
parent 083cd984ea
commit 4a4444229e
2 changed files with 6 additions and 3 deletions

View File

@@ -93,7 +93,9 @@ foreach ($containers as $ct) {
}
$ports = [];
foreach ($ct['Ports'] as $port) {
$ports[] = sprintf('%s:%s<i class="fa fa-arrows-h" style="margin:0 6px"></i>%s', _var($port,'PrivatePort'), strtoupper(_var($port,'Type')), _var($port,'PublicPort'));
$arrow_style = _var($port,'PublicPort') ? "\"fa fa-arrows-h\"" : "";
$ports[] = sprintf('%s:%s<i class=%s style="margin:0 6px"></i>%s', _var($port,'PrivatePort'), strtoupper(_var($port,'Type')),$arrow_style , _var($port,'PublicPort'));
}
$paths = [];
$ct['Volumes'] = is_array($ct['Volumes']) ? $ct['Volumes'] : [];