mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 04:42:35 +08:00

* Add basic usage of K8s API for notification policies * Add permissions checks for navtree for routes * Add and update permissions for routing tree logic * Add capability to skip calling contact points hook * Conditionally show list of mute timings depending on permissions * Conditionally link to mute timings if user can see at least one * Add work in progress k8s handlers for routing tree * Update notification policy hooks * Wire up policies to permissions better (conditionally calling APIs) * Add additional checks for whether to show grafana AM * Add permission checks to access control * Remove accidental permissions after rebase * Update types and const for k8s routes * Improve statefulness and reset routing tree in tests * Update notif policy tests to check k8s and config API * Fix type assertion * Move non-grafana test out of .each * Make failure case safer * Override tag invalidation for notification policies API * Pass in error and add new error alert component * Add basic mock server conflict check * Add test to check user can save after a conflict * Add logic to allow reloading policies if changed by another user * Fix test * Update translations in Modals * Add ViewAlertGroups ability * Tweak provisioning logic and memoize AM config response * Update snapshots for useAbilities * Update result destructure * Use enums for provenance in routingtrees * Use consistent memoisation * Fix _metadata for vanilla AM * useAsync for error / update state * move k8s api error handling to separate file * use cause for error codes * Use `supported` bools from Alertmanager abilities and clarify default policy --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com> Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>