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
@@ -22,7 +22,7 @@ export function timeAgo(ts: unknown): string {
|
||||
}
|
||||
|
||||
/** 兼容多种列表响应包装:数组 / {list} / {items} / {data} */
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
export function asList(data: JsonData): JsonData[] {
|
||||
if (!data) return [];
|
||||
if (Array.isArray(data)) return data;
|
||||
|
||||
@@ -27,3 +27,12 @@ export function formatDistanceToNow(timestamp: number): string {
|
||||
return new Date(timestamp).toLocaleDateString();
|
||||
}
|
||||
}
|
||||
|
||||
export function getErrorMessage(error: unknown): string {
|
||||
if (error instanceof Error) return error.message;
|
||||
if (typeof error === 'object' && error !== null && 'message' in error) {
|
||||
const message = (error as { message?: unknown }).message;
|
||||
if (typeof message === 'string') return message;
|
||||
}
|
||||
return String(error);
|
||||
}
|
||||
@@ -6,7 +6,9 @@ export function fitTerminal(fit: FitAddon, term: XTerm, ws?: WebSocket | null) {
|
||||
fit.fit();
|
||||
if (ws?.readyState === WebSocket.OPEN) {
|
||||
const { cols, rows } = term;
|
||||
ws.send(JSON.stringify({ status: 1, cols, rows }));
|
||||
if (cols > 0 && rows > 0) {
|
||||
ws.send(JSON.stringify({ status: 1, cols, rows }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +34,12 @@ export function mountXterm(
|
||||
requestAnimationFrame(tryMount);
|
||||
return;
|
||||
}
|
||||
term.open(el);
|
||||
if (!term.element) {
|
||||
term.open(el);
|
||||
}
|
||||
requestAnimationFrame(applyFit);
|
||||
setTimeout(applyFit, 100);
|
||||
setTimeout(applyFit, 300);
|
||||
};
|
||||
|
||||
tryMount();
|
||||
@@ -63,4 +68,4 @@ export function attachTerminalResize(
|
||||
clearTimeout(timer);
|
||||
ro.disconnect();
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user