feat(rdp): 新增 RDP 远程桌面/SMB/账单同步能力 + 清理编译产物

主要变更:
- RDP 远程桌面:新增 backend/pkg/rdp(RDP 引擎 + credssp/display/rle/trace)、
  backend/controller/rdp*(连接/凭证/文件/会话/实时)、frontend RDP 组件与 API
- Windows SMB 文件传输:backend/pkg/winsmb
- 云账单同步:backend/pkg/billingsync + billing_sync/aliyun_billing,前端账单详情
- Agent CLI Kubernetes 工具:kubernetes_action/get、pod_execute/logs
- 服务器导入助手:server_import_helpers、ImportCredentialSettings
- 国际化与组件重构(cloud/deploy/monitor/server/system 等多模块)
- 清理编译产物二进制:移除 backend/server、backend/agent/bin/aiops-agent-*
- .gitignore:新增 backend/agent/ 与 .cache/(避免 334MB go-build 缓存误入库)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
LoganandClaude committed 2026-07-04 01:50:36 +08:00
1 parent 777d9e4e71
commit 76ec9387f0
202 files changed
+16555 -2543

No files matched your search

@@ -0,0 +1,100 @@
import { Input } from '@/components/ui/input';
import type { Credential } from '@/components/deploy/credential-manager/types';
interface ImportCredentialSettingsProps {
defaultSshPort: string;
onDefaultSshPortChange: (value: string) => void;
sshCredentials: Credential[];
rdpCredentials: Credential[];
selectedSshCredentialId: string;
selectedRdpCredentialId: string;
onSelectedSshCredentialIdChange: (value: string) => void;
onSelectedRdpCredentialIdChange: (value: string) => void;
compact?: boolean;
}
function credentialLabel(cred: Credential) {
return `${cred.name}${cred.summary ? ` · ${cred.summary}` : ''}`;
}
export function ImportCredentialSettings({
defaultSshPort,
onDefaultSshPortChange,
sshCredentials,
rdpCredentials,
selectedSshCredentialId,
selectedRdpCredentialId,
onSelectedSshCredentialIdChange,
onSelectedRdpCredentialIdChange,
compact = false,
}: ImportCredentialSettingsProps) {
const labelClass = compact
? 'block text-xs font-medium text-[var(--dg-text-secondary)] mb-1'
: 'block text-sm font-medium text-[var(--dg-text-secondary)] mb-2';
const panelClass = compact
? 'grid grid-cols-1 sm:grid-cols-3 gap-4 p-4 rounded-lg bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)]'
: 'grid grid-cols-1 md:grid-cols-3 gap-4';
const inputBg = compact ? 'bg-[var(--dg-bg-tertiary)]' : 'bg-[var(--dg-bg-secondary)]';
return (
<div className={panelClass}>
<div>
<label className={labelClass}>
SSH 端口
<span className="text-[var(--dg-text-muted)] ml-1">(Linux 默认)</span>
</label>
<Input
type="number"
placeholder="22"
value={defaultSshPort}
onChange={(e) => onDefaultSshPortChange(e.target.value)}
className={`w-32 ${inputBg} border-[var(--dg-border)] text-[var(--dg-text-primary)]`}
/>
</div>
<div>
<label className={labelClass}>
Linux SSH 凭证
<span className="text-[var(--dg-text-muted)] ml-1">(可选)</span>
</label>
{sshCredentials.length === 0 ? (
<p className="text-xs text-[var(--dg-text-muted)] py-2">暂无 SSH 凭证</p>
) : (
<select
value={selectedSshCredentialId}
onChange={(e) => onSelectedSshCredentialIdChange(e.target.value)}
className={`w-full px-3 py-2 ${inputBg} border border-[var(--dg-border)] rounded-md text-[var(--dg-text-primary)] text-sm`}
>
<option value="">不使用凭证</option>
{sshCredentials.map((cred) => (
<option key={cred.id} value={String(cred.id)}>
{credentialLabel(cred)}
</option>
))}
</select>
)}
</div>
<div>
<label className={labelClass}>
Windows RDP 密码
<span className="text-[var(--dg-text-muted)] ml-1">(可选)</span>
</label>
{rdpCredentials.length === 0 ? (
<p className="text-xs text-[var(--dg-text-muted)] py-2">暂无 RDP 凭证</p>
) : (
<select
value={selectedRdpCredentialId}
onChange={(e) => onSelectedRdpCredentialIdChange(e.target.value)}
className={`w-full px-3 py-2 ${inputBg} border border-[var(--dg-border)] rounded-md text-[var(--dg-text-primary)] text-sm`}
>
<option value="">不使用凭证</option>
{rdpCredentials.map((cred) => (
<option key={cred.id} value={String(cred.id)}>
{credentialLabel(cred)}
</option>
))}
</select>
)}
</div>
</div>
);
}