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

+66 -47
View File
@@ -8,50 +8,58 @@ import "time"
// CreateServerRequest 创建服务器
type CreateServerRequest struct {
Hostname string `json:"hostname" binding:"required"`
IP string `json:"ip" binding:"required"`
PublicIP string `json:"public_ip"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
SSHKey string `json:"ssh_key"`
AuthType string `json:"auth_type"`
OS string `json:"os"`
OSVersion string `json:"os_version"`
Arch string `json:"arch"`
CPU int `json:"cpu"`
Memory int64 `json:"memory"`
Disk int64 `json:"disk"`
RegionID *uint `json:"region_id"`
CloudID *uint `json:"cloud_id"`
Tags string `json:"tags"`
Description string `json:"description"`
Hostname string `json:"hostname" binding:"required"`
IP string `json:"ip" binding:"required"`
PublicIP string `json:"public_ip"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
SSHKey string `json:"ssh_key"`
AuthType string `json:"auth_type"`
CredentialID *uint `json:"credential_id"`
OSType string `json:"os_type"`
Protocol string `json:"protocol"`
RDPPort int `json:"rdp_port"`
OS string `json:"os"`
OSVersion string `json:"os_version"`
Arch string `json:"arch"`
CPU int `json:"cpu"`
Memory int64 `json:"memory"`
Disk int64 `json:"disk"`
RegionID *uint `json:"region_id"`
CloudID *uint `json:"cloud_id"`
Tags string `json:"tags"`
Description string `json:"description"`
}
// UpdateServerRequest 更新服务器 — 部分更新 (使用 map)
type UpdateServerRequest struct {
Hostname *string `json:"hostname"`
IP *string `json:"ip"`
PublicIP *string `json:"public_ip"`
Port *int `json:"port"`
Username *string `json:"username"`
Password *string `json:"password"`
SSHKey *string `json:"ssh_key"`
AuthType *string `json:"auth_type"`
OS *string `json:"os"`
OSVersion *string `json:"os_version"`
Arch *string `json:"arch"`
CPU *int `json:"cpu"`
Memory *int64 `json:"memory"`
Disk *int64 `json:"disk"`
Status *string `json:"status"`
CPUUsage *float64 `json:"cpu_usage"`
MemoryUsage *float64 `json:"memory_usage"`
DiskUsage *float64 `json:"disk_usage"`
RegionID *uint `json:"region_id"`
CloudID *uint `json:"cloud_id"`
Tags *string `json:"tags"`
Description *string `json:"description"`
Hostname *string `json:"hostname"`
IP *string `json:"ip"`
PublicIP *string `json:"public_ip"`
Port *int `json:"port"`
Username *string `json:"username"`
Password *string `json:"password"`
SSHKey *string `json:"ssh_key"`
AuthType *string `json:"auth_type"`
CredentialID *uint `json:"credential_id"`
OSType *string `json:"os_type"`
Protocol *string `json:"protocol"`
RDPPort *int `json:"rdp_port"`
OS *string `json:"os"`
OSVersion *string `json:"os_version"`
Arch *string `json:"arch"`
CPU *int `json:"cpu"`
Memory *int64 `json:"memory"`
Disk *int64 `json:"disk"`
Status *string `json:"status"`
CPUUsage *float64 `json:"cpu_usage"`
MemoryUsage *float64 `json:"memory_usage"`
DiskUsage *float64 `json:"disk_usage"`
RegionID *uint `json:"region_id"`
CloudID *uint `json:"cloud_id"`
Tags *string `json:"tags"`
Description *string `json:"description"`
}
// ServerListItem 服务器列表项 (精简)
@@ -85,6 +93,12 @@ type CreateCredentialRequest struct {
SSHPort int `json:"ssh_port"`
SSHPassword string `json:"ssh_password"`
// RDP
RDPUsername string `json:"rdp_username"`
RDPPassword string `json:"rdp_password"`
RDPDomain string `json:"rdp_domain"`
RDPSecurity string `json:"rdp_security"`
// Docker
DockerServer string `json:"docker_server"`
DockerUsername string `json:"docker_username"`
@@ -113,6 +127,11 @@ type UpdateCredentialRequest struct {
SSHPort *int `json:"ssh_port"`
SSHPassword *string `json:"ssh_password"`
RDPUsername *string `json:"rdp_username"`
RDPPassword *string `json:"rdp_password"`
RDPDomain *string `json:"rdp_domain"`
RDPSecurity *string `json:"rdp_security"`
DockerServer *string `json:"docker_server"`
DockerUsername *string `json:"docker_username"`
DockerPassword *string `json:"docker_password"`
@@ -161,14 +180,14 @@ type UpdateAlertContactGroupRequest struct {
// CreateAlertRuleRequest 创建告警规则
type CreateAlertRuleRequest struct {
Name string `json:"name" binding:"required"`
Metric string `json:"metric" binding:"required"`
Condition string `json:"condition" binding:"required"` // >, <, >=, <=, ==
Name string `json:"name" binding:"required"`
Metric string `json:"metric" binding:"required"`
Condition string `json:"condition" binding:"required"` // >, <, >=, <=, ==
Threshold float64 `json:"threshold" binding:"required"`
Duration string `json:"duration"` // 30s, 1m, 5m
ContactIDs []uint `json:"contact_ids"`
Enabled bool `json:"enabled"`
Description string `json:"description"`
Duration string `json:"duration"` // 30s, 1m, 5m
ContactIDs []uint `json:"contact_ids"`
Enabled bool `json:"enabled"`
Description string `json:"description"`
}
// UpdateAlertRuleRequest 更新告警规则