From 1ad3cc481d127cb7ccfa411d6619961150be7a67 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Tue, 16 Jun 2026 17:39:30 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E8=BF=98=E5=8E=9F=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E9=A1=B5=E9=9D=A2=EF=BC=88Bug=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E6=9C=8D=E5=8A=A1=E6=94=B9=E7=94=B1=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=AE=A1=E7=90=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- ops-platform/src/api/log.ts | 144 -------------- ops-platform/src/router/index.ts | 8 - ops-platform/src/views/layout/MainLayout.vue | 3 +- .../src/views/log-monitor/LogEvents.vue | 111 ----------- .../src/views/log-monitor/LogFunnels.vue | 151 --------------- .../src/views/log-monitor/LogIssueDetail.vue | 111 ----------- .../src/views/log-monitor/LogIssues.vue | 130 ------------- .../src/views/log-monitor/LogOverview.vue | 128 ------------- .../src/views/log-monitor/LogRankFreq.vue | 72 ------- .../src/views/log-monitor/LogRankRisk.vue | 72 ------- .../src/views/log-monitor/LogWebhooks.vue | 178 ------------------ ops-platform/vite.config.ts | 5 - 12 files changed, 1 insertion(+), 1112 deletions(-) delete mode 100644 ops-platform/src/api/log.ts delete mode 100644 ops-platform/src/views/log-monitor/LogEvents.vue delete mode 100644 ops-platform/src/views/log-monitor/LogFunnels.vue delete mode 100644 ops-platform/src/views/log-monitor/LogIssueDetail.vue delete mode 100644 ops-platform/src/views/log-monitor/LogIssues.vue delete mode 100644 ops-platform/src/views/log-monitor/LogOverview.vue delete mode 100644 ops-platform/src/views/log-monitor/LogRankFreq.vue delete mode 100644 ops-platform/src/views/log-monitor/LogRankRisk.vue delete mode 100644 ops-platform/src/views/log-monitor/LogWebhooks.vue diff --git a/ops-platform/src/api/log.ts b/ops-platform/src/api/log.ts deleted file mode 100644 index 4134ee5..0000000 --- a/ops-platform/src/api/log.ts +++ /dev/null @@ -1,144 +0,0 @@ -import client from './client' - -// ---- Types ---- - -export interface LogOverview { - totalIssues: number - todayNew: number - affectedUsers: number - crashRate: number - dailyTrend: Array<{ date: string; crashRate: number }> - topIssues: LogIssueSummary[] -} - -export interface LogIssueSummary { - id: string - title: string - type: string - count: number - affectedUsers: number - platform: string - lastSeenAt: string -} - -export interface LogIssuePage { - content: LogIssueSummary[] - total: number - totalPages: number -} - -export interface LogIssueDetail { - id: string - title: string - type: string - count: number - affectedUsers: number - platform: string - firstSeenAt: string - lastSeenAt: string - status: string - events: LogEvent[] - sourceContext?: string -} - -export interface LogEvent { - id: string - issueId: string - userId: string - platform: string - appVersion: string - osVersion: string - device: string - timestamp: string - properties: Record - stackTrace?: string -} - -export interface LogEventPage { - content: LogEvent[] - total: number - totalPages: number -} - -export interface LogFunnelStep { - name: string - count: number - rate: number -} - -export interface LogFunnelResult { - steps: LogFunnelStep[] - totalStart: number - totalEnd: number - overallRate: number -} - -export interface LogRankingItem { - id: string - title: string - type: string - count: number - affectedUsers: number - platform: string - rank: number -} - -export interface LogWebhook { - id: string - name: string - url: string - events: string[] - enabled: boolean - secret?: string - createdAt: string - updatedAt: string -} - -// ---- API ---- - -export const logApi = { - getOverview: () => - client.get<{ data: LogOverview }>('/log/v1/overview'), - - listIssues: (params: { - type?: string - platform?: string - startDate?: string - endDate?: string - page?: number - size?: number - }) => - client.get<{ data: LogIssuePage }>('/log/v1/issues', { params }), - - getIssueDetail: (id: string) => - client.get<{ data: LogIssueDetail }>(`/log/v1/issues/${id}`), - - getFrequencyRanking: (limit = 10) => - client.get<{ data: LogRankingItem[] }>('/log/v1/issues/rankings/frequency', { params: { limit } }), - - getRiskRanking: (limit = 10) => - client.get<{ data: LogRankingItem[] }>('/log/v1/issues/rankings/risk', { params: { limit } }), - - listEvents: (params: { - eventName?: string - userId?: string - page?: number - size?: number - }) => - client.get<{ data: LogEventPage }>('/log/v1/events', { params }), - - getFunnel: (steps: string[]) => - client.get<{ data: LogFunnelResult }>('/log/v1/events/funnel', { params: { steps } }), - - listWebhooks: () => - client.get<{ data: LogWebhook[] }>('/log/v1/webhooks'), - - createWebhook: (data: Omit) => - client.post<{ data: LogWebhook }>('/log/v1/webhooks', data), - - updateWebhook: (id: string, data: Partial) => - client.put<{ data: LogWebhook }>(`/log/v1/webhooks/${id}`, data), - - deleteWebhook: (id: string) => - client.delete(`/log/v1/webhooks/${id}`), -} diff --git a/ops-platform/src/router/index.ts b/ops-platform/src/router/index.ts index 9824a02..dadc959 100644 --- a/ops-platform/src/router/index.ts +++ b/ops-platform/src/router/index.ts @@ -20,14 +20,6 @@ const router = createRouter({ { path: 'operation-logs', component: () => import('@/views/logs/OperationLogView.vue') }, { path: 'risk-control', component: () => import('@/views/risk/RiskControlView.vue') }, { path: 'system-logs', component: () => import('@/views/system/ServerLogsView.vue') }, - { path: 'log/overview', component: () => import('@/views/log-monitor/LogOverview.vue') }, - { path: 'log/issues', component: () => import('@/views/log-monitor/LogIssues.vue') }, - { path: 'log/issues/:id', component: () => import('@/views/log-monitor/LogIssueDetail.vue') }, - { path: 'log/events', component: () => import('@/views/log-monitor/LogEvents.vue') }, - { path: 'log/funnels', component: () => import('@/views/log-monitor/LogFunnels.vue') }, - { path: 'log/webhooks', component: () => import('@/views/log-monitor/LogWebhooks.vue') }, - { path: 'log/rank/freq', component: () => import('@/views/log-monitor/LogRankFreq.vue') }, - { path: 'log/rank/risk', component: () => import('@/views/log-monitor/LogRankRisk.vue') }, ], }, ], diff --git a/ops-platform/src/views/layout/MainLayout.vue b/ops-platform/src/views/layout/MainLayout.vue index 5ab066c..4db4564 100644 --- a/ops-platform/src/views/layout/MainLayout.vue +++ b/ops-platform/src/views/layout/MainLayout.vue @@ -66,7 +66,7 @@ diff --git a/ops-platform/src/views/log-monitor/LogFunnels.vue b/ops-platform/src/views/log-monitor/LogFunnels.vue deleted file mode 100644 index ab0164e..0000000 --- a/ops-platform/src/views/log-monitor/LogFunnels.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/ops-platform/src/views/log-monitor/LogIssueDetail.vue b/ops-platform/src/views/log-monitor/LogIssueDetail.vue deleted file mode 100644 index 0282804..0000000 --- a/ops-platform/src/views/log-monitor/LogIssueDetail.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - - - diff --git a/ops-platform/src/views/log-monitor/LogIssues.vue b/ops-platform/src/views/log-monitor/LogIssues.vue deleted file mode 100644 index 6ecde9d..0000000 --- a/ops-platform/src/views/log-monitor/LogIssues.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - diff --git a/ops-platform/src/views/log-monitor/LogOverview.vue b/ops-platform/src/views/log-monitor/LogOverview.vue deleted file mode 100644 index b210d92..0000000 --- a/ops-platform/src/views/log-monitor/LogOverview.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/ops-platform/src/views/log-monitor/LogRankFreq.vue b/ops-platform/src/views/log-monitor/LogRankFreq.vue deleted file mode 100644 index dd0499d..0000000 --- a/ops-platform/src/views/log-monitor/LogRankFreq.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/ops-platform/src/views/log-monitor/LogRankRisk.vue b/ops-platform/src/views/log-monitor/LogRankRisk.vue deleted file mode 100644 index 505fd81..0000000 --- a/ops-platform/src/views/log-monitor/LogRankRisk.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/ops-platform/src/views/log-monitor/LogWebhooks.vue b/ops-platform/src/views/log-monitor/LogWebhooks.vue deleted file mode 100644 index d9b39d0..0000000 --- a/ops-platform/src/views/log-monitor/LogWebhooks.vue +++ /dev/null @@ -1,178 +0,0 @@ - - - diff --git a/ops-platform/vite.config.ts b/ops-platform/vite.config.ts index 9b258be..4f6d892 100644 --- a/ops-platform/vite.config.ts +++ b/ops-platform/vite.config.ts @@ -36,11 +36,6 @@ export default defineConfig(({ mode }) => { server: { port: 5174, proxy: { - '/api/log': { - target: 'http://127.0.0.1:9006', - changeOrigin: true, - rewrite: (path: string) => path.replace(/^\/api/, ''), - }, '/api': { target: 'http://127.0.0.1:8081', changeOrigin: true }, }, },