Skip to content

start_beta_test#7

Merged
trustedinster merged 13 commits into
betafrom
alpha
May 30, 2026
Merged

start_beta_test#7
trustedinster merged 13 commits into
betafrom
alpha

Conversation

@trustedinster
Copy link
Copy Markdown
Collaborator

No description provided.

本次提交包含多项核心改进:
1.  统一替换硬编码的"提供商"用户组判断为常量PROVIDER_GROUP_NAME
2.  重构Beta推送插件,仅保留PostgreSQL支持并更新相关配置
3.  为插件列表/详情视图添加登录校验,新增测试插件示例
4.  优化审计日志、统计接口的参数校验与查询性能,改用aggregate简化统计逻辑
5.  将云电脑用户操作、开户流程改为异步Celery任务,避免阻塞主线程
6.  重构邀请页面,新增邀请确认流程
7.  优化插件管理器的日志输出,替换print为标准logging
8.  修复InitialToken的令牌校验逻辑,使用F表达式避免竞态条件
9.  更新部署脚本,新增列表类型环境变量配置与数据库迁移校验
10. 重构主机提供商分配页面,新增分组批量分配功能
- 新增: wizard中生成初始化命令(一行命令+备用命令)
- 新增: SSE实时监听初始化状态(waiting/cert_uploading/connected)
- 新增: upload_host_cert API接收PFX并提取PEM保存
- 新增: InitialToken.host可为null(生成命令时先创建token)
- 新增: 证书认证主机test_connection跳过(证书未上传时)
- 新增: 证书认证连接使用server_cert_validation=ignore
- 修复: auth_method hidden input重复导致永远提交ntlm
- 修复: SSE被中间件拦截(添加排除路径)
- 修复: 证书认证不再强制要求用户名
- 重构: 快速配置模式不显示证书上传字段
- 重构: SSE等待host_status=online而非仅CONSUMED
- upload_host_cert now auto-creates a pending host if token.host is None
- Wizard form adds init_token hidden field to track the token
- When saving wizard, if token already has a host, update it instead of creating duplicate
- Associates token with host when wizard creates a new host
- Add cert_data JSONField to InitialToken for temporary cert storage
- upload_host_cert stores cert on token when host not yet associated
- Wizard reads cert_data from token and writes to host on save
- Clean up expired orphaned tokens on generate_init_command
- No more orphaned Host records from abandoned flows
- SSE now reports cert_uploaded=true when cert data stored on token
- Frontend shows '证书上传成功!保存主机后将完成配置' state
- Resolves stuck '正在上传证书并测试连接' when host=None
The SSE inner polling loop only checked host_status but not cert_data.
When cert was uploaded after SSE entered CONSUMED state, the loop
would never detect it because it didn't refresh cert_data from DB.
x-model on nested object (initData.token) inside template x-if may
not reliably sync to the hidden input. Explicitly set the value in
onSubmit before native form submission.
Previously test_connection silently returned 'pending' when cert
files didn't exist, making it impossible to diagnose why connection
tests weren't running.
…inding

x-model on hidden input inside template x-if with nested object
(initData.token) is unreliable for native form submission. Move the
input outside the template and use :value binding instead.
…ert tokens

Instead of passing init_token through the form (which was unreliable
with Alpine x-model), simply look for any InitialToken with cert_data
and no host when saving the wizard. This eliminates the complex form
binding issue entirely.
…e binding

Alpine :value and x-model bindings on hidden inputs are unreliable
for native form submission. Now onSubmit dynamically creates/updates
the hidden input right before this.$el.submit(), guaranteeing the
value is present in POST data.
主要变更:
1.  替换第三方验证码为天爱验证码,移除旧的极验/turnstile相关代码
2.  新增证书配置流程相关的模型、迁移、工具类和API端点
3.  优化WinRM客户端,修复证书认证逻辑与证书校验
4.  添加产品每人限购功能
5.  重构系统配置表单与界面,移除旧验证码配置项
6.  新增自动CA初始化逻辑与定时清理任务
7.  优化主机连接客户端复用逻辑
@trustedinster trustedinster self-assigned this May 30, 2026
@trustedinster trustedinster merged commit 8a0a09a into beta May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant