feat: Agent批量升级 + 版本号注入 + 服务器凭证下拉关联
- Dockerfile: ARG VERSION/BUILD_TIME 通过 ldflags 注入 agent+backend 二进制 - run.sh: 自动从 git tag 获取版本号 - docker-compose: build args 传递 VERSION/BUILD_TIME - backend: BatchUpgradeAgent SSH下载新二进制+重启, /agent/bin 静态文件服务 - frontend: 监控大屏添加批量升级按钮 (闪电图标) - frontend: 服务器编辑/添加表单改为凭证下拉选择器 - frontend: ServerForm 加载 /credentials 列表, 选择后自动填充用户名/认证方式
This commit is contained in:
1 parent
228b6b52f9
commit
ed08ea255e
9 files changed
+253
-52
No files matched your search
@@ -300,9 +300,17 @@ export function ServerManager() {
|
||||
tags: formData.tags || undefined,
|
||||
description: formData.description || undefined,
|
||||
};
|
||||
// 密码仅在填写时提交
|
||||
if (formData.password) {
|
||||
payload.password = formData.password;
|
||||
// 凭证关联 — 下拉选择后自动关联,无需手输密码
|
||||
if (formData.credential_id) {
|
||||
payload.credential_id = formData.credential_id;
|
||||
} else {
|
||||
// 手动输入模式:仅填了密码才提交
|
||||
if (formData.password) {
|
||||
payload.password = formData.password;
|
||||
}
|
||||
if (formData.ssh_key) {
|
||||
payload.ssh_key = formData.ssh_key;
|
||||
}
|
||||
}
|
||||
if (editingId) {
|
||||
await serverApi.updateServer(editingId, payload);
|
||||
|
||||
Reference in new issue
Block a user