Adds a new "Allow as recording rules target" toggle to Prometheus datasource configuration that controls whether the datasource can be selected as a target for writing recording rules.
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Add to available channels
* Export
* Fix bug in deeply nested secrets
BE: Slice re-use bug when traversing deeply.
FE: Only at most one level of nesting was being taken into account
when determining secureFields keys. This change adds a new field on
NotificationChannelOption: secureFieldKey. This is populated on API GET via
transform. This change gives us the option to hardcode secureFieldKey in the
backend and no longer calculate the key via settings topology.
* Update grafana/alerting to 3e20fda3b872
* Prettier
* Linting
* Fix IntegrationConfig test to catch secure field mismatch
* Add group and namespace filtering for GMA rules
* Add group and namespace filtering for DMA rules
* Fix view mode handling
* Preserve group and namespace filters when switching views
* update "no rules" logic for Grafana managed rules
* use groupFilter function for filter logic
* Add populateCache docs, tidy up api consts
* Fix imports in tests
* Fix failing import tests
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Alerting: Use default_datasource_uid as the default target for recording rules
* Add tests
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
The help text for active timings on an alert was confusing, indicating that the time range would cause the alert not to
notify, when it actually works as the only time the alert would notify.
* Add export folder action to the new list view
* merge folder actions in one more button
* fix checking permissions
* remove commented code
* early return when no bulkactions are allowed
* fix css width
* address review comments
* move BulkActions component outside the parent component
* remove unnecessary check
* bring back accidentally removed code
* remove duplicated modal
* re-organize folders regarding import feature
* Revert folder changes
* Add Yaml import input fields
* Set recording rules target if empty
* wip
* Convert YAML content to RulerRulesConfigDTO and use this for the import payload
* fixing some issues
* wip
* add tracking
* use yaml filename for namespace in case is not specified in the yaml content
* refactor
* add alertingImportYAMLUI ff check for yaml option
* Add test for parseYamlToRulerRulesConfigDTO
* move import feature to the More menu at the top
* add test for filterRulerRulesConfig, and fix the function
* extract parseYamlToRulerRulesConfigDTO to a separate file
* Add permission check for the import button
* Change data flow in import form, add basic tests for the import form
* remove commented code
* Add yaml import form test
* Add more tests
* Tidy up, remove type assertions in yaml converter
* Improve yaml file validation in the form
* Fix lint issues
* Fix lint
* use only Admin role for checking if the feature is available for the user
* Fix parsing recording rules
* Fix file re-selection in YAML import
* prettier
* refactor
* Remove FileReader, add more explanation to file upload reset
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* Add empty state handling for GMA rules
* Add handing empty states for Grafana and Datasource rules
* Update translations, fix lint errors
* Add empty state translation
* WIP layout update
* implement hover styles
* update pagination
* fix list item indent
* clean up actions part 1
* only apply text fill to v2 list view
* add missing returnTo for rule viewer
* fix list styles for list view
* i18n
* update bulk actions to regular folder actions for list v2
* fix a few tests
* simplify paginated loaders for new list view
* i18n
* more UI feedback
* fix test
* comment
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>