feat(i18n): 全量中英文国际化改造
- 翻译 en-US.json 中 1006 条未翻译的中文条目为英文 - 提取 30+ 组件文件的硬编码中文到 locale JSON - 新增 900+ 翻译键覆盖所有业务模块: - Layout (Sidebar, Header, Breadcrumb) - Server (ServerForm, CloudServerImport, WebShell, RdpTools) - Deploy (ReleaseManager, PipelineCreate, AppRelease) - Kubernetes (DeploymentEdit, PodExec, PodLogs, ResourceEditor) - Monitor (UnifiedQueryPanel, AlertCenter, Prometheus/Grafana Dashboard) - AIOps (predictUtils, PredictiveCostTab, AIPredictive) - System (useLdapManagement, AgentMonitor, AgentWizard) - tsc --noEmit 类型检查通过
This commit is contained in:
1 parent
76ec9387f0
commit
a9513c2056
44 files changed
+4342
-1792
No files matched your search
@@ -1,71 +1,80 @@
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { ChevronRight, Home } from 'lucide-react';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
/**
|
||||
* Route name mapping - breadcrumb display names
|
||||
* Route segment → i18n key mapping for breadcrumb display names.
|
||||
* Values prefixed with 'breadcrumb.' are translated via t();
|
||||
* plain strings (proper nouns) are used as-is.
|
||||
*/
|
||||
const ROUTE_NAME_MAP: Record<string, string> = {
|
||||
'': '仪表盘',
|
||||
'servers': '服务器管理',
|
||||
'cloud-accounts': '多云账号',
|
||||
'domains': '域名管理',
|
||||
'cloud-billing': '云账单',
|
||||
const ROUTE_I18N_MAP: Record<string, string> = {
|
||||
'': 'breadcrumb.dashboard',
|
||||
'servers': 'breadcrumb.servers',
|
||||
'cloud-accounts': 'breadcrumb.cloudAccounts',
|
||||
'domains': 'breadcrumb.domains',
|
||||
'cloud-billing': 'breadcrumb.cloudBilling',
|
||||
'kubernetes': 'Kubernetes',
|
||||
'clusters': '集群列表',
|
||||
'nodes': '节点管理',
|
||||
'workloads': '工作负载',
|
||||
'clusters': 'breadcrumb.clusterList',
|
||||
'nodes': 'breadcrumb.nodeManagement',
|
||||
'workloads': 'breadcrumb.workloads',
|
||||
'deployments': 'Deployments',
|
||||
'statefulsets': 'StatefulSets',
|
||||
'daemonsets': 'DaemonSets',
|
||||
'cronjobs': '定时任务',
|
||||
'cronjobs': 'breadcrumb.cronjobs',
|
||||
'services': 'Services',
|
||||
'ingresses': 'Ingresses',
|
||||
'configmaps': 'ConfigMaps',
|
||||
'secrets': 'Secrets',
|
||||
'hpas': 'HPA',
|
||||
'pvcs': '存储',
|
||||
'pvcs': 'breadcrumb.storage',
|
||||
|
||||
'events': '事件',
|
||||
'topology': '架构拓扑',
|
||||
'namespace': '命名空间',
|
||||
'workload': '工作负载',
|
||||
'view': '查看',
|
||||
'edit': '编辑',
|
||||
'pipelines': '流水线',
|
||||
'deploy': '应用发布',
|
||||
'configureTools': '发布配置',
|
||||
'groups': '用户组',
|
||||
'rbac': '权限管理',
|
||||
'monitor-center': '资源监控',
|
||||
'log-center': '日志中心',
|
||||
'events': 'breadcrumb.events',
|
||||
'topology': 'breadcrumb.topology',
|
||||
'namespace': 'breadcrumb.namespace',
|
||||
'workload': 'breadcrumb.workloads',
|
||||
'view': 'breadcrumb.view',
|
||||
'edit': 'breadcrumb.edit',
|
||||
'pipelines': 'breadcrumb.pipelines',
|
||||
'deploy': 'breadcrumb.deploy',
|
||||
'configureTools': 'breadcrumb.configureTools',
|
||||
'groups': 'breadcrumb.groups',
|
||||
'rbac': 'breadcrumb.rbac',
|
||||
'monitor-center': 'breadcrumb.monitorCenter',
|
||||
'log-center': 'breadcrumb.logCenter',
|
||||
'loki': 'Loki',
|
||||
'es': 'ES',
|
||||
'logs': '日志中心',
|
||||
'trace': '链路追踪',
|
||||
'alert-center': '告警中心',
|
||||
'datasources': '数据源',
|
||||
'dashboards': '监控大屏',
|
||||
'host-monitor': '主机监控',
|
||||
'alerts': '监控告警',
|
||||
'approval': '资源申请',
|
||||
'approval-resource': '资源申请',
|
||||
'approval-app': '应用申请',
|
||||
'approval-permission': '权限审批',
|
||||
'approval-workflow': '审批流程',
|
||||
'scripts': '脚本库',
|
||||
'logs': 'breadcrumb.logs',
|
||||
'trace': 'breadcrumb.trace',
|
||||
'alert-center': 'breadcrumb.alertCenter',
|
||||
'datasources': 'breadcrumb.datasources',
|
||||
'dashboards': 'breadcrumb.dashboards',
|
||||
'host-monitor': 'breadcrumb.hostMonitor',
|
||||
'alerts': 'breadcrumb.alerts',
|
||||
'approval': 'breadcrumb.approval',
|
||||
'approval-resource': 'breadcrumb.approvalResource',
|
||||
'approval-app': 'breadcrumb.approvalApp',
|
||||
'approval-permission': 'breadcrumb.approvalPermission',
|
||||
'approval-workflow': 'breadcrumb.approvalWorkflow',
|
||||
'scripts': 'breadcrumb.scripts',
|
||||
'ansible': 'Ansible',
|
||||
'ai-assistant': '智能助手',
|
||||
'ai-alert-analyzer': '告警分析',
|
||||
'ai-predictive': '预测分析',
|
||||
'users': '用户管理',
|
||||
'roles': '角色权限',
|
||||
'logs-audit': '操作审计',
|
||||
'terminal-audit': '终端审计',
|
||||
'credentials': '凭证配置',
|
||||
'settings': '系统设置',
|
||||
'ai-assistant': 'breadcrumb.aiAssistant',
|
||||
'ai-alert-analyzer': 'breadcrumb.aiAlertAnalyzer',
|
||||
'ai-predictive': 'breadcrumb.aiPredictive',
|
||||
'users': 'breadcrumb.users',
|
||||
'roles': 'breadcrumb.roles',
|
||||
'logs-audit': 'breadcrumb.logsAudit',
|
||||
'terminal-audit': 'breadcrumb.terminalAudit',
|
||||
'credentials': 'breadcrumb.credentials',
|
||||
'settings': 'breadcrumb.settings',
|
||||
};
|
||||
|
||||
/** Translate a route i18n value: keys starting with 'breadcrumb.' go through t(), proper nouns stay as-is. */
|
||||
function resolveRouteName(value: string | undefined, t: (key: string) => string): string | undefined {
|
||||
if (!value) return undefined;
|
||||
return value.startsWith('breadcrumb.') ? t(value) : value;
|
||||
}
|
||||
|
||||
interface BreadcrumbItem {
|
||||
name: string;
|
||||
path: string;
|
||||
@@ -79,12 +88,13 @@ 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: '仪表盘', path: '/', isLast: true }];
|
||||
return [{ name: t('breadcrumb.dashboard'), path: '/', isLast: true }];
|
||||
}
|
||||
|
||||
const items: BreadcrumbItem[] = [];
|
||||
@@ -95,15 +105,15 @@ export function Breadcrumb() {
|
||||
const isLast = index === paths.length - 1;
|
||||
|
||||
// Check if it's a dynamic parameter (looks like an identifier, not a known route)
|
||||
const knownName = ROUTE_NAME_MAP[segment];
|
||||
let displayName = knownName;
|
||||
const i18nValue = ROUTE_I18N_MAP[segment];
|
||||
let displayName = resolveRouteName(i18nValue, t);
|
||||
|
||||
// 日志中心子路由区分 // Logan.Li
|
||||
if (segment === 'alerts' && paths[index - 1] === 'log-center') {
|
||||
displayName = '日志告警';
|
||||
displayName = t('breadcrumb.logAlerts');
|
||||
}
|
||||
if (segment === 'datasources' && paths[index - 1] === 'log-center') {
|
||||
displayName = '日志库';
|
||||
displayName = t('breadcrumb.logLibrary');
|
||||
}
|
||||
|
||||
if (!displayName) {
|
||||
@@ -124,7 +134,7 @@ export function Breadcrumb() {
|
||||
});
|
||||
|
||||
return items;
|
||||
}, [location.pathname]);
|
||||
}, [location.pathname, t]);
|
||||
|
||||
// Don't show breadcrumb on dashboard (root path)
|
||||
if (breadcrumbs.length <= 1 && location.pathname === '/') {
|
||||
@@ -133,13 +143,13 @@ export function Breadcrumb() {
|
||||
|
||||
return (
|
||||
<nav
|
||||
aria-label="面包屑导航"
|
||||
aria-label={t('breadcrumb.breadcrumbNav')}
|
||||
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="仪表盘"
|
||||
title={t('breadcrumb.dashboard')}
|
||||
>
|
||||
<Home className="h-3.5 w-3.5" />
|
||||
</Link>
|
||||
|
||||
@@ -58,23 +58,23 @@ interface MenuItem {
|
||||
}
|
||||
|
||||
const menuItems: MenuItem[] = [
|
||||
{ id: 'dashboard', name: '仪表盘', labelKey: 'menu.dashboard', icon: LayoutDashboard, path: '/', permission: 'dashboard:view' },
|
||||
{ id: 'dashboard', name: 'Dashboard', labelKey: 'menu.dashboard', icon: LayoutDashboard, path: '/', permission: 'dashboard:view' },
|
||||
{
|
||||
id: 'assets', name: '资产管理', labelKey: 'menu.assets', icon: Server, permission: 'server:view',
|
||||
id: 'assets', name: 'Assets', 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: 'domains', name: '域名管理', labelKey: 'menu.domains', icon: Globe, path: '/domains', permission: 'cloud:domain' },
|
||||
{ id: 'cloud-billing', name: '云账单', labelKey: 'menu.cloudBilling', icon: BarChart3, path: '/cloud-billing', permission: 'cloud:billing' },
|
||||
{ id: 'servers', name: 'Servers', labelKey: 'menu.servers', icon: Database, path: '/servers', permission: 'server:view' },
|
||||
{ id: 'cloud-accounts', name: 'Multi-Cloud Accounts', labelKey: 'menu.cloudAccounts', icon: Key, path: '/cloud-accounts', permission: 'cloud:account' },
|
||||
{ id: 'domains', name: 'Domains', labelKey: 'menu.domains', icon: Globe, path: '/domains', permission: 'cloud:domain' },
|
||||
{ id: 'cloud-billing', name: 'Cloud Billing', labelKey: 'menu.cloudBilling', icon: BarChart3, path: '/cloud-billing', permission: 'cloud:billing' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'kubernetes', name: 'Kubernetes', labelKey: 'menu.kubernetes', icon: Cloud, permission: 'k8s:cluster',
|
||||
children: [
|
||||
{ id: 'k8s-clusters', name: '集群列表', labelKey: 'menu.clusterList', icon: Cloud, path: '/kubernetes', permission: 'k8s:cluster' },
|
||||
{ id: 'k8s-nodes', name: '节点管理', labelKey: 'menu.nodeManagement', icon: Cpu, path: '/nodes', permission: 'k8s:nodes' },
|
||||
{ id: 'k8s-clusters', name: 'Clusters', labelKey: 'menu.clusterList', icon: Cloud, path: '/kubernetes', permission: 'k8s:cluster' },
|
||||
{ id: 'k8s-nodes', name: 'Nodes', labelKey: 'menu.nodeManagement', icon: Cpu, path: '/nodes', permission: 'k8s:nodes' },
|
||||
{
|
||||
id: 'k8s-workload', name: '工作负载', labelKey: 'menu.workloads', icon: Boxes, permission: 'k8s:workloads',
|
||||
id: 'k8s-workload', name: 'Workloads', labelKey: 'menu.workloads', icon: Boxes, permission: 'k8s:workloads',
|
||||
children: [
|
||||
{ id: 'k8s-deployments', name: 'Deployments', labelKey: 'menu.deployments', icon: Boxes, path: '/workloads/deployments', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-statefulsets', name: 'StatefulSets', labelKey: 'menu.statefulsets', icon: Boxes, path: '/workloads/statefulsets', permission: 'k8s:workloads' },
|
||||
@@ -84,94 +84,94 @@ const menuItems: MenuItem[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'k8s-network', name: '网络', labelKey: 'menu.network', icon: Network, permission: 'k8s:workloads',
|
||||
id: 'k8s-network', name: 'Network', labelKey: 'menu.network', icon: Network, permission: 'k8s:workloads',
|
||||
children: [
|
||||
{ id: 'k8s-services', name: 'Services', labelKey: 'menu.services', icon: Network, path: '/workloads/services', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-ingresses', name: 'Ingresses', labelKey: 'menu.ingresses', icon: Globe, path: '/workloads/ingresses', permission: 'k8s:workloads' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'k8s-config', name: '配置中心', labelKey: 'menu.configCenter', icon: Settings, permission: 'k8s:workloads',
|
||||
id: 'k8s-config', name: 'Configuration', labelKey: 'menu.configCenter', icon: Settings, permission: 'k8s:workloads',
|
||||
children: [
|
||||
{ id: 'k8s-configmaps', name: 'ConfigMaps', labelKey: 'menu.configmaps', icon: FileCode, path: '/workloads/configmaps', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-secrets', name: 'Secrets', labelKey: 'menu.secrets', icon: Shield, path: '/workloads/secrets', permission: 'k8s:workloads' },
|
||||
],
|
||||
},
|
||||
{ id: 'k8s-storage', name: '存储', labelKey: 'menu.storage', icon: Database, path: '/workloads/pvcs', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-events', name: '事件', labelKey: 'menu.events', icon: Bell, path: '/workloads/events', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-topology', name: '架构拓扑', labelKey: 'menu.topology', icon: Network, path: '/topology', permission: 'k8s:topology' },
|
||||
{ id: 'k8s-storage', name: 'Storage', labelKey: 'menu.storage', icon: Database, path: '/workloads/pvcs', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-events', name: 'Events', labelKey: 'menu.events', icon: Bell, path: '/workloads/events', permission: 'k8s:workloads' },
|
||||
{ id: 'k8s-topology', name: 'Topology', labelKey: 'menu.topology', icon: Network, path: '/topology', permission: 'k8s:topology' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'deploy', name: '应用发布', labelKey: 'menu.deploy', icon: Rocket, permission: 'deploy:pipeline',
|
||||
id: 'deploy', name: 'Deployment', labelKey: 'menu.deploy', icon: Rocket, permission: 'deploy:pipeline',
|
||||
children: [
|
||||
{ id: 'pipelines', name: '流水线', labelKey: 'menu.pipelines', icon: GitBranch, path: '/pipelines', permission: 'deploy:pipeline' },
|
||||
{ id: 'deploy-credentials', name: '发布配置', labelKey: 'menu.deployConfig', icon: Key, path: '/deploy/configureTools', permission: 'deploy:release' },
|
||||
{ id: 'deploy-rbac', name: 'Job 权限', labelKey: 'menu.deployRbac', icon: Shield, path: '/deploy/rbac', permission: 'deploy:release' },
|
||||
{ id: 'pipelines', name: 'Pipelines', labelKey: 'menu.pipelines', icon: GitBranch, path: '/pipelines', permission: 'deploy:pipeline' },
|
||||
{ id: 'deploy-credentials', name: 'Deploy Config', labelKey: 'menu.deployConfig', icon: Key, path: '/deploy/configureTools', permission: 'deploy:release' },
|
||||
{ id: 'deploy-rbac', name: 'Deploy RBAC', labelKey: 'menu.deployRbac', icon: Shield, path: '/deploy/rbac', permission: 'deploy:release' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'monitor', name: '监控中心', labelKey: 'menu.monitor', icon: Bell, permission: 'monitor:alert',
|
||||
id: 'monitor', name: 'Monitoring', labelKey: 'menu.monitor', icon: Bell, permission: 'monitor:alert',
|
||||
children: [
|
||||
{ id: 'grafana', name: '监控大屏', labelKey: 'menu.grafana', icon: Monitor, path: '/dashboards', permission: 'monitor:alert' },
|
||||
{ id: 'monitor-center', name: '资源监控', labelKey: 'menu.resourceMonitor', icon: Activity, path: '/monitor-center', permission: 'agent:monitor' },
|
||||
{ id: 'trace', name: '链路追踪', labelKey: 'menu.trace', icon: GitBranch, path: '/trace', permission: 'monitor:alert' },
|
||||
{ id: 'alert-center', name: '告警中心', labelKey: 'menu.alertCenter', icon: Bell, path: '/alert-center', permission: 'monitor:alert' },
|
||||
{ id: 'datasources', name: '数据源', labelKey: 'menu.datasources', icon: Database, path: '/datasources', permission: 'monitor:alert' },
|
||||
{ id: 'grafana', name: 'Dashboards', labelKey: 'menu.grafana', icon: Monitor, path: '/dashboards', permission: 'monitor:alert' },
|
||||
{ id: 'monitor-center', name: 'Resource Monitor', labelKey: 'menu.resourceMonitor', icon: Activity, path: '/monitor-center', permission: 'agent:monitor' },
|
||||
{ id: 'trace', name: 'Tracing', labelKey: 'menu.trace', icon: GitBranch, path: '/trace', permission: 'monitor:alert' },
|
||||
{ id: 'alert-center', name: 'Alert Center', labelKey: 'menu.alertCenter', icon: Bell, path: '/alert-center', permission: 'monitor:alert' },
|
||||
{ id: 'datasources', name: 'Datasources', labelKey: 'menu.datasources', icon: Database, path: '/datasources', permission: 'monitor:alert' },
|
||||
],
|
||||
},
|
||||
// 日志中心:与监控中心平级,四个子菜单
|
||||
{
|
||||
id: 'log-center', name: '日志中心', labelKey: 'menu.logCenter', icon: ScrollText, permission: 'monitor:alert',
|
||||
id: 'log-center', name: 'Log Center', labelKey: 'menu.logCenter', icon: ScrollText, permission: 'monitor:alert',
|
||||
children: [
|
||||
{ id: 'log-loki', name: 'Loki查询', labelKey: 'menu.lokiQuery', icon: FileSearch, path: '/log-center/loki', permission: 'monitor:alert' },
|
||||
{ id: 'log-es', name: 'ES查询', labelKey: 'menu.esQuery', icon: Database, path: '/log-center/es', permission: 'monitor:alert' },
|
||||
{ id: 'log-datasources', name: '日志库', labelKey: 'menu.logLibrary', icon: HardDrive, path: '/log-center/datasources', permission: 'monitor:alert' },
|
||||
{ id: 'log-alerts', name: '日志告警', labelKey: 'menu.logAlerts', icon: AlertTriangle, path: '/log-center/alerts', permission: 'monitor:alert' },
|
||||
{ id: 'log-rbac', name: '日志权限', labelKey: 'menu.logRbac', icon: Shield, path: '/log-center/rbac', permission: 'monitor:alert' },
|
||||
{ id: 'log-loki', name: 'Loki Query', labelKey: 'menu.lokiQuery', icon: FileSearch, path: '/log-center/loki', permission: 'monitor:alert' },
|
||||
{ id: 'log-es', name: 'ES Query', labelKey: 'menu.esQuery', icon: Database, path: '/log-center/es', permission: 'monitor:alert' },
|
||||
{ id: 'log-datasources', name: 'Log Library', labelKey: 'menu.logLibrary', icon: HardDrive, path: '/log-center/datasources', permission: 'monitor:alert' },
|
||||
{ id: 'log-alerts', name: 'Log Alerts', labelKey: 'menu.logAlerts', icon: AlertTriangle, path: '/log-center/alerts', permission: 'monitor:alert' },
|
||||
{ id: 'log-rbac', name: 'Log RBAC', labelKey: 'menu.logRbac', icon: Shield, path: '/log-center/rbac', permission: 'monitor:alert' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'task', name: '作业任务', labelKey: 'menu.automation', icon: PlayCircle, permission: 'auto:cron',
|
||||
id: 'task', name: 'Task', labelKey: 'menu.automation', icon: PlayCircle, permission: 'auto:cron',
|
||||
children: [
|
||||
{ id: 'cronjobs', name: '定时任务', labelKey: 'menu.cronJobs', icon: PlayCircle, path: '/cronjobs', permission: 'auto:cron' },
|
||||
{ id: 'scripts', name: '脚本库', labelKey: 'menu.scripts', icon: FileCode, path: '/scripts', permission: 'auto:script' },
|
||||
{ id: 'remote-exec', name: '远程执行', labelKey: 'menu.remoteExec', icon: Terminal, path: '/remote', permission: 'auto:ansible' },
|
||||
{ id: 'cronjobs', name: 'Cron Jobs', labelKey: 'menu.cronJobs', icon: PlayCircle, path: '/cronjobs', permission: 'auto:cron' },
|
||||
{ id: 'scripts', name: 'Scripts', labelKey: 'menu.scripts', icon: FileCode, path: '/scripts', permission: 'auto:script' },
|
||||
{ id: 'remote-exec', name: 'Remote Exec', labelKey: 'menu.remoteExec', icon: Terminal, path: '/remote', permission: 'auto:ansible' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'aiops', name: 'AIOps智能', labelKey: 'menu.aiops', icon: Brain, permission: 'aiops:assistant',
|
||||
id: 'aiops', name: 'AIOps', labelKey: 'menu.aiops', icon: Brain, permission: 'aiops:assistant',
|
||||
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-assistant', name: 'AI Assistant', labelKey: 'menu.aiAssistant', icon: Bot, path: '/ai-assistant', permission: 'aiops:assistant' },
|
||||
{ id: 'ai-alert-analyzer', name: 'Alert Analysis', labelKey: 'menu.aiAlertAnalyzer', icon: AlertTriangle, path: '/ai-alert-analyzer', permission: 'aiops:analysis' },
|
||||
{ id: 'ai-predictive', name: 'Predictive Analytics', 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' },
|
||||
{ id: 'ai-llm-config', name: 'LLM Settings', labelKey: 'menu.aiLlmConfig', icon: Settings, path: '/ai-llm-config', permission: 'aiops:llm-config' },
|
||||
],
|
||||
},
|
||||
{ id: 'approval', name: '资源申请', labelKey: 'menu.approval', icon: CheckSquare, permission: 'approval:apply',
|
||||
{ id: 'approval', name: 'Requests', labelKey: 'menu.approval', icon: CheckSquare, permission: 'approval:apply',
|
||||
children: [
|
||||
{ id: 'approval-resource', name: '资源申请', labelKey: 'menu.approvalResource', icon: Server, path: '/approval/resource', permission: 'approval:apply' },
|
||||
{ id: 'approval-app', name: '应用申请', labelKey: 'menu.approvalApp', icon: Rocket, path: '/approval/app', permission: 'approval:apply' },
|
||||
{ id: 'approval-permission', name: '权限审批', labelKey: 'menu.approvalPermission', icon: ShieldCheck, path: '/approval/permission', permission: 'approval:apply' },
|
||||
{ id: 'approval-resource', name: 'Resource Request', labelKey: 'menu.approvalResource', icon: Server, path: '/approval/resource', permission: 'approval:apply' },
|
||||
{ id: 'approval-app', name: 'App Request', labelKey: 'menu.approvalApp', icon: Rocket, path: '/approval/app', permission: 'approval:apply' },
|
||||
{ id: 'approval-permission', name: 'Permission Request', labelKey: 'menu.approvalPermission', icon: ShieldCheck, path: '/approval/permission', permission: 'approval:apply' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'audit', name: '安全审计', labelKey: 'menu.audit', icon: FileSearch, permission: 'audit:terminal',
|
||||
id: 'audit', name: 'Security Audit', labelKey: 'menu.audit', icon: FileSearch, permission: 'audit:terminal',
|
||||
children: [
|
||||
{ id: 'audit-terminal', name: '终端审计', labelKey: 'menu.auditTerminal', icon: Terminal, path: '/audit/terminal', permission: 'audit:terminal' },
|
||||
{ id: 'audit-operations', name: '操作审计', labelKey: 'menu.auditOperations', icon: FileCode, path: '/audit/operations', permission: 'audit:operations' },
|
||||
{ id: 'audit-login', name: '登录日志', labelKey: 'menu.auditLogin', icon: LogIn, path: '/audit/login-logs', permission: 'audit:login-logs' },
|
||||
{ id: 'audit-terminal', name: 'Terminal Audit', labelKey: 'menu.auditTerminal', icon: Terminal, path: '/audit/terminal', permission: 'audit:terminal' },
|
||||
{ id: 'audit-operations', name: 'Operations Audit', labelKey: 'menu.auditOperations', icon: FileCode, path: '/audit/operations', permission: 'audit:operations' },
|
||||
{ id: 'audit-login', name: 'Login Logs', labelKey: 'menu.auditLogin', icon: LogIn, path: '/audit/login-logs', permission: 'audit:login-logs' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'system', name: '系统管理', labelKey: 'menu.system', icon: Settings, permission: 'system:user',
|
||||
id: 'system', name: 'System', labelKey: 'menu.system', icon: Settings, permission: 'system:user',
|
||||
children: [
|
||||
{ id: 'users', name: '用户管理', labelKey: 'menu.users', icon: Users, path: '/users', permission: 'system:user' },
|
||||
{ id: 'roles', name: '角色权限', labelKey: 'menu.roles', icon: Shield, path: '/roles', permission: 'system:role' },
|
||||
{ id: 'credentials', name: '凭证配置', labelKey: 'menu.credentials', icon: Shield, path: '/credentials', permission: 'system:user' },
|
||||
{ id: 'approval-workflow', name: '审批流程', labelKey: 'menu.approvalWorkflow', icon: GitBranch, path: '/approval-workflow', permission: 'system:role' },
|
||||
{ id: 'settings', name: '系统设置', labelKey: 'menu.settings', icon: Settings, path: '/settings', permission: 'system:user' },
|
||||
{ id: 'users', name: 'Users', labelKey: 'menu.users', icon: Users, path: '/users', permission: 'system:user' },
|
||||
{ id: 'roles', name: 'Roles & Permissions', labelKey: 'menu.roles', icon: Shield, path: '/roles', permission: 'system:role' },
|
||||
{ id: 'credentials', name: 'Credentials', labelKey: 'menu.credentials', icon: Shield, path: '/credentials', permission: 'system:user' },
|
||||
{ id: 'approval-workflow', name: 'Approval Workflow', labelKey: 'menu.approvalWorkflow', icon: GitBranch, path: '/approval-workflow', permission: 'system:role' },
|
||||
{ id: 'settings', name: 'Settings', labelKey: 'menu.settings', icon: Settings, path: '/settings', permission: 'system:user' },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user