This commit better defines how we set states in resultNormal,
resultAlerting, resultError and resultNoData. It changes the existing
code to call methods such as SetAlerting, SetPending, SetNormal,
SetError and NoData instead of assigning values to each individual field
whenever the state is changed. This should make it easier to understand
what fields should be set for which states and avoid cases where states are
missing, or have additional unexpected fields.
* Put traceID on top
* Update exemplar popover styles
* Remove console.log
* Make exemplar header opt-in via optional prop
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* Update dependency @reduxjs/toolkit to v1.9.0
* fix types on mockToolkitActionCreator
* Fix external AM selector tests
* timeout added in shared public dashboard test
* Revert "timeout added in shared public dashboard test"
This reverts commit 205c295192.
* update to @reduxjs/toolkit@1.9.1
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
Before this change, the alerting provisioning system incorrectly used
the QuotaTarget to check if alerting's request quota had been reached.
The quota service requires the QuotaTargetSrv, which is what's
registered with the service at startup time. This is leading to errors
in the provisioning system.
* block move operation that could introduce more than 8 level of depth, forbid circular reference
* move getHeight to store, mock store in service
* fix linter
* usageinsights: record events for Explore queries
* usageinsights: make the source field optional
It is not logical to have it for an event like the dashboard-view
* usageinsights: add comment to Explore test
Explain why we are reversing a previous decision
* Fix RuleEditor flaky test for existing grafana managed alert
* Fix RuleEditor flaky test for creating a new grafana managed alert
* Fix tests for cloud rules
* Split tests for different rule types
* Move common clickSelectOption method to helpers
* Remove from RuleEditorCloudRules.test.tsx a repeated cloud rule test
* Move existing grafana rule test case to a new file
* Split RuleEditorCloudRules test: move checking only allowed data sources test case to a new test file
* Re-use common ui const
* Re-use renderRuleEditor method
* Create getDiscoverFeaturesMock to reduce code
* Auth: Session cache [v9.2.x] (#59907)
* add cache wrapper
only cache token if not to rotate
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
anticipate next rotation
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 07a4b2343d)
* FeatureToggle: for storing sessions in a Remote Cache
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
(cherry picked from commit b8a8c15148)
* use feature flag for session cache
* ensure ttl is minimum 1 second
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* ensure 2 ttl window to prevent caching of tokens near rotation
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* fix description of toggle
Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 2919588a82)
* fix broken quota test