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
@@ -1,73 +1,69 @@
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { ChevronRight, Home } from 'lucide-react';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import i18n from '@/i18n';
|
||||
|
||||
/**
|
||||
* Route name mapping - breadcrumb display names
|
||||
*/
|
||||
const ROUTE_NAME_MAP: Record<string, string> = {
|
||||
'': i18n.t('menu.dashboard'),
|
||||
'servers': i18n.t('menu.servers'),
|
||||
'cloud-accounts': i18n.t('menu.cloudAccounts'),
|
||||
'domains': i18n.t('menu.domains'),
|
||||
'regions': i18n.t('menu.regions'),
|
||||
'platforms': i18n.t('menu.platforms'),
|
||||
'cloud-billing': i18n.t('menu.cloudBilling'),
|
||||
'': '仪表盘',
|
||||
'servers': '服务器管理',
|
||||
'cloud-accounts': '多云账号',
|
||||
'domains': '域名管理',
|
||||
'cloud-billing': '云账单',
|
||||
'kubernetes': 'Kubernetes',
|
||||
'clusters': i18n.t('menu.clusterList'),
|
||||
'nodes': i18n.t('menu.nodeManagement'),
|
||||
'workloads': i18n.t('menu.workloads'),
|
||||
'clusters': '集群列表',
|
||||
'nodes': '节点管理',
|
||||
'workloads': '工作负载',
|
||||
'deployments': 'Deployments',
|
||||
'statefulsets': 'StatefulSets',
|
||||
'daemonsets': 'DaemonSets',
|
||||
'cronjobs': i18n.t('menu.cronJobs'),
|
||||
'cronjobs': '定时任务',
|
||||
'services': 'Services',
|
||||
'ingresses': 'Ingresses',
|
||||
'configmaps': 'ConfigMaps',
|
||||
'secrets': 'Secrets',
|
||||
'hpas': 'HPA',
|
||||
'pvcs': i18n.t('menu.storage'),
|
||||
'pvcs': '存储',
|
||||
|
||||
'events': i18n.t('menu.events'),
|
||||
'topology': i18n.t('menu.topology'),
|
||||
'namespace': i18n.t('k8s.column.namespace'),
|
||||
'workload': i18n.t('menu.workloads'),
|
||||
'view': i18n.t('common.view'),
|
||||
'edit': i18n.t('common.edit'),
|
||||
'pipelines': i18n.t('menu.pipelines'),
|
||||
'deploy': i18n.t('menu.deploy'),
|
||||
'configureTools': i18n.t('menu.deployConfig'),
|
||||
'groups': i18n.t('pipeline.userGroup'),
|
||||
'rbac': i18n.t('system.permissions'),
|
||||
'monitor-center': i18n.t('menu.resourceMonitor'),
|
||||
'log-center': i18n.t('menu.logCenter'),
|
||||
'events': '事件',
|
||||
'topology': '架构拓扑',
|
||||
'namespace': '命名空间',
|
||||
'workload': '工作负载',
|
||||
'view': '查看',
|
||||
'edit': '编辑',
|
||||
'pipelines': '流水线',
|
||||
'deploy': '应用发布',
|
||||
'configureTools': '发布配置',
|
||||
'groups': '用户组',
|
||||
'rbac': '权限管理',
|
||||
'monitor-center': '资源监控',
|
||||
'log-center': '日志中心',
|
||||
'loki': 'Loki',
|
||||
'es': 'ES',
|
||||
'logs': i18n.t('menu.logCenter'),
|
||||
'trace': i18n.t('menu.trace'),
|
||||
'alert-center': i18n.t('menu.alertCenter'),
|
||||
'datasources': i18n.t('menu.datasources'),
|
||||
'dashboards': i18n.t('menu.grafana'),
|
||||
'host-monitor': i18n.t('monitor.hostMonitor'),
|
||||
'logs': '日志中心',
|
||||
'trace': '链路追踪',
|
||||
'alert-center': '告警中心',
|
||||
'datasources': '数据源',
|
||||
'dashboards': '监控大屏',
|
||||
'host-monitor': '主机监控',
|
||||
'alerts': '监控告警',
|
||||
'approval': i18n.t('menu.approval'),
|
||||
'approval-resource': i18n.t('menu.approval'),
|
||||
'approval-app': i18n.t('menu.approvalApp'),
|
||||
'approval-permission': i18n.t('menu.approvalPermission'),
|
||||
'approval-workflow': i18n.t('menu.approvalWorkflow'),
|
||||
'scripts': i18n.t('menu.scripts'),
|
||||
'approval': '资源申请',
|
||||
'approval-resource': '资源申请',
|
||||
'approval-app': '应用申请',
|
||||
'approval-permission': '权限审批',
|
||||
'approval-workflow': '审批流程',
|
||||
'scripts': '脚本库',
|
||||
'ansible': 'Ansible',
|
||||
'ai-assistant': i18n.t('menu.aiAssistant'),
|
||||
'ai-alert-analyzer': i18n.t('aiops.alertAnalysis'),
|
||||
'ai-predictive': i18n.t('aiops.predictive'),
|
||||
'users': i18n.t('menu.users'),
|
||||
'roles': i18n.t('menu.roles'),
|
||||
'logs-audit': i18n.t('system.auditLog'),
|
||||
'terminal-audit': i18n.t('system.terminal'),
|
||||
'credentials': i18n.t('menu.credentials'),
|
||||
'settings': i18n.t('menu.settings'),
|
||||
'ai-assistant': '智能助手',
|
||||
'ai-alert-analyzer': '告警分析',
|
||||
'ai-predictive': '预测分析',
|
||||
'users': '用户管理',
|
||||
'roles': '角色权限',
|
||||
'logs-audit': '操作审计',
|
||||
'terminal-audit': '终端审计',
|
||||
'credentials': '凭证配置',
|
||||
'settings': '系统设置',
|
||||
};
|
||||
|
||||
interface BreadcrumbItem {
|
||||
@@ -83,13 +79,12 @@ interface BreadcrumbItem {
|
||||
* 支持动态参数(如 clusterCode, namespace, name)显示
|
||||
*/
|
||||
export function Breadcrumb() {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
|
||||
const breadcrumbs = useMemo<BreadcrumbItem[]>(() => {
|
||||
const paths = location.pathname.split('/').filter(Boolean);
|
||||
if (paths.length === 0) {
|
||||
return [{ name: t('menu.dashboard'), path: '/', isLast: true }];
|
||||
return [{ name: '仪表盘', path: '/', isLast: true }];
|
||||
}
|
||||
|
||||
const items: BreadcrumbItem[] = [];
|
||||
@@ -105,10 +100,10 @@ export function Breadcrumb() {
|
||||
|
||||
// 日志中心子路由区分 // Logan.Li
|
||||
if (segment === 'alerts' && paths[index - 1] === 'log-center') {
|
||||
displayName = t('menu.logAlerts');
|
||||
displayName = '日志告警';
|
||||
}
|
||||
if (segment === 'datasources' && paths[index - 1] === 'log-center') {
|
||||
displayName = t('menu.logLibrary');
|
||||
displayName = '日志库';
|
||||
}
|
||||
|
||||
if (!displayName) {
|
||||
@@ -138,13 +133,13 @@ export function Breadcrumb() {
|
||||
|
||||
return (
|
||||
<nav
|
||||
aria-label={t('common.breadcrumbNav')}
|
||||
aria-label="面包屑导航"
|
||||
className="flex items-center gap-1.5 text-sm animate-fade-in"
|
||||
>
|
||||
<Link
|
||||
to="/"
|
||||
className="flex items-center gap-1 text-[var(--dg-text-muted)] hover:text-[var(--dg-blue)] transition-colors duration-200"
|
||||
title={t('menu.dashboard')}
|
||||
title="仪表盘"
|
||||
>
|
||||
<Home className="h-3.5 w-3.5" />
|
||||
</Link>
|
||||
|
||||
@@ -22,9 +22,7 @@ import {
|
||||
Shield,
|
||||
Users,
|
||||
Network,
|
||||
CloudCog,
|
||||
Globe,
|
||||
MapPin,
|
||||
Key,
|
||||
Brain,
|
||||
Activity,
|
||||
@@ -65,10 +63,8 @@ const menuItems: MenuItem[] = [
|
||||
id: 'assets', name: '资产管理', labelKey: 'menu.assets', icon: Server, permission: 'server:view',
|
||||
children: [
|
||||
{ id: 'servers', name: '服务器管理', labelKey: 'menu.servers', icon: Database, path: '/servers', permission: 'server:view' },
|
||||
{ id: 'cloud-accounts', name: '云账号管理', labelKey: 'menu.cloudAccounts', icon: Key, path: '/cloud-accounts', permission: 'cloud:account' },
|
||||
{ id: 'cloud-accounts', name: '多云账号', labelKey: 'menu.cloudAccounts', icon: Key, path: '/cloud-accounts', permission: 'cloud:account' },
|
||||
{ id: 'domains', name: '域名管理', labelKey: 'menu.domains', icon: Globe, path: '/domains', permission: 'cloud:domain' },
|
||||
{ id: 'regions', name: '区域管理', labelKey: 'menu.regions', icon: MapPin, path: '/regions', permission: 'cloud:account' },
|
||||
{ id: 'platforms', name: '云平台', labelKey: 'menu.platforms', icon: CloudCog, path: '/platforms', permission: 'cloud:account' },
|
||||
{ id: 'cloud-billing', name: '云账单', labelKey: 'menu.cloudBilling', icon: BarChart3, path: '/cloud-billing', permission: 'cloud:billing' },
|
||||
],
|
||||
},
|
||||
@@ -148,7 +144,7 @@ const menuItems: MenuItem[] = [
|
||||
children: [
|
||||
{ id: 'ai-assistant', name: '智能助手', labelKey: 'menu.aiAssistant', icon: Bot, path: '/ai-assistant', permission: 'aiops:assistant' },
|
||||
{ id: 'ai-alert-analyzer', name: '告警分析', labelKey: 'menu.aiAlertAnalyzer', icon: AlertTriangle, path: '/ai-alert-analyzer', permission: 'aiops:analysis' },
|
||||
{ id: 'ai-predictive', name: '容量预测', labelKey: 'menu.aiPredictive', icon: BarChart3, path: '/ai-predictive', permission: 'aiops:forecast' },
|
||||
{ id: 'ai-predictive', name: '预测分析', labelKey: 'menu.aiPredictive', icon: BarChart3, path: '/ai-predictive', permission: 'aiops:forecast' },
|
||||
{ id: 'ai-agent-cli', name: 'Agent CLI', labelKey: 'menu.aiAgentCli', icon: Terminal, path: '/ai-agent-cli', permission: 'aiops:agent-cli' },
|
||||
{ id: 'ai-llm-config', name: '大模型设置', labelKey: 'menu.aiLlmConfig', icon: Settings, path: '/ai-llm-config', permission: 'aiops:llm-config' },
|
||||
],
|
||||
@@ -351,8 +347,8 @@ export function Sidebar() {
|
||||
// Listen for keyboard shortcut
|
||||
useEffect(() => {
|
||||
const handler = () => toggleSidebar();
|
||||
window.addEventListener('toggle-sidebar' as any, handler);
|
||||
return () => window.removeEventListener('toggle-sidebar' as any, handler);
|
||||
window.addEventListener('toggle-sidebar', handler);
|
||||
return () => window.removeEventListener('toggle-sidebar', handler);
|
||||
}, [toggleSidebar]);
|
||||
|
||||
// F3: 按权限过滤菜单(递归)
|
||||
|
||||
Reference in new issue
Block a user