From f74454f00a22893ea7010b4ba3c6b6b4a8b621d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=9B=E5=85=AE?= Date: Thu, 11 Jun 2026 21:07:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=82=E9=85=8D=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=81=A5=E5=BA=B7=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/devops.ts | 4 ++-- src/services/devopsApi.ts | 7 +++++-- src/types/devops.ts | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mocks/devops.ts b/src/mocks/devops.ts index 6797dde..9975952 100644 --- a/src/mocks/devops.ts +++ b/src/mocks/devops.ts @@ -100,12 +100,12 @@ export const integrations: IntegrationStatus[] = [ key: 'gitea', name: 'Gitea', state: 'healthy', - summary: '四个仓库 mock 同步完成,生产发布优先 tag', + summary: '纳管仓库 mock 同步完成,生产发布按项目策略选择 ref/tag', checkedAt: '2026-06-11 17:40', latencyMs: 42, }, { - key: 'wecom', + key: 'notification', name: '通知平台', state: 'warning', summary: '机器人未配置,当前保留企微/飞书/通用 webhook 方案', diff --git a/src/services/devopsApi.ts b/src/services/devopsApi.ts index 16cab72..bd4ed60 100644 --- a/src/services/devopsApi.ts +++ b/src/services/devopsApi.ts @@ -372,7 +372,7 @@ function toIntegrationStatuses(health: BackendHealth): IntegrationStatus[] { return [ toIntegrationStatus('jenkins', 'Jenkins', health), toIntegrationStatus('gitea', 'Gitea', health), - toIntegrationStatus('wecom', '通知平台', health), + toIntegrationStatus('notification', '通知平台', health), toIntegrationStatus('llm', 'LLM Agent', health), ] } @@ -382,7 +382,10 @@ function toIntegrationStatus( name: string, health: BackendHealth, ): IntegrationStatus { - const dependency = health.dependencies[key] ?? { status: 'unavailable' as const } + const dependency = + health.dependencies[key] ?? + (key === 'notification' ? health.dependencies.wecom : undefined) ?? + { status: 'unavailable' as const } return { key, diff --git a/src/types/devops.ts b/src/types/devops.ts index a6b4139..029afa0 100644 --- a/src/types/devops.ts +++ b/src/types/devops.ts @@ -66,7 +66,7 @@ export interface IntegrationConfigStatus { } export interface IntegrationStatus { - key: 'jenkins' | 'gitea' | 'wecom' | 'llm' + key: 'jenkins' | 'gitea' | 'notification' | 'wecom' | 'llm' name: string state: HealthState summary: string