Addresses part of https://github.com/prometheus/prometheus/issues/16515
For now, I'm adding very similar filtering to the /rules page as we have on
the /alerts page, with the difference being:
* The state filter filters by rule health (ok/warn/unknown) instead of
alert state (firing/pending/inactive)
* We don't collect & show detailed stats on the different state counts as
we do on the /alerts page
There is a lot of copied / very similar code between those two pages (and
also some others) around filtering and pagination, so maybe there is an
opportunity for more code sharing in the future here.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Technically, we are not filtering by the state of a single rule, but by the
whole rule group state (if even a single alert is firing within a group,
filtering for "Pending" won't show the group, even if it has pending
alerts).
Signed-off-by: Julius Volz <julius.volz@gmail.com>
As discussed in https://github.com/prometheus/prometheus/issues/15717, this
should help show more information on one screen, to be more similar to the
old UI in this regard.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Also change the SD page setting for this to be in localStorage, as on the
other pages.
Should help a tiny bit with https://github.com/prometheus/prometheus/issues/16308
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Just like for showing empty groups on the Alerts page, also make the
setting for showing empty pools on the Targets page persistent.
Signed-off-by: leonnicolas <leonloechner@gmx.de>
It can be a bit annoying to always press "hide empty rules". This commit
uses the session storage of the browser to make it persistent.
Signed-off-by: leonnicolas <leonloechner@gmx.de>
This addresses extreme slowness when you have thousands of rules in
potentially hundreds of rule groups. It can still be a bit slow even with
pagination and infinite scroll for very large use cases, but it's much
better already than before.
Fixes https://github.com/prometheus/prometheus/issues/15551
Signed-off-by: Julius Volz <julius.volz@gmail.com>