How alonz22/haproxy-dashboard works
HAProxy Configurator is a Flask web application for creating and editing HAProxy configuration, reviewing security events, and viewing traffic statistics. The main workflow authenticates a user, accepts frontend/backend and security options, and appends generated configuration; a separate editor saves, validates, and can restart HAProxy. The README also describes SSL, health checks, ACL/WAF rules, and homepage summaries. These capabilities are grouped where their implementation is documented or visible; unsampled template behavior is not inferred beyond the routes that render it.
Main entry points: main_routes.py Frontend setup · app.py Flask application · edit_routes.py Config editor · haproxy_config.py Config generation
Components 20
Web application
- Flask application
app.py - HTTP authentication
auth/auth_middleware.py - Setup form
templates/index.html - Summary view
templates/home.html - Editor view
templates/edit.html - Security events view
templates/logs.html
Configuration management
- Frontend setup
routes/main_routes.py - Config generation
utils/haproxy_config.py - HAProxy config
- Homepage summary
routes/main_routes.py - Config editor
routes/edit_routes.py
Monitoring and security
- HAProxy validation
routes/edit_routes.py - HAProxy service
- Traffic statistics
app.py - Stats fetch and parse
utils/stats_utils.py - HAProxy stats endpoint
- Security events route
app.py - Security log analysis
log_parser.py - HAProxy log
Other components
- Administrator
Connections 22
- Administrator → Flask application: uses over HTTPS
README.md - Flask application → Frontend setup: registers blueprint
app.py - Flask application → Config editor: registers blueprint
app.py - Frontend setup → HTTP authentication: requires authentication
routes/main_routes.py - Config editor → HTTP authentication: requires authentication
routes/edit_routes.py - Frontend setup → Setup form: renders
routes/main_routes.py - Frontend setup → Config generation: generates configuration
routes/main_routes.py - Config generation → HAProxy config: reads and appends
utils/haproxy_config.py - Frontend setup → Summary view: renders summary
routes/main_routes.py - Frontend setup → Homepage summary: counts config items
routes/main_routes.py - Homepage summary → HAProxy config: reads counts
- Config editor → Editor view: renders
routes/edit_routes.py - Config editor → HAProxy config: reads and writes
routes/edit_routes.py - Config editor → HAProxy validation: runs validation
routes/edit_routes.py - HAProxy validation → HAProxy service: restarts after validation
routes/edit_routes.py - Flask application → Traffic statistics: serves statistics route
app.py - Traffic statistics → Stats fetch and parse: fetches and parses
app.py - Stats fetch and parse → HAProxy stats endpoint: requests CSV stats
utils/stats_utils.py - Flask application → Security events route: serves logs route
app.py - Security events route → Security log analysis: parses log file
app.py - Security log analysis → HAProxy log: reads
log_parser.py - Security events route → Security events view: renders events
app.py