feat: config file editor with API endpoints, frontend UI, and tests

- Added GET /api/config/list - list whitelisted config files with metadata
- Added GET /api/config/read - read file content with line numbers
- Added POST /api/config/save - save with auto-backup and YAML validation
- Added POST /api/config/backup - manual backup endpoint
- Security: whitelist-based path validation, rejects paths outside whitelist
- Auto-backup before save with .bak.<timestamp> naming
- YAML validation for .yaml/.yml files
- Frontend: file list sidebar, code editor with line numbers, status bar
- Mobile-responsive layout (file list top, editor below)
- Config panel in nav, lazy-loaded when navigated to
- 13/13 tests passing
This commit is contained in:
2026-06-01 23:49:30 -04:00
parent 0dc5a2db2f
commit 54af25d2da
5 changed files with 1331 additions and 9 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ t('Manual backup endpoint', r.status_code == 200 and 'backup_path' in r.json())
# 10. HTML serving
r = requests.get(f'{BASE}/', auth=AUTH)
t('Serves index.html', r.status_code == 200 and 'Config Files' in r.text)
t('Serves index.html', r.status_code == 200 and 'Config Editor' in r.text)
p.terminate()
p.join()