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:
@@ -56,7 +56,7 @@ interface RoutingRule {
|
||||
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 {
|
||||
domain: string
|
||||
@@ -426,7 +426,7 @@ function RoutingRulesPanel({ domainID, domainName, isViewer }: { domainID: numbe
|
||||
|
||||
const backendLabel = (id: number) => {
|
||||
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> = [
|
||||
@@ -523,7 +523,7 @@ function RoutingRulesPanel({ domainID, domainName, isViewer }: { domainID: numbe
|
||||
<Select
|
||||
showSearch optionFilterProp="label"
|
||||
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 label={t('routing.priority')} name="priority" rules={[{ required: true }]}>
|
||||
|
||||
Reference in New Issue
Block a user