mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-11 21:28:15 +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:
parent
78c3434061
commit
a0580db62d
1 changed files with 2 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue