fix(awooop): surface ansible apply proof
Some checks failed
CD Pipeline / tests (push) Successful in 1m28s
Code Review / ai-code-review (push) Successful in 12s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-05-31 16:18:33 +08:00
parent 2022eaa9e8
commit 497e36ba9d
10 changed files with 468 additions and 17 deletions

View File

@@ -92,10 +92,22 @@ export interface AwoooPStatusChain {
record_total?: number | null;
candidate_count?: number | null;
not_used_reason?: string | null;
check_mode_total?: number | null;
apply_total?: number | null;
rollback_total?: number | null;
pending_check_mode_total?: number | null;
applied_success_total?: number | null;
applied?: boolean | null;
controlled_apply?: boolean | null;
latest_operation_type?: string | null;
latest_status?: string | null;
latest_catalog_id?: string | null;
latest_playbook_path?: string | null;
latest_execution_mode?: string | null;
latest_check_mode?: string | null | boolean;
latest_returncode?: string | number | null;
latest_apply_executed?: boolean | null;
approval_source?: string | null;
candidate_playbooks?: Array<{
catalog_id?: string | null;
playbook_path?: string | null;
@@ -341,6 +353,7 @@ export function AwoooPStatusChainPanel({
const candidatePlaybook = ansible.candidate_playbooks?.[0];
const selectedPlaybook = execution.playbook_paths?.[0]
?? execution.playbook_ids?.[0]
?? ansible.latest_catalog_id
?? ansible.latest_playbook_path
?? candidatePlaybook?.playbook_path
?? candidatePlaybook?.catalog_id
@@ -408,13 +421,19 @@ export function AwoooPStatusChainPanel({
key: "playbook",
Icon: Wrench,
tone: (ansible.considered || (ansible.candidate_count ?? 0) > 0
? (ansible.latest_status === "applied" ? "success" : "warning")
? (ansible.applied || (ansible.apply_total ?? 0) > 0 ? "success" : "warning")
: "neutral") as SourceFlowTone,
label: t("toolchain.playbook"),
value: selectedPlaybook,
detail: t("toolchain.playbookDetail", {
ansible: boolValue(ansible.considered, emptyLabel),
candidates: ansible.candidate_count ?? 0,
check: ansible.check_mode_total ?? 0,
apply: ansible.apply_total ?? 0,
mode: valueOrEmpty(ansible.latest_execution_mode, emptyLabel),
rc: valueOrEmpty(ansible.latest_returncode, emptyLabel),
approval: valueOrEmpty(ansible.approval_source, emptyLabel),
catalog: valueOrEmpty(ansible.latest_catalog_id, emptyLabel),
checkMode: valueOrEmpty(ansible.latest_check_mode, emptyLabel),
status: ansible.latest_status ?? emptyLabel,
}),