* Folders: Expose function for getting all org folders with specific UIDs
* lint
* Fix test
* fixup
* Apply suggestion from code review
* Remove changes in alerting scheduler
* fixup
* fixup after merge with main
* Add batching
* Use strings.Builder
* Return all org folders if UIDs is empty
* Filter out not accessible folders by the user
* Remove comment
* Fix batching when count is zero
* Do not include dashboard permissions
* Add some tests
* fix test
* Use batch request for folders
* Use batch request to deduplicate folders
* Refactor
* Fix after merging main
* Refactor
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Extract DatasourceVariableForm logic and use it in core grafana
* Implement DataSourceVariable editor in scenes
* Refactor VariableSelect and add unit test for DataSourceVariableEditor
* Refactor old unit test to use userEvent and mock getDataSourceSrv
* Update dependency @glideapps/glide-data-grid to v6
* mark glide-data-grid as esmodule
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Check the value type before casting it to the string
* set visualization as table by default
* append all values for show diagnostics
* golangci-lint
* append metadata only to first frame
* Add API test
* Add move tests
* Fix create folder
* Fix move
* Fix test
* Drop and re-create index so that allows a folder to contain a dashboard and a subfolder with same name
* Get folder by title defaults to root folder and optionally fetches folder by provided parent folder
* Apply suggestions from code review
* Swap order between Annotations and Labels and notifications step, and update some texts
* Update routing preview label size
* Fix dashboard and panel label when are selected
* Swap order in modify export form
* Add refresh button for contact points selector in simplified routing section
* Clear timeout when unmounting component
* Fix timeout not being correclty removed when component unmounts
* Update css field name
* Kepp loading spinner if refetching receivers takes more than one second
* Fix test snapshot in useContactPointsWithStatus hook
* refactor how we wait for the request response and the timeout to finish
* Folders: Expose function for getting all org folders with specific UIDs
* Return all org folders if UIDs is empty
* Filter out not accessible folders by the user
* Modify query to optionally returning a string that contains the UIDs of all parent folders separated by slash.
* Grafana/ui: Add Space component
* Add responsive styles and prop docs
* Use the Box component
* Docs
* Replace the component from grafana/experimental
* Update story
* Tweak docs
* Adjust docs
* Embedding dashboards exploratino
* Update
* Update
* Added e2e test
* Update
* initial state, and onStateChange, only explore panel menu action and other fixes and tests
* fix e2e spec
* Fix url
* fixing test
* Fix broken link tempo data source
* Use docs/reference shortcode
* Update docs/sources/datasources/tempo/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Alerting: Add action, scope, role_id to permission table
The existing role_id, action, scope index has the wrong ordering to be most
effectively used in dashboard/folder permission requests.
On a large tests set, the slow database calls were on the order of ~30-40ms, so
when performed individually they don't have that large of a latency impact.
However, when done in bulk in the migration this adds up to some very slow
requests.
After the index is added these same database calls are reduced to ~4-5ms
* Change index to action, scope, role_id
* Make new index unique and drop [role_id, action, scope] index
* Alerting: During legacy migration reduce the number of created silences
During legacy migration every migrated rule was given a label rule_uid=<uid>.
This was used to silence DatasourceError/DatasourceNoData alerts for
migrated rules that had either ExecutionErrorState/NoDataState set to
keep_state, respectively.
This could potentially create a large amount of silences and a high cardinality
label. Both of these scenarios have poor outcomes for CPU load and latency in
unified alerting.
Instead, this change creates one label per ExecutionErrorState/NoDataState when
they are set to keep_state as well as two silence rules, if rules with said
labels were created during migration. These silence rules are:
- __legacy_silence_error_keep_state__ = true
- __legacy_silence_nodata_keep_state__ = true
This will drastically reduce the number of created silence rules in most cases
as well as not create the potentially high cardinality label `rule_uid`.