Files
haproxy-openmanager/backend
taylanbakircioglu 38a0375954 Fix: Backend Server SSL fields not persisting in edit modal
Critical Bug Fix - Server SSL Configuration Not Saved:
- Server edit: Enable SSL, select certificate, save
- Re-edit: SSL fields empty (ssl_enabled=false, ssl_certificate_id=null)
- Database had data but form didn't load it

Root Cause Analysis:
1. Backend API queries include ssl_certificate_id (Line 207, 217)
2. Backend API response object missing ssl_certificate_id (Line 257-279)
3. Frontend form missing ssl_certificate_id in setFieldsValue (Line 738-753)
4. Result: Data saved but not loaded back

Backend API Fix (backend/routers/backend.py):
Added missing fields to server response object:
  - check_port
  - ssl_enabled
  - ssl_verify
  - ssl_certificate_id (CRITICAL - was causing the bug)
  - cookie_value
  - inter, fall, rise

Frontend Form Fix (BackendServers.js):
Added missing fields to handleEditServer setFieldsValue:
  - check_port
  - ssl_verify
  - ssl_certificate_id (CRITICAL)
  - cookie_value
  - inter, fall, rise

HAProxy Config Validation:
Generated config syntax verified:
  server server1 1.1.1.1:11 weight 100 ssl verify required ca-file /etc/ssl/haproxy/star-burgan-com-tr.pem check

Matches HAProxy standard format:
  server <name> <addr>:<port> [params]
  Valid params: weight, ssl, verify, ca-file, check

Complete Workflow After Fix:
  Edit → Enable SSL → Select cert → Save → DB stores ssl_certificate_id
  Edit again → Form loads SSL enabled + certificate selected
  Apply → Config with ca-file path generated
  Agent → Downloads cert, applies config
  HAProxy → Validates and loads successfully
2025-11-07 11:51:15 +03:00
..
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00