mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
fix(oci): services show their address instead of a web link, and applications are not asked for their own
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user