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:
@@ -154,7 +154,7 @@ export function IngressProxyComponent() {
|
|||||||
) : services.length > 0 ? (
|
) : services.length > 0 ? (
|
||||||
<div className="border rounded-lg divide-y text-sm">
|
<div className="border rounded-lg divide-y text-sm">
|
||||||
{services.map(s => (
|
{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 justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{s.reach === 'public' ? (
|
{s.reach === 'public' ? (
|
||||||
@@ -162,8 +162,10 @@ export function IngressProxyComponent() {
|
|||||||
) : (
|
) : (
|
||||||
<Server className="h-3.5 w-3.5 text-green-500 shrink-0" />
|
<Server className="h-3.5 w-3.5 text-green-500 shrink-0" />
|
||||||
)}
|
)}
|
||||||
<span className="font-medium">{s.name}</span>
|
<span className="font-mono font-medium">{s.domain}</span>
|
||||||
<span className="font-mono text-xs text-muted-foreground">{s.domain}</span>
|
{s.subdomains && (
|
||||||
|
<Badge variant="outline" className="text-xs h-4 px-1">*.{s.domain}</Badge>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<span className="font-mono text-xs text-muted-foreground">{s.backend.address}</span>
|
<span className="font-mono text-xs text-muted-foreground">{s.backend.address}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -168,8 +168,7 @@ export function CertificatesPage() {
|
|||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<div className="font-mono text-sm truncate">{entry.domain}</div>
|
<div className="font-mono text-sm truncate">{entry.domain}</div>
|
||||||
<div className="flex items-center gap-2 mt-0.5">
|
<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>
|
</div>
|
||||||
<div className="flex items-center gap-2 shrink-0 ml-4">
|
<div className="flex items-center gap-2 shrink-0 ml-4">
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ export interface CertInfo {
|
|||||||
|
|
||||||
export interface CertEntry {
|
export interface CertEntry {
|
||||||
domain: string;
|
domain: string;
|
||||||
service: string;
|
|
||||||
source: string;
|
source: string;
|
||||||
cert: CertInfo;
|
cert: CertInfo;
|
||||||
coveredBy?: string;
|
coveredBy?: string;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { apiClient } from './client';
|
|||||||
// Services
|
// Services
|
||||||
|
|
||||||
export interface RegisteredService {
|
export interface RegisteredService {
|
||||||
name: string;
|
|
||||||
source: string;
|
|
||||||
domain: string;
|
domain: string;
|
||||||
|
source: string;
|
||||||
|
subdomains: boolean;
|
||||||
backend: {
|
backend: {
|
||||||
address: string;
|
address: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -24,10 +24,8 @@ export const servicesApi = {
|
|||||||
// HAProxy
|
// HAProxy
|
||||||
|
|
||||||
export interface HaproxyInstanceRoute {
|
export interface HaproxyInstanceRoute {
|
||||||
name: string;
|
|
||||||
domain: string;
|
domain: string;
|
||||||
backendIP: string;
|
backendIP: string;
|
||||||
extraDomains?: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HaproxyStatus {
|
export interface HaproxyStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user