feat: 新增日志中心、功能优化与代码重构

- 新增 log_datasource.go / log_proxy.go / user_api_token.go 后端控制器
- 新增 log_datasource.go model
- 新增 monitor/log-center.ts API 模块
- 新增 LogCenter 前端组件及页面
- 重构 deployment 相关组件 (HPDA/UpdateImageModal/bundle-yaml 等)
- 新增 ResetPasswordDialog / code-snippet-block / copy-button 等 UI 组件
- 重构多个 k8s 相关组件 (TopologyView/ResourceVisualEditor/PodFileBrowser 等)
- 更新多个 API 和工具函数 (auth.ts/monitor/index.ts/request.ts 等)
- 更新静态资源 (index.html + 新 JS/CSS bundle)
- 删除废弃静态资源文件
This commit is contained in:
Logan committed 2026-06-26 23:18:05 +08:00
1 parent 5ca0e6d83a
commit 8d46e8f352
197 files changed
+5014 -815

No files matched your search

@@ -40,6 +40,10 @@ const ROUTE_NAME_MAP: Record<string, string> = {
'groups': '用户组',
'rbac': '权限管理',
'monitor-center': '资源监控',
'log-center': '日志中心',
'loki': 'Loki',
'es': 'ES',
'logs': '日志中心',
'trace': '链路追踪',
'alert-center': '告警中心',
'datasources': '数据源',
@@ -96,6 +100,11 @@ export function Breadcrumb() {
const knownName = ROUTE_NAME_MAP[segment];
let displayName = knownName;
// 日志中心子路由 alerts 与监控告警路由区分 // Logan.Li
if (segment === 'alerts' && paths[index - 1] === 'log-center') {
displayName = '日志告警';
}
if (!displayName) {
// Dynamic parameter - could be cluster code, namespace, resource name, etc.
if (segment.length > 20 || segment.includes('-')) {
+1 -1
View File
@@ -284,7 +284,7 @@ export function Header() {
<DropdownMenuSeparator className="bg-[var(--dg-border)]" />
<DropdownMenuItem
className="text-[var(--dg-text-secondary)] focus:bg-[var(--dg-bg-hover)] focus:text-[var(--dg-text-primary)] cursor-pointer"
onClick={() => navigate('/users')}
onClick={() => navigate('/profile')}
>
<User className="h-4 w-4 mr-2.5" />
个人中心
@@ -39,6 +39,7 @@ import {
ShieldCheck,
FileSearch,
LogIn,
ScrollText,
} from 'lucide-react';
import { Button } from '@/components/ui/button';
@@ -120,6 +121,15 @@ const menuItems: MenuItem[] = [
{ id: 'datasources', name: '数据源', icon: Database, path: '/datasources', permission: 'monitor:alert' },
],
},
// 日志中心:与监控中心平级,三个子菜单 // Logan.Li
{
id: 'log-center', name: '日志中心', icon: ScrollText, permission: 'monitor:alert',
children: [
{ id: 'log-loki', name: 'Loki', icon: FileSearch, path: '/log-center/loki', permission: 'monitor:alert' },
{ id: 'log-es', name: 'ES', icon: Database, path: '/log-center/es', permission: 'monitor:alert' },
{ id: 'log-alerts', name: '日志告警', icon: AlertTriangle, path: '/log-center/alerts', permission: 'monitor:alert' },
],
},
{
id: 'automation', name: '自动化运维', icon: PlayCircle, permission: 'auto:cron',
children: [
@@ -186,6 +196,7 @@ function MenuItemComponent({ item, depth = 0 }: { item: MenuItem; depth?: number
(item.id === 'k8s-workload' && location.pathname.startsWith('/workloads')) ||
(item.id === 'k8s-network' && (location.pathname.includes('/services') || location.pathname.includes('/ingresses'))) ||
(item.id === 'k8s-config' && (location.pathname.includes('/configmaps') || location.pathname.includes('/secrets'))) ||
(item.id === 'log-center' && location.pathname.startsWith('/log-center')) ||
activeMenu === item.id;
const isActiveParent = hasChildren && item.children?.some((child) => {