sync: 主项目全量同步(含 btpanel 一键登录回归修复与前端构建产物)
- bootstrap 失败恢复 SSH 临时登录回退 - ssh_bootstrap 真安装检测与 config 目录自愈 - axs Gitea 发布源切换为 https://axs.kuma1xn.vip
This commit is contained in:
@@ -266,11 +266,11 @@ Header: `X-API-Key` 或 query(Agent 脚本约定)。
|
||||
| `SshKeyPreset` | `ssh_key_presets` | SSH 密钥模板 | `encrypted_private_key` |
|
||||
| `PushSchedule` | `push_schedules` | 定时任务 | `cron_expr`, `server_ids`, `schedule_type` push/script |
|
||||
| `PushRetryJob` | `push_retry_jobs` | 失败重试 | 指数退避, `max_retries=3` |
|
||||
| `AuditLog` | `audit_logs` | 审计 | `action`, `target_*`, `ip_address` |
|
||||
| `AuditLog` | `audit_logs` | 审计(**7 天**自动清理) | `action`, `target_*`, `ip_address` |
|
||||
| `Script` | `scripts` | 脚本库 | `content`, `category` |
|
||||
| `ScriptExecution` | `script_executions` | 执行记录 | `results` JSON, `status` |
|
||||
| `DbCredential` | `db_credentials` | DB 凭据 | 脚本内 `$DB_*` 替换 |
|
||||
| `AlertLog` | `alert_logs` | 告警历史 | `is_recovery` |
|
||||
| `AlertLog` | `alert_logs` | 告警历史(**7 天**自动清理) | `is_recovery` |
|
||||
| `SshSession` | `ssh_sessions` | WebSSH 会话 | UUID `id` |
|
||||
| `CommandLog` | `command_logs` | 终端命令 | `command` ≤2000 字符 |
|
||||
| `QuickCommand` | `quick_commands` | 终端快捷命令 | `sort_order` |
|
||||
@@ -314,6 +314,8 @@ Agent(60s) → POST /api/agent/heartbeat
|
||||
| `retry_runner` | 300s | `background/retry_runner.py` | `push_retry_jobs` SKIP LOCKED 重试 |
|
||||
| `ip_allowlist_refresh` | 7200s | `background/ip_allowlist_refresh.py` | 订阅 URL 更新白名单 |
|
||||
| `upload_staging_cleanup` | 3600s | `background/upload_staging_cleanup.py` | 清理 `/tmp/nexus_upload_*` >24h |
|
||||
| `alert_log_purge` | 24h | `background/alert_log_purge.py` | 清理 `alert_logs` >7d |
|
||||
| `audit_log_purge` | 24h | `background/audit_log_purge.py` | 清理 `audit_logs` >7d |
|
||||
|
||||
---
|
||||
|
||||
@@ -340,7 +342,7 @@ Agent(60s) → POST /api/agent/heartbeat
|
||||
|
||||
### 9.3 服务器 `/api/servers`
|
||||
|
||||
CRUD、stats、categories、logs、CSV import/export、batch agent install/upgrade/uninstall、**batch detect-path**(SSH 搜索 `workerman.bat` 自动写入 `target_path`)、health check、files-capability、setup-files-sudo、单台 agent 操作。
|
||||
CRUD、stats、categories、logs、CSV import/export、batch agent install/upgrade/uninstall、**batch detect-path**(SSH 在 `/www/wwwroot` 下搜索 `crmeb` 目录写入 `target_path`)、health check、files-capability、setup-files-sudo、单台 agent 操作。
|
||||
|
||||
### 9.4 同步 `/api/sync`(`sync_v2.py`,核心)
|
||||
|
||||
@@ -537,7 +539,7 @@ main.ts → App.vue(侧栏/搜索)→ router-view
|
||||
| **连接失败列表** | `GET /servers/pending` |
|
||||
| **失败重试 / 删除** | `POST /servers/pending/{id}/retry`、`DELETE /servers/pending/{id}` |
|
||||
| 批量选择 | 安装/升级/卸载 Agent、**检测目标路径**、健康检查、删除 |
|
||||
| **检测目标路径** | `POST /servers/batch/detect-path` — Body: `{ server_ids }`;SSH 在 `/www/wwwroot` 下找 `workerman.bat`,将所在目录写入 `target_path`;结果弹窗逐台展示 |
|
||||
| **检测目标路径** | `POST /servers/batch/detect-path` — Body: `{ server_ids }`;SSH 在 `/www/wwwroot` 下搜索 `crmeb` 目录写入 `target_path`;结果弹窗逐台展示 |
|
||||
| **列表快捷编辑** | 目标路径列 ✏️ → `PUT /servers/{id}` `{ target_path }` |
|
||||
| CSV 导出 | 客户端生成(无密码列) |
|
||||
| CSV 导入 | `POST /servers/import` FormData |
|
||||
|
||||
Reference in New Issue
Block a user