feat(web): 顯示 Backup DR 治理證據
This commit is contained in:
@@ -261,6 +261,21 @@ export const apiClient = {
|
||||
const res = await fetch(`${API_BASE_URL}/agents/automation-backlog-snapshot`)
|
||||
return handleResponse<AiAgentAutomationBacklogSnapshot>(res)
|
||||
},
|
||||
|
||||
async getBackupDrTargetInventory() {
|
||||
const res = await fetch(`${API_BASE_URL}/agents/backup-dr-target-inventory`)
|
||||
return handleResponse<BackupDrTargetInventorySnapshot>(res)
|
||||
},
|
||||
|
||||
async getBackupDrReadinessMatrix() {
|
||||
const res = await fetch(`${API_BASE_URL}/agents/backup-dr-readiness-matrix`)
|
||||
return handleResponse<BackupDrReadinessMatrixSnapshot>(res)
|
||||
},
|
||||
|
||||
async getBackupNotificationPolicy() {
|
||||
const res = await fetch(`${API_BASE_URL}/agents/backup-notification-policy`)
|
||||
return handleResponse<BackupNotificationPolicySnapshot>(res)
|
||||
},
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
@@ -721,3 +736,126 @@ export interface AiAgentAutomationBacklogSnapshot {
|
||||
false
|
||||
>
|
||||
}
|
||||
|
||||
export interface BackupDrTargetInventorySnapshot {
|
||||
schema_version: 'backup_dr_target_inventory_v1'
|
||||
generated_at: string
|
||||
source_refs: string[]
|
||||
program_status: {
|
||||
overall_completion_percent: number
|
||||
current_priority: 'P0' | 'P1' | 'P2' | 'P3'
|
||||
current_task_id: string
|
||||
next_task_id: string
|
||||
read_only_mode: true
|
||||
}
|
||||
rollups: {
|
||||
total_targets: number
|
||||
by_status: Record<string, number>
|
||||
by_target_type: Record<string, number>
|
||||
by_gate_status: Record<string, number>
|
||||
blocked_target_ids: string[]
|
||||
}
|
||||
backup_targets: Array<{
|
||||
target_id: string
|
||||
display_name: string
|
||||
target_type: string
|
||||
status: string
|
||||
risk_level: 'low' | 'medium' | 'high' | 'critical'
|
||||
owner_host: string
|
||||
primary_script: string
|
||||
schedule: string
|
||||
rpo: string
|
||||
storage_class: string
|
||||
storage_ref: string
|
||||
offsite_policy: string
|
||||
automation_gate_status: string
|
||||
restore_gate_status: string
|
||||
secret_policy: string
|
||||
evidence_refs: string[]
|
||||
next_action: string
|
||||
}>
|
||||
approval_boundaries: Record<string, false>
|
||||
operation_boundaries: Record<string, boolean>
|
||||
}
|
||||
|
||||
export interface BackupDrReadinessMatrixSnapshot {
|
||||
schema_version: 'backup_dr_readiness_matrix_v1'
|
||||
generated_at: string
|
||||
source_target_inventory_ref: string
|
||||
source_refs: string[]
|
||||
program_status: {
|
||||
overall_completion_percent: number
|
||||
current_priority: 'P0' | 'P1' | 'P2' | 'P3'
|
||||
current_task_id: string
|
||||
next_task_id: string
|
||||
read_only_mode: true
|
||||
}
|
||||
rollups: {
|
||||
total_rows: number
|
||||
by_overall_readiness: Record<string, number>
|
||||
by_restore_drill_status: Record<string, number>
|
||||
by_offsite_status: Record<string, number>
|
||||
blocked_row_ids: string[]
|
||||
action_required_row_ids: string[]
|
||||
}
|
||||
readiness_rows: Array<{
|
||||
target_id: string
|
||||
display_name: string
|
||||
overall_readiness: string
|
||||
freshness_status: string
|
||||
integrity_status: string
|
||||
restore_drill_status: string
|
||||
offsite_status: string
|
||||
notification_policy: string
|
||||
gate_status: string
|
||||
evidence_level: string
|
||||
evidence_refs: string[]
|
||||
blocker_summary: string
|
||||
next_action: string
|
||||
}>
|
||||
approval_boundaries: Record<string, false>
|
||||
operation_boundaries: Record<string, boolean>
|
||||
}
|
||||
|
||||
export interface BackupNotificationPolicySnapshot {
|
||||
schema_version: 'backup_notification_policy_v1'
|
||||
generated_at: string
|
||||
source_readiness_matrix_ref: string
|
||||
source_refs: string[]
|
||||
program_status: {
|
||||
overall_completion_percent: number
|
||||
current_priority: 'P0' | 'P1' | 'P2' | 'P3'
|
||||
current_task_id: string
|
||||
next_task_id: string
|
||||
read_only_mode: true
|
||||
}
|
||||
rollups: {
|
||||
total_rules: number
|
||||
by_decision: Record<string, number>
|
||||
immediate_escalation_rule_ids: string[]
|
||||
suppressed_success_rule_ids: string[]
|
||||
}
|
||||
notification_channels: Array<{
|
||||
channel_id: string
|
||||
purpose: string
|
||||
immediate_allowed: boolean
|
||||
success_immediate_allowed: boolean
|
||||
requires_operator_action: boolean
|
||||
}>
|
||||
policy_rules: Array<{
|
||||
rule_id: string
|
||||
event_kind: string
|
||||
backup_state: string
|
||||
severity: string
|
||||
decision: string
|
||||
channels: string[]
|
||||
owner_agent: string
|
||||
requires_incident: boolean
|
||||
requires_approval_record: boolean
|
||||
message_contract: string
|
||||
evidence_refs: string[]
|
||||
}>
|
||||
daily_summary_contract: Record<string, unknown>
|
||||
approval_boundaries: Record<string, false>
|
||||
operation_boundaries: Record<string, boolean>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user