refactor: Remove routing summary — controls already communicate it
The backend field + Public toggle already tell you where traffic routes. Removed redundant "Routes to X on LAN, Y externally" line and unused ddns/publicIp/backendHost vars. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,6 @@ import {
|
||||
import { useHaproxy } from '../hooks/useHaproxy';
|
||||
import { useServices } from '../hooks/useServices';
|
||||
import { useCert } from '../hooks/useCert';
|
||||
import { useDdns } from '../hooks/useDdns';
|
||||
import { usePageHelp } from '../hooks/usePageHelp';
|
||||
import type { RegisteredService } from '../services/api/networking';
|
||||
import { servicesApi, haproxyApi } from '../services/api/networking';
|
||||
@@ -45,7 +44,7 @@ export function ServicesComponent() {
|
||||
} = useHaproxy();
|
||||
const { services, isLoading: isServicesLoading } = useServices();
|
||||
const { status: certStatus } = useCert();
|
||||
const { status: ddnsStatus } = useDdns();
|
||||
|
||||
|
||||
const [expandedDomains, setExpandedDomains] = useState<Set<string>>(new Set());
|
||||
const [showAddForm, setShowAddForm] = useState(false);
|
||||
@@ -63,7 +62,6 @@ export function ServicesComponent() {
|
||||
const certDomains = new Set<string>(
|
||||
(certStatus?.certs ?? []).filter(c => c.cert.exists).map(c => c.domain)
|
||||
);
|
||||
const publicIp = ddnsStatus?.currentIP;
|
||||
|
||||
const registerMutation = useMutation({
|
||||
mutationFn: (svc: Record<string, unknown>) => servicesApi.register(svc as any),
|
||||
@@ -200,7 +198,6 @@ export function ServicesComponent() {
|
||||
const tlsStatus = getTlsStatus(service, certDomains);
|
||||
const ddnsStatus2 = service.reach === 'public' ? 'ok' as const : 'na' as const;
|
||||
const isPassthrough = service.tls === 'passthrough' || service.backend.type === 'tcp-passthrough';
|
||||
const backendHost = service.backend.address.split(':')[0];
|
||||
|
||||
return (
|
||||
<Card key={service.domain}>
|
||||
@@ -277,12 +274,6 @@ export function ServicesComponent() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Routing summary */}
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Routes to <span className="font-mono text-foreground">{backendHost}</span> on LAN
|
||||
{service.reach === 'public' && <>, <span className="font-mono text-foreground">{publicIp ?? '—'}</span> externally</>}
|
||||
</p>
|
||||
|
||||
{/* Source + deregister */}
|
||||
<div className="flex items-center justify-between text-xs text-muted-foreground">
|
||||
<span>Source: {service.source}</span>
|
||||
|
||||
Reference in New Issue
Block a user