secubox-openwrt/secubox-tools/webui/app/backends/config.py
CyberMind-FR 0d6aaa1111 feat(webui): add Project Hub workspace and remove Command Center glow effects
- Add complete Project Hub & Workspace Interface implementation
  - New data models: Project, ModuleKit, Workspace
  - 3 fixture projects (cybermind.fr, cybermood.eu, secubox-c3)
  - 4 module kits (Security, Network, Automation, Media)
  - Workspace routes with project switching and kit installation
  - 4 workspace tabs: Overview, Module Kits, Devices, Composer
  - New navigation item: Workspace (7th section)

- Remove all glowing effects from UI
  - Remove Command Center widget glow and backdrop blur
  - Remove device status indicator glow
  - Remove toggle button glow effects

- Extend DataStore with 13 new methods for workspace management
- Add 270+ lines of workspace-specific CSS with responsive layouts
- Create workspace templates and result partials

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 08:10:22 +01:00

62 lines
1.5 KiB
Python

"""
Configuration constants for OpenWrt HTTP/RPC backend.
"""
# OpenWrt RPC/ubus endpoints
OPENWRT_RPC_ENDPOINTS = {
"auth": "/cgi-bin/luci/rpc/auth", # Legacy LuCI RPC (deprecated)
"sys": "/cgi-bin/luci/rpc/sys", # Legacy LuCI RPC (deprecated)
"ubus": "/ubus", # Modern ubus endpoint
"luci_auth": "/ubus/", # Modern LuCI authentication via ubus
}
# HTTP request timeouts (seconds)
HTTP_TIMEOUT = 30.0
HTTP_CONNECT_TIMEOUT = 10.0
# Session configuration
SESSION_TTL = 3600 # Session lifetime: 1 hour
# Retry configuration
MAX_RETRIES = 3
RETRY_DELAY = 1.0 # seconds
# Command mapping: SecuBox command_id → OpenWrt ubus calls
COMMAND_MAPPINGS = {
"fetch-rpc-status": {
"ubus_path": "system",
"ubus_method": "board",
"params": {}
},
"collect-health": {
"ubus_path": "system",
"ubus_method": "info",
"params": {}
},
"get-system-info": {
"ubus_path": "system",
"ubus_method": "board",
"params": {}
},
"get-network-interfaces": {
"ubus_path": "network.interface",
"ubus_method": "dump",
"params": {}
},
"list-packages": {
"ubus_path": "rpc-sys",
"ubus_method": "packagelist",
"params": {}
},
# Add more mappings as needed for other commands
}
# Default connection settings
DEFAULT_CONNECTION = {
"host": "192.168.1.1",
"port": 80,
"protocol": "http",
"username": "root",
"password": "",
}