* Alerting docs: Update `View alert groups`
Rename to `View the status of notifications` and extend on this topic
* Update docs/sources/alerting/manage-notifications/view-alert-groups.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Update docs/sources/alerting/manage-notifications/view-alert-groups.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Update docs/sources/alerting/manage-notifications/view-alert-groups.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Use `1` always for numbered list
* refer to `grouping settings of notification policies`
* Update `View notification errors` with latest instructions
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Adding new export button
* Create Export as JSON drawer
* update scene drawer and add css
* update css
* Update ExportAsJson to be regular react component
* add tests to export menu and button
* add tests
* prettier and lint
* fix translations
* update translation
* Apply suggestions from code review
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* delete extra file
* Update to use SceneObject
* add spinner
* Rename ExportAsJSON.tsx to ExportAsJson.tsx
* update i18n
* Upate texts
* small fixes from code review
* add space
* i18n
* fix build issues
* changes from review feedback
* update test
* update test
---------
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* add very basic tests to verify storybook builds correctly
* add storybook step to drone
* reorder steps
* drone tweaks
* don't need host since it's set in env
* don't need to wait
* format build.star and readd wait
* install netcat in CI
* do a yarn install here to get correct bindings
* refactoring to hopefully work better in CI
* add wait-on
* add verbose logging
* localhost?
* more logging
* specify storybook host
* ...
* back to grafana-server
* does this work? 🤔
* run storybook e2e test after rgm-package so the backround process is running for less time
* split into separate step
* format
* Add basic button for adding a query template
* Add hook to create a template
* Handle notifications
* Add tags to invalidate cache
* Generate translations
* Updates types
* Add tests
* Simplify code
* Add user to type
* Add a better default title
* bring in piotrs pr and try to add user data
* Move out of metadata (reserved in k8s) and make new values exportable
* Show user data
* Fix bad merge
* WIP
* Add annotation data to FE
* add (failing) test
* Fix types and test
* Cleanup
* Enhance user data and send to component for display
* Fix type
* Fix expected values
* fix betterer
* Fix test
* Remove user lookup
* testing slug usage for api
* Revert "testing slug usage for api"
This reverts commit cc4556c3b7.
* change types, display userid if login isnt returned
* Simply display whatever is in property
* skip test on removed logic
* Try waiting for query to finish before eval
* Revert "Try waiting for query to finish before eval"
This reverts commit 6220cabd17.
* Handle attribute not existing when storage type is file
---------
Co-authored-by: Piotr Jamroz <pm.jamroz@gmail.com>
* Use runtime data source for getting events from alert state history in the bar chart
* extract translations
* refactor
* More refactor
* Update events limit
* Add info icon with tooltip info for label querying filter
* Add translations
* Create new useRuleHistoryRecords hook skipping extraction of common labels as they are not used
* Fix test
* update limit value for the events in the api to 5000
* Use state for rows key
* remove React import
* Address review comments
* Address review comments
* run prettier
* Remove duplicated handlers
* Alerting docs: adds silence RBAC 11.1
* ran prettier
* Improve docs with new rule-specific silence RBAC information
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* prettier
---------
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Alerting: Add setting for maximum allowed rule evaluation results
Added a new configuration setting `quota.alerting_rule_evaluation_results` to set the maximum number of alert rule evaluation results per rule. If the limit is exceeded, the evaluation will result in an error.
This PR reduces the number of allocations made while caching permissions from the database, fixes the hierarchy of spans and adds new spans for tracing.
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* feat(grafana-data): create rbac functions for checking permissions
* feat(grafana-runtime): pass current user to runtime
* feat(grafana-runtime): expose rbac functions to check permissions against current user
* refactor(contextsrv): use functions from grafana/data to check rbac permissions against user
* Apply suggestions from code review
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* chore(rbac): fix missing types imports
* refactor(rbac): make exposed functions return boolean
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* add method CanReadAllRules to rule authorization service
* add alias type Namespace for Folder in ngalert's models package. It implements the Namespacer interface that is used by authz logic
* update state history's backends to authorize access to rules.
* update Loki to add folders UIDs to query.
* Update BuildLogQuery to drop filter by folders if it's too long and fall back to in-memory filtering.