grafana/public/app/features/alerting
Sonia Aguilar 64ee42d01e
Alerting: Add limits and move state and label matching filters to the BE (#66267)
* WIP

* Add instance totals to combined rule. Use totals to display instances stats in the UI

* WIP

* add global summaries, fix TS errors

* fix useCombined test

* fix test

* use activeAt from rule when available

* Fix NaN in global stats

* Add no data total to global summary

* Add totals recalculation for filtered rules

* Fix instances totals, remove instances filtering from alert list view

* Update tests

* Fetch alerts considering filtering label matchers

* WIP - Fetch alerts appending state filter to endpoint

* Fix multiple values for state in request being applyied

* fix test

* Calculate hidden by for grafana managed alerts

* Use INSTANCES_DISPLAY_LIMIT constant for limiting alert instances instead of 1

* Rename matchers parameter according to API changes

* Fix calculating total number of grafana instances

* Rename matcher prop after previous change

* Display button to remove max instances limit

* Change matcher query param to be an array of strings

* Add test for paramsWithMatcherAndState method

* Refactor matcher to be an string array to be consistent with state

* Use matcher query string as matcher object type (encoded JSON)

* Avoind encoding matcher parameters twice

* fix tests

* Enable toggle for the limit/show all button and restore limit and filters when we come back from custom view

* Move getMatcherListFromString method to utils/alertmanager.ts

* Fix limit toggle button being shown when it's not necessary

* Use filteredTotals from be response to calculate hidden by count

* Fix variables not being replaced correctly

* Fix total shown to be all the instances filtered without limits

* Adress some PR review comments

* Move paramsWithMatcherAndState inside prometheusUrlBuilder method

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
2023-04-25 11:19:20 +02:00
..
components Alerting: Update legacy alerting warning (#66269) 2023-04-17 11:02:29 +03:00
partials Chore: Migrates remaining Angular modals to React (#33476) 2021-04-28 15:22:28 +02:00
state Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
unified Alerting: Add limits and move state and label matching filters to the BE (#66267) 2023-04-25 11:19:20 +02:00
utils Dashboards: Filter out expressions when going to Explore (#64654) 2023-03-13 07:53:19 -05:00
AlertHowToModal.tsx enable img-redundant-alt rule (#55833) 2022-09-27 10:26:32 -04:00
AlertRuleItem.test.tsx Chore: Remove remaining IconName type assertions (#54658) 2022-09-06 09:15:36 +01:00
AlertRuleItem.tsx React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
AlertRuleList.test.tsx AppChrome: Unify logic for chromeless pages that should not have NavBar, CommandPalette, Search etc (#62281) 2023-02-02 09:53:06 +01:00
AlertRuleList.tsx any/type assertion fixes (#57009) 2022-10-17 10:10:10 +01:00
AlertTab.tsx Chore: Remove remaining IconName type assertions (#54658) 2022-09-06 09:15:36 +01:00
AlertTabCtrl.test.ts Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
AlertTabCtrl.ts Build: Replace babel-loader with esbuild-loader (#57837) 2023-01-23 12:15:05 +01:00
AlertTabIndex.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
EditNotificationChannelPage.tsx Update a few more pages to use navId instead of navModel from store (#55342) 2022-09-19 13:21:41 +02:00
FeatureTogglePage.tsx TopNav: New page layouts (#51510) 2022-07-06 17:00:56 +02:00
getAlertingValidationMessage.test.ts Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
getAlertingValidationMessage.ts Dashboard: replace datasource name with a reference object (#33817) 2021-10-29 10:57:24 -07:00
NewNotificationChannelPage.tsx TopNav: New page layouts (#51510) 2022-07-06 17:00:56 +02:00
NotificationsListPage.tsx Chore: Upgrade to react 18 (#64428) 2023-04-11 10:51:54 +01:00
routes.tsx Chore: Clean up old navigation (#66287) 2023-04-14 09:43:11 +01:00
StateHistory.tsx Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
TestRuleResult.test.tsx Chore: Upgrade to react 18 (#64428) 2023-04-11 10:51:54 +01:00
TestRuleResult.tsx Alerting: a11y improvements (#63072) 2023-02-10 10:23:40 +01:00