* Implement basic behavior of stateless annotation
* Fix ds defined getting lost
* Fix linter
* adjust test to be aligned with datasources not automatically being assigned to the model
* Add unit test for annotations
---------
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* switch to useLayoutEffect so queries run after url correction
* add comment
* suparate useEffects to avoid update on slug change
* add url correction for missing slug
* account for slug change during dashboard rename
* simplify fix
* add e2e test for data link without slug
* remove old comment
* remove newly added path from useEffect dependencies
* AuthZ: Configure cache ttl
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Client side conf
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* 0 -> No caching
* Make it possible to disable cache on the remote client as well
* Comment
* Move ttl parsing up for in-proc to have it
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Move filtering code to generators for performance reasons
Discarding rules and groups early in the iterable chain limits the number of promises we need to wait for which improves performance significantly
* Add error handling for generators
* Add support for data source filter for GMA rules
* search WIP fix
* Fix datasource filter
* Move filtering back to filtered rules hook, use paged groups for improved performance
* Add queriedDatasources field to grafana managed rules and update filtering logic to rely on it
- Introduced a new field `queriedDatasources` in the AlertingRule struct to track data sources used in rules.
- Updated the Prometheus API to populate `queriedDatasources` when creating alerting rules.
- Modified filtering logic in the ruleFilter function to utilize the new `queriedDatasources` field for improved data source matching.
- Adjusted related tests to reflect changes in rule structure and filtering behavior.
* Add FilterView performance logging
* Improve GMA Prometheus types, rename queried datasources property
* Use custom generator helpers for flattening and filtering rule groups
* Fix lint errors, add missing translations
* Revert test condition
* Refactor api prom changes
* Fix lint errors
* Update backend tests
* Refactor rule list components to improve error handling and data source management
- Enhanced error handling in FilterViewResults by logging errors before returning an empty iterable.
- Simplified conditional rendering in GrafanaRuleLoader for better readability.
- Updated data source handling in PaginatedDataSourceLoader and PaginatedGrafanaLoader to use new individual rule group generator.
- Renamed toPageless function to toIndividualRuleGroups for clarity in prometheusGroupsGenerator.
- Improved filtering logic in useFilteredRulesIterator to utilize a dedicated function for data source type validation.
- Added isRulesDataSourceType utility function for better data source type checks.
- Removed commented-out code in PromRuleDTOBase for cleaner interface definition.
* Fix abort controller on FilterView
* Improve generators filtering
* fix abort controller
* refactor cancelSearch
* make states exclusive
* Load full page in one loadResultPage call
* Update tests, update translations
* Refactor filter status into separate component
* hoist hook
* Use the new function for supported rules source type
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This makes it so that it is:
- No longer required to have datasource permissions to delete a rule.
- No longer required to have datasource permissions to update non-query related fields of a rule.
* Add function for retrieving logs table plan
- Add URL builder method
- Add types
* Add auto-switching for basic logs tables
* Set dashboardTime property
* Ensure useEffect doesn't run on every query change
* Fix basicLogs property
* Add isLoading for schema
* wip
* Add prom flavor support for data source variables and export/import dashboards (#103321)
* add dashboard and data source var selection
* use match plugin id instead
* use updated matchpluginid
* formatting
* cleanup
* regex anchor
* update error msg
* Alerting: Clean up prometheus-flavored types and functions (#103703)
* clean up types and utility functions for dealing with
prometheus-flavored data sources
* Refactor alerting datasource types to use constants as source of truth
* Alerting: Clean up prometheus-flavored types and functions on the bac… (#103716)
Alerting: Clean up prometheus-flavored types and functions on the backend
* add matchPluginId tests
* Update matchPluginId func to bidirectional (#103746)
* update matchpluginid func to bidirectional
* lint
* formatting
* use actual isSupportedExternalRulesSourceType in test
* add tests in datasource_srv
* betterer
* remove type assertion
* remove unnecessary case
* use satisifies to not have to convert tuple to an array of string
* add prometheus_flavor test
---------
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Alexander Akhmetov <me@alx.cx>
* LogLabels: add displayMax property
* MetaInfoText: prevent label wrapping
* LogsMetaRow: remove unescaped content and max characters
* LogsMetaRow: use font weight normal
* LogLabels: add button to collapse back
* LogsMetaRow: set line height
* LogsMetaRow: save common logs state
* LogsMetaRow: update unit tests
* LogLabels: update unit test
* LogListContext: add forceEscape option
* LogListContext: move forceEscape and hasUnescapedContents
* LogListControls: move forceEscape to controls
* LogList: read forceEscape from context
* i18n
* LogListControls: test new control
* Update betterer
* logsModel: update test
* LogLabels: replace characters with icons
* Prettier
* LogLabels: add aria labels
* i18n
* Update tests
* Update test
* detect target folder rules and show warning
* show detected rules in target folder in a collapsed section
* fix detecting rules that might be overwritten
* refactor
* remove undefined
* fix text