* 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>
* chore(monaco): bump monaco-editor to latest version
* feat(codeeditor): use esm to load monaco editor
* revert(monaco): put back previous version
* feat(monaco): setup MonacoEnvironment when bootstrapping app
* feat(monaco): load monaco languages from registry as workers
* feat(webpack): clean up warnings, remove need to copy monaco into lib
* fix(plugins): wip - remove amd loader workaround in systemjs hooks
* chore(azure): clean up so QueryField passes typecheck
* test(jest): update config to fix failing tests due to missing monaco-editor
* test(jest): update config to work with monaco-editor and kusto
* test(jest): prevent message eventlistener in nodeGraph/layout.worker tripping up monaco tests
* test(plugins): wip - remove amd related tests from systemjs hooks
* test(alerting): prefer clearAllMocks to prevent monaco editor failing due to missing matchMedia
* test(parca): fix failing test due to undefined backendSrv
* chore: move monacoEnv to app/core
* test: increase testing-lib timeout to 2secs, fix parca test to assert dom element
* feat(plugins): share kusto via systemjs
* test(e2e): increase timeout for checking monaco editor in exemplars spec
* test(e2e): assert monaco has loaded by checking the spinner is gone and window.monaco exists
* test(e2e): check for monaco editor textarea
* test(e2e): check monaco editor is loaded before assertions
* test(e2e): add waitForMonacoToLoad util to reduce duplication
* test(e2e): fix failing mysql spec
* chore(jest): add comment to setupTests explaining need to incresae default timeout
* chore(nodegraph): improve comment in layout.worker.utils to better explain the need for file
* WIP first attempt to query variable
* regex issue repro demo
* Refresh variable on time range change if refresh specified
* Instantiate variable runner when updating query variable options
* Simplify runners getTarget interface
* Fix issue with variable ot being updated correctly after other variable changed
* Add templateSrv.replace compatibility with query variable
* QueryVariable: use datasource variable as source
* use proper format
* Make sure variables set is correctly updated when query variable errors
* Do not destruct scopedVars when using sceneGraph.interpolate in templateSrv
* Add support for Legacy variables (metricFindQuery)
* Review
* Fix lint
* Test: Add unit for datasource by variable
* test: Add unit for datasource as var
* query: delegate interpolation to datasourceSrv
* Cleanup
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* First baby steps
* First baby steps
* No progress really
* Updates
* no progress
* refactoring
* Progress on sub menu and value selectors
* Some more tweaks
* Lots of progress
* Progress
* Updates
* Progress
* Tweaks
* Updates
* Updates to variable system
* Cleaner tests
* Update
* Some cleanup
* correct test name
* Renames and moves
* prop rename
* Fixed scene template interpolator
* More tests for SceneObjectBase and fixed issue in EventBus
* Updates
* More tweaks
* More refinements
* Fixed test
* Added test to EventBus
* Clone all scene object arrays
* Simplify
* tried to merge issue
* Update
* added more comments to interface
* temp progress
* Trying to simplify things, but struggling a bit
* Updated
* Tweaks
* Progress on fixing the select componenet and typing, and sharing code in a base class
* Updated
* Multi select
* Simpler loading state
* Update
* removed failOnConsole
* Removed old funcs
* Moved logic from update manage to MultiValueVariable
* Added tests for MultiValueVariable logic
* Made value a more abstract concept to support object values
* renamed func to getValueText
* Refactored and moved logic to VariableSet
* Added test for deactivation and query cancelling
* Tweaks
* Fixed lint issues
* Switch from lingui from i18next
* Change lingui messages to i18next messages
* Change lingui messages to i18next messages (grafana-ui)
* Init i18n for tests
* Tests: Adds expects for observables
* Refactor: renames matcher
* Chore: changed jest version and removed as dev dependency
* Refactor: Changes after PR review
* wip
* Chore: revert
* Chore: Adds jest-matcher-utils
* Chore: fixed merge error
* Tests: Removed inline snapshots as they are env dependent
* Tests: missed a snapshot
* Refactor: Removed type file after PR comments