diff --git a/frontend/src/services/api.ts b/frontend/src/services/api.ts index e299ae7..ab2231a 100644 --- a/frontend/src/services/api.ts +++ b/frontend/src/services/api.ts @@ -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('/logs', params); - }, - getSources: async (params?: { page?: number; page_size?: number }) => { - return http.get('/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 = { diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 8692f8e..a3d1319 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -355,13 +355,4 @@ export interface MetricData { labels: Record; } -// 日志条目 -export interface LogEntry { - id: string; - timestamp: string; - level: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL'; - source: string; - message: string; - host: string; - metadata?: Record; -} +