Dashboard UI: subdomain checkbox, drop proxy path/host

Follow the backend to the subdomain-only model:
- Service editor + create form: replace the Proxy path / Proxy host text fields
  with a single "Expose" checkbox (writes proxy: { caddy: {} } or removes proxy).
- ServiceSummary/DeploymentSummary type: proxy_path/proxy_host → subdomain.
- ServiceCard / ServiceDetail: show the subdomain, linking to
  <subdomain>.<domain> via a new subdomainUrl() helper (domain derived from the
  dashboard's own host; null on a bare host / off mode).
This commit is contained in:
2026-06-30 20:55:38 -07:00
parent 43ef1cc588
commit 15dc8ef6f7
6 changed files with 54 additions and 60 deletions

View File

@@ -2,7 +2,7 @@ import { ExternalLink, Play, RefreshCw, Server, Square, Terminal } from "lucide-
import { Link } from "react-router-dom"
import type { ServiceSummary, HealthStatus } from "@/types"
import { useServiceAction } from "@/services/api/hooks"
import { runnerLabel } from "@/lib/labels"
import { runnerLabel, subdomainUrl } from "@/lib/labels"
import { HealthBadge } from "./HealthBadge"
import { StackBadge } from "./StackBadge"
@@ -58,13 +58,13 @@ export function ServiceCard({ service, health }: ServiceCardProps) {
{runnerLabel(service.runner)}
</span>
)}
{service.proxy_path && (
{service.subdomain && (
<a
href={service.proxy_path + "/"}
href={subdomainUrl(service.subdomain) ?? undefined}
className="flex items-center gap-1 text-[var(--primary)] hover:underline"
>
<ExternalLink size={12} />
{service.proxy_path}
{service.subdomain}
</a>
)}
{service.port && (