refactor: only show critical/warning patrol findings

Filter out 'watch' and 'info' severity findings from the API response.
These lower-severity findings were mostly noise:
- 'watch': CPU is 35% instead of 11% (who cares)
- 'info': Stopped container exists (knew that)

Now only showing actionable findings:
- critical: Something is broken NOW
- warning: Something needs attention soon

Users prefer silence to noise.
This commit is contained in:
rcourtman 2025-12-21 18:34:51 +00:00
parent bc5b0d7584
commit 6fe207a094

View file

@ -1359,8 +1359,10 @@ func (p *PatrolService) GetRunHistory(limit int) []PatrolRunRecord {
}
// GetAllFindings returns all active findings sorted by severity
// Only returns critical and warning findings - watch/info are filtered out as noise
func (p *PatrolService) GetAllFindings() []*Finding {
findings := p.findings.GetActive(FindingSeverityInfo)
findings := p.findings.GetActive(FindingSeverityWarning)
// Sort by severity (critical first) then by time
severityOrder := map[FindingSeverity]int{