feat(containers-dashboard): port mappings van containers pods verplaatst naar pod header row
This commit is contained in:
+14
-3
@@ -658,8 +658,11 @@
|
||||
const podName = c.PodName || '-';
|
||||
const image = c.Image || c.image || '';
|
||||
const managed = c._dashboard_source || 'podman';
|
||||
const ports = (c._dashboard_published_ports || []).join(", ")
|
||||
|| (c.Ports || []).map(p => `${p.host_port}:${p.container_port}`).join(", ");
|
||||
const inPod = !!(c.PodName && String(c.PodName).trim());
|
||||
const ports = inPod
|
||||
? '' // verberg bij pod-containers
|
||||
: ((c._dashboard_published_ports || []).join(", ")
|
||||
|| (c.Ports || []).map(p => `${p.host_port}:${p.container_port}`).join(", "));
|
||||
|
||||
return `
|
||||
<tr>
|
||||
@@ -720,6 +723,14 @@
|
||||
const isRealPod = (pod !== '(geen pod)');
|
||||
const total = items.length;
|
||||
|
||||
let podPortsText = "-";
|
||||
if (isRealPod) {
|
||||
const podPorts = Array.from(new Set(
|
||||
items.flatMap(c => (c._dashboard_published_ports || []))
|
||||
)).sort((a, b) => _cmpStr(a, b));
|
||||
podPortsText = podPorts.length ? podPorts.join(", ") : "-";
|
||||
}
|
||||
|
||||
let cls = 'muted';
|
||||
let label = '-';
|
||||
|
||||
@@ -759,7 +770,7 @@
|
||||
<td>${isRealPod ? '<span class="btn small muted">pod</span>' : '<span class="muted">-</span>'}</td>
|
||||
<td class="muted num">-</td>
|
||||
<td class="muted num">-</td>
|
||||
<td class="muted">-</td>
|
||||
<td class="mono">${esc(podPortsText)}</td>
|
||||
<td>
|
||||
${isRealPod ? `
|
||||
<div class="flex">
|
||||
|
||||
Reference in New Issue
Block a user