From 8450c989aaaf25da5b4a19b45662380e6336784f Mon Sep 17 00:00:00 2001 From: ogt Date: Wed, 15 Jul 2026 18:18:55 +0800 Subject: [PATCH] fix(iwooos): scope aggregate same-run status --- .../security-asset-control-plane-cockpit.tsx | 61 ++++++++++++++++--- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/apps/web/src/components/iwooos/security-asset-control-plane-cockpit.tsx b/apps/web/src/components/iwooos/security-asset-control-plane-cockpit.tsx index 07b5649e1..feeca669d 100644 --- a/apps/web/src/components/iwooos/security-asset-control-plane-cockpit.tsx +++ b/apps/web/src/components/iwooos/security-asset-control-plane-cockpit.tsx @@ -37,6 +37,10 @@ type Copy = { nist: string; siem: string; strictRun: string; + aggregateVerified: string; + aggregateOpen: string; + aggregateScopeNote: string; + aggregateCountsTitle: string; verified: string; functions: string; framework: string; @@ -88,7 +92,11 @@ const COPY: Record<"zh" | "en", Copy> = { assetTypes: "資產類型", nist: "NIST 控制", siem: "SIEM 閉環", - strictRun: "同 run 閉環", + strictRun: "全域 AI run", + aggregateVerified: "全域已驗證", + aggregateOpen: "全域未閉環", + aggregateScopeNote: "不代表目前 Wazuh lane", + aggregateCountsTitle: "全域 AI run 階段收據", verified: "24h 已驗證", functions: "治理六功能", framework: "完整資安框架", @@ -121,8 +129,8 @@ const COPY: Record<"zh" | "en", Copy> = { failed: "失敗", failedCollectors: "失敗 Collector", failedCollectorsUnavailable: "失敗原因待安全分類", - sameRunMissing: "尚無同 run 閉環證據", - sameRunVerified: "18 段同 run 閉環已驗證", + sameRunMissing: "全域 AI run 尚未閉環;不代表目前 Wazuh lane", + sameRunVerified: "全域 AI run 已驗證;不代表目前 Wazuh lane", loading: "正在載入資安控制平面", unavailable: "Live readback 無法取得", refresh: "重新整理資安控制平面", @@ -138,7 +146,11 @@ const COPY: Record<"zh" | "en", Copy> = { assetTypes: "Asset types", nist: "NIST control", siem: "SIEM closure", - strictRun: "Same-run closure", + strictRun: "Aggregate AI run", + aggregateVerified: "Aggregate verified", + aggregateOpen: "Aggregate open", + aggregateScopeNote: "Does not represent the current Wazuh lane", + aggregateCountsTitle: "Aggregate AI run stage receipts", verified: "Verified 24h", functions: "Six functions", framework: "Security framework", @@ -171,8 +183,8 @@ const COPY: Record<"zh" | "en", Copy> = { failed: "Failed", failedCollectors: "Failed collectors", failedCollectorsUnavailable: "Failure detail awaiting safe classification", - sameRunMissing: "No same-run closure evidence", - sameRunVerified: "18-stage same-run closure verified", + sameRunMissing: "Aggregate AI run is open; this is not the current Wazuh lane", + sameRunVerified: "Aggregate AI run is verified; this is not the current Wazuh lane", loading: "Loading security control plane", unavailable: "Live readback unavailable", refresh: "Refresh security control plane", @@ -230,20 +242,42 @@ function MetricCell({ label, value, icon: Icon, + detail, + testId, + title, }: { label: string; value: string | number; icon: typeof ShieldCheck; + detail?: string; + testId?: string; + title?: string; }) { return ( -
+
-
+
{value}
+ {detail ? ( +
+ {detail} +
+ ) : null}
); } @@ -563,10 +597,19 @@ export function SecurityAssetControlPlaneCockpit({ label={copy.strictRun} value={ payload - ? `${payload.ai_automation.strict_runtime_completion.present_stage_count}/${payload.ai_automation.strict_runtime_completion.required_stage_count}` + ? payload.ai_automation.strict_runtime_completion.closed + ? copy.aggregateVerified + : copy.aggregateOpen : "--" } icon={Bot} + detail={payload ? copy.aggregateScopeNote : undefined} + testId="security-aggregate-ai-run-status" + title={ + payload + ? `${copy.strictRun}: ${payload.ai_automation.strict_runtime_completion.closed ? copy.aggregateVerified : copy.aggregateOpen}. ${copy.aggregateCountsTitle}: ${payload.ai_automation.strict_runtime_completion.present_stage_count}/${payload.ai_automation.strict_runtime_completion.required_stage_count}. ${copy.aggregateScopeNote}` + : undefined + } />