feat(backends): WebSocket-Toggle pro Backend
Migration 0017 fügt backends.websocket BOOL. Wenn aktiv emittiert der HAProxy-Renderer `timeout tunnel 1h` IM Backend-Block; defaults-Section hat den Global-Timeout dafür verloren. Backends ohne WS-Workload bleiben bei strikten HTTP-Timeouts (Connection-Hygiene). Migrations-Heuristik schaltet vm-pool/proxmox/console/vnc-Namen auto auf true damit Proxmox- Konsole nach Deploy weiterhin durchläuft. UI: Switch im Backend-Modal + WS-Tag in der Übersichtstabelle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ interface Backend {
|
||||
scheme: string
|
||||
health_check_path?: string | null
|
||||
lb_algorithm: 'roundrobin' | 'leastconn' | 'source'
|
||||
websocket: boolean
|
||||
active: boolean
|
||||
created_at: string
|
||||
updated_at: string
|
||||
@@ -43,6 +44,7 @@ interface BackendFormValues {
|
||||
scheme: 'http' | 'https'
|
||||
health_check_path?: string
|
||||
lb_algorithm: 'roundrobin' | 'leastconn' | 'source'
|
||||
websocket: boolean
|
||||
active: boolean
|
||||
domain_ids?: number[]
|
||||
}
|
||||
@@ -193,7 +195,12 @@ export default function BackendsPage() {
|
||||
},
|
||||
{
|
||||
title: t('backends.lbAlgo'), dataIndex: 'lb_algorithm', key: 'lb',
|
||||
render: (v: string) => <Tag>{v}</Tag>,
|
||||
render: (v: string, row) => (
|
||||
<Space size={4}>
|
||||
<Tag>{v}</Tag>
|
||||
{row.websocket && <Tag color="cyan">WS</Tag>}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{ title: t('backends.healthCheck'), dataIndex: 'health_check_path', key: 'hc', render: (v?: string) => v ?? '—' },
|
||||
{
|
||||
@@ -216,6 +223,7 @@ export default function BackendsPage() {
|
||||
scheme: row.scheme as 'http' | 'https',
|
||||
health_check_path: row.health_check_path ?? undefined,
|
||||
lb_algorithm: row.lb_algorithm,
|
||||
websocket: row.websocket,
|
||||
active: row.active,
|
||||
domain_ids: domainsForBackend(row.id).map(d => d.id),
|
||||
})
|
||||
@@ -246,7 +254,7 @@ export default function BackendsPage() {
|
||||
extraActions={
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={() => {
|
||||
setCreating(true); form.resetFields()
|
||||
form.setFieldsValue({ scheme: 'http', lb_algorithm: 'roundrobin', active: true })
|
||||
form.setFieldsValue({ scheme: 'http', lb_algorithm: 'roundrobin', websocket: false, active: true })
|
||||
}}>
|
||||
{t('backends.addBackend')}
|
||||
</Button>
|
||||
@@ -294,6 +302,10 @@ export default function BackendsPage() {
|
||||
<Form.Item label={t('backends.healthCheck')} name="health_check_path">
|
||||
<Input placeholder="/health" />
|
||||
</Form.Item>
|
||||
<Form.Item label={t('backends.websocket')} name="websocket" valuePropName="checked"
|
||||
extra={t('backends.websocketHint')}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label={t('backends.active')} name="active" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user