Commit Graph

11 Commits

Author SHA1 Message Date
26daa57a4b fix(multi): HAProxy duplicate server, Streamlit headless, dashboard optimization
Fixes:
- HAProxy: Prevent duplicate server names when both inline and separate
  server UCI sections exist for same backend
- Streamlit: Force --server.headless=true in start script (required for server)
- Dashboard: Optimize get_dashboard_data RPC call (6.56s → 0.09s) by using
  fast catalog counting instead of slow appstore list command
- Exposure: Add themed dashboard with SecuBox styling
- ACL: Add missing RPCD permissions for various LuCI apps

Version bumps:
- luci-app-exposure: 1.0.0-r3
- secubox-core: 0.10.0-r5
- secubox-app-haproxy: 1.0.0-r18
- secubox-app-streamlit: 1.0.0-r2
- Portal: v0.15.51

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:04:02 +01:00
c9075bc190 feat(haproxy): Add exposed services integration and fix cert key naming
- Fix HAProxy certificate key naming (.key -> .crt.key) for directory loading
- Add auto-fix in container startup script for existing certificates
- Add list_exposed_services RPC method to fetch services from secubox-exposure
- Add dynamic port scanning for running services discovery
- Add "Quick Select" dropdown in Add Server modal for service auto-fill
- Bump luci-app-haproxy to 1.0.0-r8
- Bump secubox-app-haproxy to 1.0.0-r15

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:34:57 +01:00
62cf871eeb feat(haproxy): Add emergency health banner and quick restart buttons
- HAProxy overview: Add prominent emergency banner showing service status
  with quick health indicators (Container/HAProxy/Config) and one-click
  Restart/Start/Stop buttons
- SecuBox dashboard: Add Critical Services Quick Restart section with
  buttons for HAProxy, CrowdSec, Tor Shield, and Gitea
- Metabolizer config: Fix portal_path to /www/blog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:13:40 +01:00
7a3b3eca23 fix(haproxy): Parse inline servers and enable port editing
- RPCD _add_backend now parses inline 'server' option format
- Servers embedded in backend response with inline flag
- update_server converts inline servers to separate UCI sections
- delete_server handles both inline and separate server sections
- API and UI pass inline flag for proper handling

Fixes server port editing in LuCI backends interface.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:01:44 +01:00
3a5655451e feat(haproxy): Add edit functionality for backends, servers, and vhosts
- Add showEditVhostModal() for editing virtual host properties
- Add showEditBackendModal() for editing backend configuration
- Add showEditServerModal() for editing server properties
- Modern card-based UI with inline edit/delete actions
- Toggle enable/disable for backends
- Fix haproxyctl to read server option from backend UCI sections
- Add debug logging to container startup script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:56:03 +01:00
b793ccb0d6 chore: Bump package releases
- luci-app-haproxy: r4 → r5
- secubox-app-haproxy: r1 → r2
- secubox-app-hexojs: r5 → r6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:42:31 +01:00
47b2e1b8e1 fix(luci-app-haproxy): Correct container name in RPCD backend
Change container references from 'haproxy-lxc' to 'haproxy' to match
the actual container name used by secubox-app-haproxy. This fixes
the LuCI status view showing container_running: false.

Fixes affected methods:
- method_status: container existence and state checks
- method_get_stats: container running check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:31:58 +01:00
45c9a4b7dc fix(haproxy): Fix NodeList rendering error in overview dashboard
- Add pollRegistered flag to prevent duplicate poll registration
- Fix refreshDashboard to use replaceChild instead of dom.content
- Build content arrays explicitly to avoid null values in arrays
- Fix disabled attribute handling for action buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:34:40 +01:00
500e020809 feat(haproxy): Enhanced dashboard with SecuBox theme design system
- Complete CSS redesign using SecuBox design system patterns (hp-* classes)
- Added dark/light mode support via CSS variables
- Overview page with:
  - Gradient page header with status badges
  - Stats grid with animated cards (vhosts, backends, certs, status)
  - Health check grid (container, HAProxy, config, ports, stats)
  - Vhosts/backends/certificates preview cards
  - Quick actions with icon buttons (start/stop/reload/validate/generate/stats)
  - Connection details panel
  - Auto-refresh polling every 30 seconds
  - Toast notifications for feedback
- Vhosts page with:
  - Clean form for adding new virtual hosts
  - Enhanced table with SSL/ACME badges
  - Toggle and delete actions with confirmation modals
- Responsive layout for mobile/tablet
- Inter + JetBrains Mono fonts for modern typography

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:27:10 +01:00
22bd4bd445 fix(haproxy): Use module-level RPC declarations in api.js
Fix TypeError "haproxy.api factory yields invalid constructor" by
refactoring api.js to use correct LuCI module pattern:
- Define RPC calls at module level with rpc.declare()
- Reference them in baseclass.extend() object
- Add getDashboardData helper function at module level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:15:48 +01:00
f3fd676ad1 feat(haproxy): Add HAProxy load balancer packages for OpenWrt
- Add secubox-app-haproxy: LXC-containerized HAProxy service
  - Alpine Linux container with HAProxy
  - Multi-certificate SSL/TLS termination with SNI routing
  - ACME/Let's Encrypt auto-renewal
  - Virtual hosts management
  - Backend health checks and load balancing

- Add luci-app-haproxy: Full LuCI web interface
  - Overview dashboard with service status
  - Virtual hosts management with SSL options
  - Backends and servers configuration
  - SSL certificate management (ACME + import)
  - ACLs and URL-based routing rules
  - Statistics dashboard and logs
  - Settings for ports, timeouts, ACME

- Update luci-app-secubox-portal:
  - Add Services category with HAProxy, HexoJS, PicoBrew,
    Tor Shield, Jellyfin, Home Assistant, AdGuard Home, Nextcloud
  - Make portal dynamic - only shows installed apps
  - Add empty state UI for sections with no apps
  - Remove 404 errors for uninstalled apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:09:32 +01:00