From 95a8a3f87665c352dab27c76a369b9ee626c2f5d Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Tue, 16 Jun 2026 18:33:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20log-monitor=20=E2=86=92=20bug-colle?= =?UTF-8?q?ct=20=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 目录/文件/API/路由/侧边栏全部重命名 - API路径 /log/v1/ → /bugcollect/v1/ Co-Authored-By: Claude --- tenant-platform/src/api/log.ts | 146 --------------- .../src/views/log-monitor/LogEvents.vue | 150 ---------------- .../src/views/log-monitor/LogFunnels.vue | 120 ------------- .../src/views/log-monitor/LogIssueDetail.vue | 159 ---------------- .../src/views/log-monitor/LogIssues.vue | 151 ---------------- .../src/views/log-monitor/LogOverview.vue | 169 ------------------ .../src/views/log-monitor/LogRankFreq.vue | 72 -------- .../src/views/log-monitor/LogRankRisk.vue | 84 --------- .../src/views/log-monitor/LogWebhooks.vue | 153 ---------------- 9 files changed, 1204 deletions(-) delete mode 100644 tenant-platform/src/api/log.ts delete mode 100644 tenant-platform/src/views/log-monitor/LogEvents.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogFunnels.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogIssueDetail.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogIssues.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogOverview.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogRankFreq.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogRankRisk.vue delete mode 100644 tenant-platform/src/views/log-monitor/LogWebhooks.vue diff --git a/tenant-platform/src/api/log.ts b/tenant-platform/src/api/log.ts deleted file mode 100644 index 0bcd9b7..0000000 --- a/tenant-platform/src/api/log.ts +++ /dev/null @@ -1,146 +0,0 @@ -import client from './client' - -// ── Types ─────────────────────────────────────────────────────────────────── - -export interface LogOverview { - totalIssues: number - todayNewIssues: number - affectedUsers: number - crashRate: number - crashRateTrend: { date: string; rate: number }[] - topIssues: { id: string; title: string; type: string; count: number }[] -} - -export interface LogIssue { - id: string - title: string - type: string - platform: string - count: number - affectedUsers: number - lastSeenAt: string - firstSeenAt: string - status: string -} - -export interface LogIssueDetail { - id: string - title: string - type: string - platform: string - appVersion: string - osVersion: string - deviceModel: string - count: number - affectedUsers: number - firstSeenAt: string - lastSeenAt: string - status: string - stackTrace: string - sourceContext?: { line: number; content: string; highlight: boolean }[] - recentEvents: LogEventItem[] -} - -export interface LogEventItem { - id: string - eventName: string - userId: string - timestamp: string - properties: Record -} - -export interface LogIssueRanking { - id: string - title: string - type: string - platform: string - count: number - affectedUsers: number - riskScore?: number - lastSeenAt: string -} - -export interface LogFunnelStep { - eventName: string - count: number - conversionRate: number -} - -export interface LogWebhook { - id: string - url: string - eventTypes: string[] - cooldownSeconds: number - enabled: boolean - createdAt: string - updatedAt: string -} - -export interface LogPageResult { - content: T[] - page: number - size: number - totalElements: number - totalPages: number -} - -// ── API ───────────────────────────────────────────────────────────────────── - -export const logApi = { - // Overview - overview: () => client.get<{ data: LogOverview }>('/log/v1/overview'), - - // Issues - issues(params: { - type?: string - platform?: string - startDate?: string - endDate?: string - page?: number - size?: number - }) { - return client.get<{ data: LogPageResult }>('/log/v1/issues', { params }) - }, - - issueDetail(id: string) { - return client.get<{ data: LogIssueDetail }>(`/log/v1/issues/${id}`) - }, - - // Rankings - frequencyRanking() { - return client.get<{ data: LogIssueRanking[] }>('/log/v1/issues/rankings/frequency') - }, - - riskRanking() { - return client.get<{ data: LogIssueRanking[] }>('/log/v1/issues/rankings/risk') - }, - - // Events - events(params: { - eventName?: string - userId?: string - startDate?: string - endDate?: string - page?: number - size?: number - }) { - return client.get<{ data: LogPageResult }>('/log/v1/events', { params }) - }, - - // Funnel - funnel(steps: string[]) { - return client.get<{ data: LogFunnelStep[] }>('/log/v1/events/funnel', { - params: { steps: steps.join(',') }, - }) - }, - - // Webhooks - webhooks: { - list: () => client.get<{ data: LogWebhook[] }>('/log/v1/webhooks'), - create: (data: Omit) => - client.post<{ data: LogWebhook }>('/log/v1/webhooks', data), - update: (id: string, data: Partial>) => - client.put<{ data: LogWebhook }>(`/log/v1/webhooks/${id}`, data), - delete: (id: string) => client.delete(`/log/v1/webhooks/${id}`), - }, -} diff --git a/tenant-platform/src/views/log-monitor/LogEvents.vue b/tenant-platform/src/views/log-monitor/LogEvents.vue deleted file mode 100644 index 41d8312..0000000 --- a/tenant-platform/src/views/log-monitor/LogEvents.vue +++ /dev/null @@ -1,150 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogFunnels.vue b/tenant-platform/src/views/log-monitor/LogFunnels.vue deleted file mode 100644 index 1ed8366..0000000 --- a/tenant-platform/src/views/log-monitor/LogFunnels.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogIssueDetail.vue b/tenant-platform/src/views/log-monitor/LogIssueDetail.vue deleted file mode 100644 index 73adf67..0000000 --- a/tenant-platform/src/views/log-monitor/LogIssueDetail.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogIssues.vue b/tenant-platform/src/views/log-monitor/LogIssues.vue deleted file mode 100644 index 41b3ced..0000000 --- a/tenant-platform/src/views/log-monitor/LogIssues.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogOverview.vue b/tenant-platform/src/views/log-monitor/LogOverview.vue deleted file mode 100644 index b31b1a1..0000000 --- a/tenant-platform/src/views/log-monitor/LogOverview.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogRankFreq.vue b/tenant-platform/src/views/log-monitor/LogRankFreq.vue deleted file mode 100644 index 60221bb..0000000 --- a/tenant-platform/src/views/log-monitor/LogRankFreq.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogRankRisk.vue b/tenant-platform/src/views/log-monitor/LogRankRisk.vue deleted file mode 100644 index ed09c5a..0000000 --- a/tenant-platform/src/views/log-monitor/LogRankRisk.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/tenant-platform/src/views/log-monitor/LogWebhooks.vue b/tenant-platform/src/views/log-monitor/LogWebhooks.vue deleted file mode 100644 index 9c85965..0000000 --- a/tenant-platform/src/views/log-monitor/LogWebhooks.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - -