-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerting: Fix alert list panel showing firing alerts with no instances #50069
Conversation
@@ -122,15 +122,15 @@ function filterRules(props: PanelProps<UnifiedAlertListOptions>, rules: PromRule | |||
name.toLocaleLowerCase().includes(replacedName.toLocaleLowerCase()) | |||
); | |||
} | |||
if (Object.values(options.stateFilter).some((value) => value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the root of the problem, we only filtered alerts when any
of the state filters were true
, meaning that if no states were selected it would show firing alerts with 0 instances (they instances are filtered in GroupedModeView
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! Just one minor nit
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/20815 |
What this PR does / why we need it:
Fixes a bug where the alert list panel would show firing alerts with no instances.
Additionally it clarifies that no alerts are shown that match the current set of filters and indicates how many instances are not being shown (because they are hidden by at least one of the alert state filters).
Special notes for your reviewer: