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:
1 parent
777d9e4e71
commit
76ec9387f0
202 files changed
+16555
-2543
No files matched your search
@@ -19,6 +19,7 @@ import (
|
||||
"ezops/seed"
|
||||
"ezops/pkg/appdir"
|
||||
"ezops/pkg/auditcleaner"
|
||||
"ezops/pkg/billingsync"
|
||||
"ezops/pkg/database"
|
||||
snmppkg "ezops/pkg/snmp"
|
||||
"ezops/pkg/cronscheduler"
|
||||
@@ -304,6 +305,42 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
// 每日 10:30 同步云账号昨日账单(阿里云 T+1 出账) // Logan.Li
|
||||
go func() {
|
||||
runBillingSync := func() {
|
||||
start := time.Now()
|
||||
result := billingsync.SyncDate(db, billingsync.Yesterday(), nil)
|
||||
msg := billingsync.SummaryMessage(result)
|
||||
status := "success"
|
||||
if result.Accounts == 0 {
|
||||
status = "failed"
|
||||
msg = "没有可同步的活跃云账号"
|
||||
} else if result.Created == 0 && result.Updated == 0 && len(result.Errors) > 0 {
|
||||
status = "failed"
|
||||
msg = result.Errors[0]
|
||||
} else if len(result.Errors) > 0 {
|
||||
msg += ";" + result.Errors[0]
|
||||
}
|
||||
systask.Record("cloud_billing_sync", status, msg, time.Since(start))
|
||||
if status == "success" && (result.Created > 0 || result.Updated > 0) {
|
||||
log.Info("云账单定时同步完成",
|
||||
zap.String("date", result.BillingDate),
|
||||
zap.Int("created", result.Created),
|
||||
zap.Int("updated", result.Updated),
|
||||
)
|
||||
}
|
||||
}
|
||||
for {
|
||||
now := time.Now()
|
||||
next := time.Date(now.Year(), now.Month(), now.Day(), 10, 30, 0, 0, now.Location())
|
||||
if !now.Before(next) {
|
||||
next = next.Add(24 * time.Hour)
|
||||
}
|
||||
time.Sleep(time.Until(next))
|
||||
runBillingSync()
|
||||
}
|
||||
}()
|
||||
|
||||
// 前端静态文件服务(go:embed 模式,二进制部署用) // Logan.Li
|
||||
setupFrontend(r)
|
||||
|
||||
|
||||
Reference in new issue
Block a user