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
@@ -20,6 +20,9 @@ import {
|
||||
RefreshCw,
|
||||
Wallet,
|
||||
Bell,
|
||||
CloudDownload,
|
||||
Loader2,
|
||||
Info,
|
||||
} from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
import { useConfirm } from '@/components/ui/confirm-dialog';
|
||||
@@ -62,6 +65,7 @@ export function CloudBilling() {
|
||||
const [editingRecord, setEditingRecord] = useState<JsonData>(null);
|
||||
const [ruleDialogOpen, setRuleDialogOpen] = useState(false);
|
||||
const [editingRule, setEditingRule] = useState<JsonData>(null);
|
||||
const [syncing, setSyncing] = useState(false);
|
||||
|
||||
const loadStats = useCallback(async () => {
|
||||
setStatsLoading(true);
|
||||
@@ -121,6 +125,37 @@ export function CloudBilling() {
|
||||
if (activeTab === 'alerts') loadRules();
|
||||
};
|
||||
|
||||
// 从云账号 AK 同步昨日账单(当前支持阿里云) // Logan.Li
|
||||
const handleSyncYesterday = async () => {
|
||||
setSyncing(true);
|
||||
try {
|
||||
const res = await billingApi.sync();
|
||||
const errs = res?.errors || [];
|
||||
if (errs.length > 0) {
|
||||
toast.warning(t('cloud.syncBillingPartial'), {
|
||||
description: `${t('cloud.syncBillingResult', {
|
||||
date: res.billing_date,
|
||||
created: res.created,
|
||||
updated: res.updated,
|
||||
})}\n${errs.join('\n')}`,
|
||||
});
|
||||
} else {
|
||||
toast.success(t('cloud.syncBillingSuccess'), {
|
||||
description: t('cloud.syncBillingResult', {
|
||||
date: res.billing_date,
|
||||
created: res.created,
|
||||
updated: res.updated,
|
||||
}),
|
||||
});
|
||||
}
|
||||
refreshAll();
|
||||
} catch (e) {
|
||||
toast.error(t('cloud.syncBillingFailed'), { description: (e as JsonData).message });
|
||||
} finally {
|
||||
setSyncing(false);
|
||||
}
|
||||
};
|
||||
|
||||
const openAddRecord = () => {
|
||||
setEditingRecord(null);
|
||||
setRecordDialogOpen(true);
|
||||
@@ -234,6 +269,17 @@ export function CloudBilling() {
|
||||
}
|
||||
actions={(
|
||||
<>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="dg-btn-secondary"
|
||||
onClick={handleSyncYesterday}
|
||||
disabled={syncing}
|
||||
title={t('cloud.syncBillingHint')}
|
||||
>
|
||||
{syncing ? <Loader2 className="h-4 w-4 mr-1 animate-spin" /> : <CloudDownload className="h-4 w-4 mr-1" />}
|
||||
{t('cloud.syncYesterday')}
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" className="dg-btn-secondary" onClick={refreshAll}>
|
||||
<RefreshCw className="h-4 w-4 mr-1" />{t('common.refresh')}
|
||||
</Button>
|
||||
@@ -256,6 +302,16 @@ export function CloudBilling() {
|
||||
<PageLoading />
|
||||
) : stats ? (
|
||||
<div className="space-y-4">
|
||||
<div className="rounded-lg border border-[var(--dg-border)] bg-[var(--dg-bg-tertiary)]/40 p-3">
|
||||
<div className="flex items-start gap-2 text-sm text-[var(--dg-text-secondary)]">
|
||||
<Info className="h-4 w-4 dg-text-blue shrink-0 mt-0.5" />
|
||||
<div className="space-y-1">
|
||||
<p>{t('cloud.syncBillingInfo')}</p>
|
||||
<p className="text-xs dg-text-muted">{t('cloud.syncBillingTiming')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{stats.alerts?.length > 0 && (
|
||||
<div className="dg-alert-banner">
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
|
||||
Reference in new issue
Block a user