fix(domains): backend column showed (undefined:undefined) instead of scheme

BackendLite interfaces in Domains list and Detail declared address/port
fields that don't exist on the Backend model (those live on BackendServer).
Every backend tag rendered as "name (undefined:undefined)". Fixed by
replacing the phantom fields with scheme, so tags show e.g. "my-app (https)".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-27 21:12:06 +02:00
parent 36eea71c65
commit 22528a54a9
6 changed files with 9 additions and 10 deletions

View File

@@ -1 +1 @@
1.1.120 1.1.121

View File

@@ -60,7 +60,7 @@ import (
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users" usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
) )
var version = "1.1.120" var version = "1.1.121"
func main() { func main() {
addr := os.Getenv("EDGEGUARD_API_ADDR") addr := os.Getenv("EDGEGUARD_API_ADDR")

View File

@@ -11,7 +11,7 @@ import (
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup" "git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
) )
var version = "1.1.120" var version = "1.1.121"
const usage = `edgeguard-ctl — EdgeGuard CLI const usage = `edgeguard-ctl — EdgeGuard CLI

View File

@@ -41,7 +41,7 @@ import (
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts" "git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
) )
var version = "1.1.120" var version = "1.1.121"
const ( const (
// renewTickInterval — how often we re-evaluate expiring certs. // renewTickInterval — how often we re-evaluate expiring certs.

View File

@@ -56,7 +56,7 @@ interface RoutingRule {
backend_id: number; priority: number; active: boolean backend_id: number; priority: number; active: boolean
} }
interface BackendLiteWithAddr { id: number; name: string; address: string; port: number } interface BackendLiteWithAddr { id: number; name: string; scheme: string }
interface TLSCertLite { interface TLSCertLite {
domain: string domain: string
@@ -426,7 +426,7 @@ function RoutingRulesPanel({ domainID, domainName, isViewer }: { domainID: numbe
const backendLabel = (id: number) => { const backendLabel = (id: number) => {
const b = backends?.find(x => x.id === id) const b = backends?.find(x => x.id === id)
return b ? `${b.name} (${b.address}:${b.port})` : `#${id}` return b ? `${b.name} (${b.scheme})` : `#${id}`
} }
const columns: ColumnsType<RoutingRule> = [ const columns: ColumnsType<RoutingRule> = [
@@ -523,7 +523,7 @@ function RoutingRulesPanel({ domainID, domainName, isViewer }: { domainID: numbe
<Select <Select
showSearch optionFilterProp="label" showSearch optionFilterProp="label"
placeholder={t('routing.selectBackend')} placeholder={t('routing.selectBackend')}
options={(backends ?? []).map(b => ({ value: b.id, label: `${b.name} (${b.address}:${b.port})` }))} options={(backends ?? []).map(b => ({ value: b.id, label: `${b.name} (${b.scheme})` }))}
/> />
</Form.Item> </Form.Item>
<Form.Item label={t('routing.priority')} name="priority" rules={[{ required: true }]}> <Form.Item label={t('routing.priority')} name="priority" rules={[{ required: true }]}>

View File

@@ -62,8 +62,7 @@ async function listDomains(): Promise<Domain[]> {
interface BackendLite { interface BackendLite {
id: number id: number
name: string name: string
address: string scheme: string
port: number
active: boolean active: boolean
} }
async function listBackends(): Promise<BackendLite[]> { async function listBackends(): Promise<BackendLite[]> {
@@ -222,7 +221,7 @@ export default function DomainsPage() {
return ( return (
<Space size={4}> <Space size={4}>
{b {b
? <Tag color="blue">{b.name} ({b.address}:{b.port})</Tag> ? <Tag color="blue">{b.name} ({b.scheme})</Tag>
: <Tag color="orange">#{id}</Tag>} : <Tag color="orange">#{id}</Tag>}
{health === 'UP' && <Tag color="green" style={{ margin: 0 }}>UP</Tag>} {health === 'UP' && <Tag color="green" style={{ margin: 0 }}>UP</Tag>}
{health === 'DOWN' && <Tag color="red" style={{ margin: 0 }}>DOWN</Tag>} {health === 'DOWN' && <Tag color="red" style={{ margin: 0 }}>DOWN</Tag>}