feat(error-logs): 增强错误日志功能和UI交互

- 新增错误码搜索功能,支持精确匹配错误码
- 重构复制功能,支持批量选择和复制密钥
- 优化UI布局和交互体验,添加悬停复制按钮
- 重构路由结构,将log_routes.py重命名为error_log_routes.py
This commit is contained in:
snaily
2025-04-23 18:31:19 +08:00
parent 83ed0527d3
commit dbe50628b3
5 changed files with 337 additions and 65 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ from fastapi.templating import Jinja2Templates
from app.core.security import verify_auth_token
from app.log.logger import get_routes_logger
from app.router import gemini_routes, openai_routes, config_routes, log_routes, scheduler_routes, stats_routes # 新增导入 stats_routes
from app.router import error_log_routes, gemini_routes, openai_routes, config_routes, scheduler_routes, stats_routes # 新增导入 stats_routes
from app.service.key.key_manager import get_key_manager_instance
from app.service.stats_service import StatsService
@@ -30,7 +30,7 @@ def setup_routers(app: FastAPI) -> None:
app.include_router(gemini_routes.router)
app.include_router(gemini_routes.router_v1beta)
app.include_router(config_routes.router)
app.include_router(log_routes.router)
app.include_router(error_log_routes.router)
app.include_router(scheduler_routes.router) # 新增包含 scheduler 路由
app.include_router(stats_routes.router) # 包含 stats API 路由