feat: Update web UI for domain-keyed service model

- RegisteredService: removed name, added subdomains bool
- CertEntry: removed service field (domain is the key)
- Ingress page: domain as primary label, subdomains badge
- Certificates page: source shown under domain
- All type-check passes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:39:38 +00:00
parent 9de2311357
commit 56b7dd800d
4 changed files with 8 additions and 10 deletions

View File

@@ -154,7 +154,7 @@ export function IngressProxyComponent() {
) : services.length > 0 ? (
<div className="border rounded-lg divide-y text-sm">
{services.map(s => (
<div key={s.name} className="px-3 py-2">
<div key={s.domain} className="px-3 py-2">
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
{s.reach === 'public' ? (
@@ -162,8 +162,10 @@ export function IngressProxyComponent() {
) : (
<Server className="h-3.5 w-3.5 text-green-500 shrink-0" />
)}
<span className="font-medium">{s.name}</span>
<span className="font-mono text-xs text-muted-foreground">{s.domain}</span>
<span className="font-mono font-medium">{s.domain}</span>
{s.subdomains && (
<Badge variant="outline" className="text-xs h-4 px-1">*.{s.domain}</Badge>
)}
</div>
<span className="font-mono text-xs text-muted-foreground">{s.backend.address}</span>
</div>

View File

@@ -168,8 +168,7 @@ export function CertificatesPage() {
<div className="min-w-0">
<div className="font-mono text-sm truncate">{entry.domain}</div>
<div className="flex items-center gap-2 mt-0.5">
<span className="text-xs text-muted-foreground">{entry.service}</span>
<span className="text-xs text-muted-foreground">({entry.source})</span>
<span className="text-xs text-muted-foreground">{entry.source}</span>
</div>
</div>
<div className="flex items-center gap-2 shrink-0 ml-4">

View File

@@ -12,7 +12,6 @@ export interface CertInfo {
export interface CertEntry {
domain: string;
service: string;
source: string;
cert: CertInfo;
coveredBy?: string;

View File

@@ -3,9 +3,9 @@ import { apiClient } from './client';
// Services
export interface RegisteredService {
name: string;
source: string;
domain: string;
source: string;
subdomains: boolean;
backend: {
address: string;
type: string;
@@ -24,10 +24,8 @@ export const servicesApi = {
// HAProxy
export interface HaproxyInstanceRoute {
name: string;
domain: string;
backendIP: string;
extraDomains?: string[];
}
export interface HaproxyStatus {