feat(admin): surface configuration problems in the admin panel
Add GET /api/admin/health powered by a config health service that detects common deployment mistakes: missing or read-only data volume, broken tariffs/locale-override/guides JSON files, payment providers enabled without credentials, webhook providers without WEBHOOK_BASE_URL, no enabled payment methods, missing or non-https mini app URL, missing Redis, partially configured SMTP, untrusted reverse proxy, invalid bot token, missing/mismatched/failing Telegram webhook and unreachable Remnawave panel. Network checks (Telegram, panel) are cached for two minutes; ?refresh=1 forces a re-check. The admin UI shows the alerts as a banner on the dashboard with per-section navigation chips and a manual re-check button, and as a filtered banner inside each affected section. Alerts are localized via admin_health_* keys with built-in Russian fallbacks.
This commit is contained in:
@@ -9,6 +9,7 @@ from bot.app.web.admin_api_impl import (
|
||||
backups as _backups,
|
||||
broadcast as _broadcast,
|
||||
common as _common,
|
||||
health as _health,
|
||||
logs as _logs,
|
||||
panel as _panel,
|
||||
payments as _payments,
|
||||
@@ -28,6 +29,7 @@ _MODULES = (
|
||||
_runtime,
|
||||
_auth,
|
||||
_common,
|
||||
_health,
|
||||
_stats,
|
||||
_users,
|
||||
_payments,
|
||||
|
||||
Reference in New Issue
Block a user