From 4c572aa57c98f39517015d982b1f1f406f770710 Mon Sep 17 00:00:00 2001 From: ogt Date: Fri, 10 Jul 2026 21:10:17 +0800 Subject: [PATCH] fix(iwooos): surface wazuh same-run closure on cockpit --- apps/web/src/app/[locale]/iwooos/page.tsx | 19 ++++++++++++++++++- apps/web/src/lib/api-client.ts | 5 +++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/[locale]/iwooos/page.tsx b/apps/web/src/app/[locale]/iwooos/page.tsx index 3d7ac6b6f..17e09dfb1 100644 --- a/apps/web/src/app/[locale]/iwooos/page.tsx +++ b/apps/web/src/app/[locale]/iwooos/page.tsx @@ -531,7 +531,7 @@ type IwoooSSecurityToolClosureSummary = IwoooSSecurityToolClosureReadbackRespons type IwoooSSecurityToolClosureQueueEntry = IwoooSSecurityToolClosureReadbackResponse['next_executable_queue'][number] const SECURITY_TOOL_CLOSURE_BOOTSTRAP_SUMMARY: IwoooSSecurityToolClosureSummary = { - source_readback_count: 8, + source_readback_count: 9, tool_track_count: 8, p0_tool_track_count: 3, source_ready_tool_track_count: 2, @@ -566,6 +566,11 @@ const SECURITY_TOOL_CLOSURE_BOOTSTRAP_SUMMARY: IwoooSSecurityToolClosureSummary owner_review_required_for_low_medium_high_count: 0, runtime_execution_performed_count: 0, secret_value_collection_allowed_count: 0, + wazuh_incident_response_closure_validator_available_count: 1, + wazuh_incident_response_same_run_stage_ready_count: 5, + wazuh_incident_response_same_run_required_stage_count: 9, + wazuh_incident_response_same_run_candidate_ready_count: 0, + wazuh_incident_response_runtime_closed_count: 0, } const SECURITY_TOOL_CLOSURE_BOOTSTRAP_TRACKS: IwoooSSecurityToolClosureTrack[] = [ @@ -820,6 +825,9 @@ const SECURITY_TOOL_CLOSURE_BOOTSTRAP_BOUNDARY_MARKERS = [ 'iwooos_security_tool_closure_wazuh_manager_registry_accepted_count=6', 'iwooos_security_tool_closure_alert_receipt_accepted_count=1', 'iwooos_security_tool_closure_controlled_apply_candidate_ready_count=2', + 'iwooos_wazuh_incident_response_same_run_stage_ready_count=5', + 'iwooos_wazuh_incident_response_same_run_required_stage_count=9', + 'iwooos_wazuh_incident_response_runtime_closed_count=0', 'owner_review_required_for_low_medium_high=false', 'runtime_execution_performed=false', 'secret_value_collection_allowed=false', @@ -16649,6 +16657,10 @@ function IwoooSSecurityToolClosureBoard() { const queue = data?.next_executable_queue?.length ? data.next_executable_queue : SECURITY_TOOL_CLOSURE_BOOTSTRAP_QUEUE const boundaryMarkers = data?.boundary_markers?.length ? data.boundary_markers : SECURITY_TOOL_CLOSURE_BOOTSTRAP_BOUNDARY_MARKERS const primaryQueue = queue[0] + const primarySameRunRequired = + primaryQueue.same_run_required_stage_count ?? summary.wazuh_incident_response_same_run_required_stage_count ?? 0 + const primarySameRunReady = + primaryQueue.same_run_source_stage_ready_count ?? summary.wazuh_incident_response_same_run_stage_ready_count ?? 0 const metrics: IwoooSSecurityToolClosureMetric[] = [ { key: 'closure', @@ -16821,6 +16833,11 @@ function IwoooSSecurityToolClosureBoard() { {t('compact.controlled')} + {primarySameRunRequired > 0 ? ( + = primarySameRunRequired ? '#315f43' : '#9a5d1d', padding: '4px 7px', fontSize: 10, fontWeight: 900, ...textWrap }}> + {t('compact.sameRun')}: {primarySameRunReady}/{primarySameRunRequired} + + ) : null} diff --git a/apps/web/src/lib/api-client.ts b/apps/web/src/lib/api-client.ts index 2e8125513..802402304 100644 --- a/apps/web/src/lib/api-client.ts +++ b/apps/web/src/lib/api-client.ts @@ -860,6 +860,11 @@ export interface IwoooSSecurityToolClosureReadbackResponse { owner_review_required_for_low_medium_high_count: number runtime_execution_performed_count: number secret_value_collection_allowed_count: number + wazuh_incident_response_closure_validator_available_count?: number + wazuh_incident_response_same_run_stage_ready_count?: number + wazuh_incident_response_same_run_required_stage_count?: number + wazuh_incident_response_same_run_candidate_ready_count?: number + wazuh_incident_response_runtime_closed_count?: number } tool_tracks: IwoooSSecurityToolClosureTrack[] next_executable_queue: IwoooSSecurityToolClosureQueueItem[]