From e4f869e0c754d0246513bd9cd7f683a8de2c985f Mon Sep 17 00:00:00 2001 From: IanShaw <131567472+IanShaw027@users.noreply.github.com> Date: Wed, 19 Aug 2026 23:13:47 -0700 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BF=90=E7=BB=B4=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E8=AF=A6=E6=83=85=E5=85=BC=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/i18n/__tests__/opsLocaleKeys.spec.ts | 14 ++++ frontend/src/i18n/locales/en/admin/ops.ts | 9 +++ frontend/src/i18n/locales/zh/admin/ops.ts | 9 +++ .../ops/components/OpsErrorDetailModal.vue | 73 ++++++++++++++--- .../__tests__/OpsErrorDetailModal.spec.ts | 79 +++++++++++++++++++ 5 files changed, 173 insertions(+), 11 deletions(-) create mode 100644 frontend/src/views/admin/ops/components/__tests__/OpsErrorDetailModal.spec.ts diff --git a/frontend/src/i18n/__tests__/opsLocaleKeys.spec.ts b/frontend/src/i18n/__tests__/opsLocaleKeys.spec.ts index d44a47dbc..4f5cdd4e3 100644 --- a/frontend/src/i18n/__tests__/opsLocaleKeys.spec.ts +++ b/frontend/src/i18n/__tests__/opsLocaleKeys.spec.ts @@ -21,6 +21,13 @@ describe('ops locale key completeness', () => { 'admin.ops.timeRange.custom', 'admin.ops.customTimeRange.startTime', 'admin.ops.customTimeRange.endTime', + 'admin.ops.errorDetail.upstreamStatus', + 'admin.ops.errorDetail.rootCause', + 'admin.ops.errorDetail.diagnosticPayloads', + 'admin.ops.errorDetail.payloads.client', + 'admin.ops.errorDetail.payloads.upstream_message', + 'admin.ops.errorDetail.payloads.upstream_detail', + 'admin.ops.errorDetail.payloads.upstream_events', ] for (const key of requiredKeys) { @@ -29,6 +36,13 @@ describe('ops locale key completeness', () => { expect(enKeys).toContain(key) }) } + + for (const key of requiredKeys) { + it(`zh locale has ${key}`, () => { + const zhKeys = flattenKeys(zh) + expect(zhKeys).toContain(key) + }) + } }) describe('groups locale key completeness', () => { diff --git a/frontend/src/i18n/locales/en/admin/ops.ts b/frontend/src/i18n/locales/en/admin/ops.ts index 8210b789a..fe6a7a28b 100644 --- a/frontend/src/i18n/locales/en/admin/ops.ts +++ b/frontend/src/i18n/locales/en/admin/ops.ts @@ -339,7 +339,16 @@ export default { time: 'Time', phase: 'Phase', status: 'Status', + upstreamStatus: 'Upstream Status', message: 'Message', + rootCause: 'Root Cause', + diagnosticPayloads: 'Diagnostic Payloads', + payloads: { + client: 'Client Response', + upstream_message: 'Upstream Message', + upstream_detail: 'Upstream Detail', + upstream_events: 'Upstream Events' + }, basicInfo: 'Basic Info', platform: 'Platform', model: 'Model', diff --git a/frontend/src/i18n/locales/zh/admin/ops.ts b/frontend/src/i18n/locales/zh/admin/ops.ts index 3c8e9b044..1e521c891 100644 --- a/frontend/src/i18n/locales/zh/admin/ops.ts +++ b/frontend/src/i18n/locales/zh/admin/ops.ts @@ -339,7 +339,16 @@ export default { time: '时间', phase: '阶段', status: '状态码', + upstreamStatus: '上游状态码', message: '消息', + rootCause: '根因', + diagnosticPayloads: '诊断载荷', + payloads: { + client: '客户端响应', + upstream_message: '上游消息', + upstream_detail: '上游详情', + upstream_events: '上游事件' + }, basicInfo: '基本信息', platform: '平台', model: '模型', diff --git a/frontend/src/views/admin/ops/components/OpsErrorDetailModal.vue b/frontend/src/views/admin/ops/components/OpsErrorDetailModal.vue index 348eba297..407c671ca 100644 --- a/frontend/src/views/admin/ops/components/OpsErrorDetailModal.vue +++ b/frontend/src/views/admin/ops/components/OpsErrorDetailModal.vue @@ -93,6 +93,15 @@ +
{{ prettyJSON(primaryResponseBody || '') }}
+ {{ prettyJSON(section.value) }}
+