fix: 批量安装按钮检测 + 审计日志中文化 + terminal断开反馈

1. updateBatchBar() hasAgent 判断从 agent_api_key_set 改为 agent_version
2. 所有后端 AuditLog detail 字段统一中文
3. audit.html 操作/目标类型中文映射
4. terminal.html 断开覆盖层 + 重新连接按钮
5. Agent os_release 上报 + 前端系统版本拆分

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-05-27 02:17:35 +08:00
parent 8b82d6bab0
commit fd9b7d85b5
17 changed files with 434 additions and 55 deletions
+10 -10
View File
@@ -88,7 +88,7 @@ async def reveal_api_key(
admin_username=admin.username,
action="reveal_api_key",
target_type="setting",
detail="Global API key revealed",
detail="查看全局 API Key",
ip_address=request.client.host if request.client else "",
))
return {"key": "api_key", "value": value}
@@ -115,7 +115,7 @@ async def set_setting(
admin_username=admin.username,
action="update_setting",
target_type="setting",
detail=f"key={key}",
detail=f"={key}",
ip_address=request.client.host if request.client else "",
))
@@ -153,7 +153,7 @@ async def create_schedule(
action="create_schedule",
target_type="schedule",
target_id=created.id,
detail=f"name={created.name}",
detail=f"名称={created.name}",
ip_address=request.client.host if request.client else "",
))
@@ -190,7 +190,7 @@ async def update_schedule(
action="update_schedule",
target_type="schedule",
target_id=id,
detail=f"name={updated.name}",
detail=f"名称={updated.name}",
ip_address=request.client.host if request.client else "",
))
@@ -253,7 +253,7 @@ async def create_preset(
action="create_preset",
target_type="preset",
target_id=created.id,
detail=f"name={created.name}",
detail=f"名称={created.name}",
ip_address=request.client.host if request.client else "",
))
@@ -291,7 +291,7 @@ async def update_preset(
action="update_preset",
target_type="preset",
target_id=id,
detail=f"name={preset.name}",
detail=f"名称={preset.name}",
ip_address=request.client.host if request.client else "",
))
@@ -333,7 +333,7 @@ async def reveal_preset(
await audit_repo.create(AuditLog(
admin_username=admin.username, action="reveal_preset",
target_type="preset", target_id=id,
detail=f"name={preset.name}",
detail=f"名称={preset.name}",
ip_address=request.client.host if request.client else "",
))
@@ -396,7 +396,7 @@ async def create_ssh_key_preset(
action="create_ssh_key_preset",
target_type="ssh_key_preset",
target_id=created.id,
detail=f"name={created.name}",
detail=f"名称={created.name}",
ip_address=request.client.host if request.client else "",
))
@@ -436,7 +436,7 @@ async def update_ssh_key_preset(
action="update_ssh_key_preset",
target_type="ssh_key_preset",
target_id=id,
detail=f"name={preset.name}",
detail=f"名称={preset.name}",
ip_address=request.client.host if request.client else "",
))
@@ -478,7 +478,7 @@ async def reveal_ssh_key_preset(
await audit_repo.create(AuditLog(
admin_username=admin.username, action="reveal_ssh_key_preset",
target_type="ssh_key_preset", target_id=id,
detail=f"name={preset.name}",
detail=f"名称={preset.name}",
ip_address=request.client.host if request.client else "",
))