fix(oci): services show their address instead of a web link, and applications are not asked for their own

This commit is contained in:
MacRimi
2026-10-11 15:57:05 +02:00
parent 873a3cd8e2
commit 69b76116fd
27 changed files with 407 additions and 18 deletions
+16
View File
@@ -269,6 +269,9 @@ interface OciInstance {
port: number | null
path: string | null
website: string | null
// The ports of an application with no web address: a service that is
// reached on them and has no page to open.
service_ports?: { port: number; protocol: string }[] | null
}
interface Suggestions {
@@ -2904,6 +2907,19 @@ export function LxcAppPanel({ vmid, ctIp, onChange, managed, initialData, oci }:
</div>
)}
{/* A service has no page to open: its address is shown as
text, on the ports of its container. */}
{!app.ports?.length && app.installed_via === "oci_image" && !!ctIp && ctIp !== "DHCP"
&& !!suggestions?.oci_instance?.service_ports?.length && (
<div className="mb-3 flex flex-col gap-1">
{suggestions.oci_instance.service_ports.map((p) => (
<span key={`${p.port}/${p.protocol}`} className="font-mono text-sm text-foreground">
{ctIp.split("/")[0]}:{p.port}{p.protocol === "udp" ? "/udp" : ""}
</span>
))}
</div>
)}
{/* Footer with per-card actions — only rendered in the
global edit mode (toggled from the "Edit" button next
to Add another application). View mode keeps cards