* 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>
* Making expressions depend on backend parameter instead of alerting
* Fallback to old behavior just in case we have weird edge cases
* adding render test for the button
* prettier fixes
* Allow html in tooltips
* Display multiple warnings/infos properly with html
* Revert "Allow html in tooltips"
This reverts commit 5c7e965d2d554b693d4897e52cf6865e0c9b8374.
* Display multiple warnings/infos properly with html in ReactNode
* Fix lint
* Revise according to code review
* Revise according to code review part 2
* Revise according to code review part 3
* feat: component extension point for adaptive telemetry query actions
- only render the first non-null added-component, and provide utility in the added component infrastructure to support this
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Allow dashboardDS to run in mixedDS
* Make mixedDS panel wait for dashboardDS panel to load first
* cleanup
* cleanup
* refresh dashboardDS queries within mixedDS when source panel changes
* more tests
* fix
* fixes scenario where source returns an error
* do not allow dashboardDS references to mixedDS targets that contain other dashboardDS panels
* test
* lint
* Show invalid panels as invalid and with a message
* refactor
* avoid bunching shared dashboard queries
* skip instead of debouncing to avoid stale data
* debouce dashboard ds result stream when coming from mixed ds
* restore unnecessarily touched files
* fix import
* increase debounce interval value to account for slower machines
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* Add mode switch in Query section
* Implement simple query mode : WIP
* fix logic switching mode
* move guard and get methodd to another folder
* Add more requiremts for being transformable from advanced to not advanced mode
* fix usig mode when it's not a grafana managed alert
* Show warning when switching to not advanced and its not possible to convert
* Add feature toggle alertingQueryAndExpressionsStepMode
* fix test
* add translations
* address PR feedback
* Use form context for sharing simplfied mode used, save in local storage and use the new fields in the api
* add check to valid reducer and threshold when switching to simplified mode
* Use only one expression list
* fix test
* move existing rule check outside storeInLocalStorageValues
* add id in InlineSwitch to handle onClick on label
* fix
* Fix default values when editing existing rule
* Update dto fields for the api request
* fix snapshot
* Fix recording rules to not show switch mode
* remove unnecessary Boolean conversion
* fix areQueriesTransformableToSimpleCondition
* update text
* pr review nit
* pr review part2
* wip
* Add save functionality to query row
* add success conditional
* move around translations
* Add translations
* Add key to fix test
* Add key to the right spot
* define specific save button
* WIP - Use RowActionComponents to add action without modifying the core component
* Only add component once on render
* Move logic to main explore page
* Add keyed render actions to prevent redundancy, use this to add keyed action
* Overcome the forces of dayquil to attempt to make actual sense
* Add scoped actions to query action component
* Spaces not allowed in generateName
* update eslint, tsconfig + esbuild to handle new jsx transform
* remove thing that breaks the new jsx transform
* remove react imports
* adjust grafana-icons build
* is this the correct syntax?
* try this
* well this was much easier than expected...
* change grafana-plugin-configs webpack config
* fixes
* fix lockfile
* fix 2 more violations
* use path.resolve instead of require.resolve
* remove react import
* fix react imports
* more fixes
* remove React import
* remove import React from docs
* remove another react import
* improve typings in opentsdb datasource
* couple of influx improvements
* couple more
* more
* more more more
* 3 more
* changes to variables/inspect/utils
* some graphite improvements
* Reduce number of request fetching rules in the dashboard view using rtkq
* Fix UnifiedAlertStatesWorker work
* refactor ungroupRulesByFileName
* Address review comments and fix test
* fix DashboardQueryRunner test
* Fix tests
* Update AlertStatesDataLayer to use RTKQ
* Fix PanelAlertTabContent test
* Fix PanelAlertTabContent test after adding RTKQ
* fix test and address PR review comments
* Update useCombinedRuleNamespaces to have both dashboardUID and panelId as optional params and rename the hook
* Address review pr comment
* remove test about template variables
* Use poll interval in useCombinedRules