* fix some types
* more type updates
* some more fixes
* more changes
* string instead of unknown
* more like original logic
* remove outdated comment
* update betterer
* remove wrapping div
* update tests, just gotta figure out how to handle fontawesome :(
* add spinner.svg which matches the font-awesome spinner
* add mock for react-inlinesvg
* update mock and fix some tests
* fix FormField test
* fix CorrelationsPage tests
* increase timeout
* moved themecontext to data
* chore(grafana-ui): re-export ThemeContext from grafana/data for backwards compatibility
* Moved icon bundling to core.
* feat(plugins): share react-inlinesvg with plugins for grafana/ui bundling
* chore(codeowners): add generate-icon-bundle.js to file
* chore(storybook): update path to iconBundle file for theme
* feat(plugins): share i18n dependency via systemjs
* Make sure that icon bundle is initialized for tests.
* Removed comment.
* added tests for icon root.
* Removing the need of having an init variable.
* feat(grafana-ui): add icon svgs to bundle for projects that don't rely on grafana
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* chore(plugins): bump systemjs to latest version
* refactor(plugins): switch runtime over to use latest systemjs, add typings
* refactor(plugins): use latest systemjs APIs for runtime dependency resolution
* refactor(plugins): return valid urls from backend for latest systemjs import to work
* revert(plugins): remove cfg from assetpath in favour of relative paths
* fix(plugins): useDefault for systemjs deps to solve undefined errors
* feat(plugins): add basic support for loading plugins via CDN
* fix(plugins): load nested plugins with latest systemjs
* feat(plugins): add back ability to transform plugin src for cdns
* feat(plugins): get caching for module.js working, clean up
* refactor(plugin_loader): create buildImportMap fn and more clean up
* refactor(angularapp): use buildImportMap for dependencies and clean up
* test(plugin_loader): fix failing test due to systemjs update
* test(jest): mock systemjs amd extra in tests to prevent it breaking tests
* chore(plugins): remove systemjs module-types extra, already included with system
* fix(plugins): update key for invalidating cached plugins
* fix: move systemjs amd define to another global so monaco can load
* refactor(plugins): clean up cache buster and tests
* chore(plugins): remove debug
* refactor(plugins): move systemjs define to keep global cleaner
* fix(plugins): set useDefault so system modules lodash references dont fail
* feat(plugins): hook systemjs onload so stylesheets are applied to the dom
* refactor(plugins): wrap amd formatted plugins in iife to prevent define collision
* feat(plugins): support system module format for legacy plugins
* test(plugincachebuster): update tests to match latest implementation
* test(plugins-loader): fix up tests post module property change
* fix test
* Update pkg/plugins/manager/loader/assetpath/assetpath.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* chore(plugin_loader): remove stray import from merge conflict
* Revert "Update pkg/plugins/manager/loader/assetpath/assetpath.go"
This reverts commit 0df57d1cf20f49c22c93369001c70aae46a97c42.
* fix(plugin_loader): set use default for shared plugin dependencies
* refactor(plugins): use leading slash for Module and BaseUrl
* fix(plugins): fix resolve appending extension to cache query param
* refactor(plugins): align baseurl and module paths
* refactor(plugins): update builtInPlugins keys to match naming convention
* refactor(plugins): minor loader clean up, fix up types
* test(plugins): fix failing tests
* refactor(plugins): rename cache buster systemjs plugin to cache
* refactor(plugins): separate plugin_loader into smaller files
* chore(plugins): clean up plugin_loader types
* chore(plugin_sandbox): fix typescript error
* chore(npm): remove unplug debug and pin systemjs to 6.14.1
* refactor(plugins-cdn): update loaders to use absolute module url from backend
* fix(plugins): escape period in systemjs module regex
* chore(plugins): delete redundant systemjs plugins
* refactor(plugin_loader): move hooks into own file, add types
* test(plugins): add tests for systemjs loader hooks
* chore(plugins): rename systemjshooks file
* chore(plugins): remove redundant systemjs cdn backend code
* fix(plugins): handle loading with config.appSubUrl
* chore(plugins): delete redundant plugin-cdn angular code
* test(plugins): fix failing systemjs test missing pluginsCDNBaseUrl
* refactor(plugins): backend provides base and module properties with AppSubUrl
* fix(plugins): consider AppSubUrl for plugin logos
* fix(plugins): use isHostedOnCDN util when checking for cdn hosted plugins
* add new appSubURL field to config
* refactor relative URL func
* fix path for core app
* refactor asset path input
* fix(plugins): catch errors in loadPluginCss
* feat(plugins-cdn): selectively transform sourceMapURL
* re-add deleted test case
* chore(plugins): bump to latest systemjs@6.14.2
* feat(plugins): add systemjs-cjs-extra for loading commonjs plugins
---------
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Add smart type selection when creating a new alert rule
* Auto switch when switch button has not been clicked yet
* remove unnecessay code after the last refacgtor
* Refactor
* Remove unneeded prop
* Move SmartAlertTypeDetector to its own file
* Fix tests
* Refactor: new useSetExpressionAndDataSource hook
* Fix expressions not been propagated when switching from one type to another
* Change texts
* Update tests
* Update text in switch button
* Update texts and tests
* Refactor: move code to getCanSwitch new method
* Move smart alert after queries and remove auto-switch
* Remove expressions and restore them when switching between grafana and cloud type
* Rename previous expression state
* Fix tests
* Add data source name for data source-managed alert selection
* Update reducer when changing cloud data source
* PR review suggestions
* PR review suggestions 2nd part
* PR review suggestions 3th part
* Fix canSwitch
* Update texts on smart alert
---------
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
* Add component for rule creation and dropdown
* Make each route type have a different path
* Remove unneeded import
* Fix tests
* Rename CreateRuleButton to MoreActionRuleButtons
* Remove Recording Rule option from new rule form
* Use alerting and recording for path params on new rules
* Fix tests
* Only show new button if permissions are granted
* Fix tests
* Fix action buttons label and placement in several views following standard and being consistent with the rest of the ui
* Update public/app/features/alerting/unified/components/mute-timings/MuteTimingForm.tsx
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Fix secondary buttons to not have outline
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* - initial work on data source config page
* - add links to test status box
- add tracking function
* - add test for the DataSourceConfigAlert component
* - fix flicker of the alert box
* - fix the build
* - small improvements
* - fix failing build
* - fix failing unit tests
* - prettier and betterer fixes
* - fix failing e2e tests
* - fix build again
* - rewrite solution according to the PR comments
* - cleanup
* - fix failing e2e
* - use absolute path in link
* Minor fixes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Consolidate logs volume logic (full range and limited)
* Fix showing limited histogram message
* Test passing meta data to logs volume provider
* Improve readability
* Clean up types
* Add basic support for multiple log volumes
* Move the comment back to the right place
* Improve readability
* Clean up the logic to support Logs Samples
* Update docs
* Sort log volumes
* Provide title to logs volume panel
* Move logs volume cache to the provider factory
* Add helper functions
* Reuse only if queries are the same
* Fix alphabetical sorting
* Move caching out of the provider
* Support errors and loading state
* Remove unused code
* Consolidate supplementary query utils
* Add tests for supplementaryQueries
* Update tests
* Simplify logs volume extra info
* Update tests
* Remove comment
* Update tests
* Fix hiding the histogram for hidden queries
* Simplify loading message
* Update tests
* Wait for full fallback histogram to load before showing it
* Fix a typo
* Add feedback comments
* Move feedback comments to github
* Do not filter out hidden queries as they may be used as references in other queries
* Group log volume by refId
* Support showing fallback histograms per query to avoid duplicates
* Improve type-checking
* Fix supplementaryQueries.test.ts
* Fix logsModel.test.ts
* Fix loading fallback results
* Fix unit tests
* WIP
* Update deprecated styles
* Simplify test
* Simplify rendering zoom info
* Update deprecated styles
* Simplify getLogsVolumeDataSourceInfo
* Simplify isLogsVolumeLimited()
* Simplify rendering zoom info
* Keybindings: No global keybindings on chromeless pages
* simplify condition
* Refactoring
* Align name and file
* Move logic into AppChrome
* minor fix
* Update Page.tsx
* Fixing test
* Fixed tests
* More fixes
* Fixed more tests
* Fixing final test
* Fixed search in old nav
* rename routes and fix access control for support bundles
* AccessControl: Hide menu if not authorized
* AccessControl: Add AC guards for create and delete
* lint
* feat: add draft version of validate button
* feat: add some styling and basics
* temp: intermediate result
* refactor: solve TODOs
* refactor: replace string in state
* refactor: replace error message style
* refactor: set validate state on change in ds
* refactor: add QueryRunner
* refactor: add QueryRunner
* temp: temporary status
* Emit PanelData to check if the query is valid
* refactor: clean up
* refactor: improve a11y of error message and adjust test
* Remove deprecated property call, change equality
* refactor: add changes from code review
* refactor: remove memory leak
* refactor: replace query runner
* refactor: adjust error handling
* refactor: move testing to related unit test
* refactor: clean up test for QueryEditorField
* refactor: clean up test for CorrelationsPage
* refactor: repair test
* refactor: clean up
* refactor: add refId in order avoid errors when running Loki queries
* refactor: replace buildQueryTransaction + set query to invalid if query is empty
* refactor: add empty query value to test cases
* refactor: end handleValidation after setIsValidQuery()
* refactor: refactor test
* refactor: fix last two tests
* refactor: modify validation
* refactor: add happy path
* refactor: clean up
* refactor: clean up tests (not final)
* refactor: further clean up
* refactor: add condition for failing
* refactor: finish clean up
* refactor: changes from code review
* refactor: add response state to condition
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* refactor: fix prettier issue
* refactor: remove unused return
* refactor: replace change in queryAnalytics.ts
* refactor: remove correlations from query analytics
* refactor: remove unnecessary test preparation
* refactor: revert changes from commit 4997327
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* 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>
* Update dependency @reduxjs/toolkit to v1.9.0
* fix types on mockToolkitActionCreator
* Fix external AM selector tests
* timeout added in shared public dashboard test
* Revert "timeout added in shared public dashboard test"
This reverts commit 205c295192.
* update to @reduxjs/toolkit@1.9.1
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* Fix RuleEditor flaky test for existing grafana managed alert
* Fix RuleEditor flaky test for creating a new grafana managed alert
* Fix tests for cloud rules
* Split tests for different rule types
* Move common clickSelectOption method to helpers
* Remove from RuleEditorCloudRules.test.tsx a repeated cloud rule test
* Move existing grafana rule test case to a new file
* Split RuleEditorCloudRules test: move checking only allowed data sources test case to a new test file
* Re-use common ui const
* Re-use renderRuleEditor method
* Create getDiscoverFeaturesMock to reduce code
* 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