mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-20 02:09:41 +00:00
fix: exclude watch from patrol status summary
Since watch/info findings are filtered from the UI and never shown to users, don't include them in the patrol run status summary. This makes the summary consistent with what users actually see.
This commit is contained in:
@@ -872,7 +872,8 @@ func (p *PatrolService) runPatrol(ctx context.Context) {
|
||||
summary := p.findings.GetSummary()
|
||||
var findingsSummaryStr string
|
||||
var status string
|
||||
totalActive := summary.Critical + summary.Warning + summary.Watch
|
||||
// Only count critical and warning as active issues (watch/info are filtered from UI)
|
||||
totalActive := summary.Critical + summary.Warning
|
||||
if totalActive == 0 {
|
||||
findingsSummaryStr = "All healthy"
|
||||
status = "healthy"
|
||||
@@ -884,9 +885,6 @@ func (p *PatrolService) runPatrol(ctx context.Context) {
|
||||
if summary.Warning > 0 {
|
||||
parts = append(parts, fmt.Sprintf("%d warning", summary.Warning))
|
||||
}
|
||||
if summary.Watch > 0 {
|
||||
parts = append(parts, fmt.Sprintf("%d watch", summary.Watch))
|
||||
}
|
||||
findingsSummaryStr = fmt.Sprintf("%s", joinParts(parts))
|
||||
if summary.Critical > 0 {
|
||||
status = "critical"
|
||||
|
||||
Reference in New Issue
Block a user