fix: ServerForm 缺少 ssh_key/credential_id 字段, selIds.has→includes

This commit is contained in:
attacker committed 2026-06-19 01:27:31 +00:00
1 parent 29b3cd49a0
commit 346042a29c
2 files changed
+3 -1

No files matched your search

@@ -107,7 +107,7 @@ const AgentTab: React.FC = () => {
// 批量升级 Agent 到最新版本
const [batchUpgrading, setBatchUpgrading] = useState(false);
const handleBatchUpgrade = async () => {
const online = hosts.filter((h: any) => selIds.has(h.server_id) && h.agent_status === 'online');
const online = hosts.filter((h: any) => selIds.includes(h.server_id) && h.agent_status === 'online');
if (online.length === 0) { toast.error('所选主机中没有在线 Agent'); return; }
const ids = online.map((h: any) => h.server_id);
const ok = await _confirm({ title: '批量升级 Agent', description: `确定升级选中的 ${ids.length} 台在线主机的 Agent 到最新版本?升级将在后台异步执行。`, confirmText: '升级', variant: 'default' });