(decision)
| 59 | } |
| 60 | |
| 61 | function statusForDecision(decision) { |
| 62 | if (decision.outcome === 'idle') return 'idle'; |
| 63 | if (decision.outcome === 'repair-available') return 'repair-ready'; |
| 64 | if (decision.outcome === 'needs-human') return 'approval-needed'; |
| 65 | if (decision.outcome === 'failed') return 'failed'; |
| 66 | if (decision.outcome === 'max-steps-reached') return 'needs-review'; |
| 67 | return decision.outcome || 'unknown'; |
| 68 | } |
| 69 | |
| 70 | function summarizeDashboard(snapshot) { |
| 71 | const campaigns = snapshot.campaigns || []; |