refactor: 清理死代码 LogManager.tsx(514行)+logsApi+LogEntry类型(已移除日志能力菜单的孤立残留)

This commit is contained in:
attacker committed 2026-06-17 08:04:22 +08:00
1 parent a501229cb3
commit 73505d6604
2 files changed
+1 -43

No files matched your search

-33
View File
@@ -574,39 +574,6 @@ export const ansibleApi = {
},
};
// ==================== 日志监控 API ====================
export const logsApi = {
query: async (params?: {
level?: string;
service?: string;
host?: string;
keyword?: string;
source_id?: number | string;
page?: number;
page_size?: number;
}) => {
return http.get<ListResponse>('/logs', params);
},
getSources: async (params?: { page?: number; page_size?: number }) => {
return http.get<ListResponse>('/logs/sources', params);
},
createSource: async (data: any) => {
return http.post('/logs/sources', data);
},
deleteSource: async (id: number | string) => {
return http.delete(`/logs/sources/${id}`);
},
export: async (params?: {
level?: string;
service?: string;
host?: string;
keyword?: string;
source_id?: number | string;
}) => {
return http.post('/logs/export', params);
},
};
// ==================== 告警中心 API(基于 /alerts 真实路由) ====================
// 说明:alertCenterApi 与 alertApi 共用同一套后端 /alerts 路由,此处独立封装以便告警中心页使用
export const alertCenterApi = {
+1 -10
View File
@@ -355,13 +355,4 @@ export interface MetricData {
labels: Record<string, string>;
}
// 日志条目
export interface LogEntry {
id: string;
timestamp: string;
level: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL';
source: string;
message: string;
host: string;
metadata?: Record<string, unknown>;
}