Commit Graph

48205 Commits

Author SHA1 Message Date
Ieva
dc9e590b7b
RBAC: Return the underlying error instead of internal server or bad request for managed permission endpoints (#80974)
* return not found instead of an internal server error when listing/updating permissions

* openapi gen
2024-01-25 16:24:52 +00:00
Jean-Philippe Quéméner
25dd8d5ceb
Docs: add section about periodic state saving for alerting (#81244) 2024-01-25 17:05:58 +01:00
ismail simsek
7d0017f3f2
InfluxDB: Use grafana timeout value for flux queries (#81252)
* use grafana timeout for flux queries

* get timeout from settings

* fix test
2024-01-25 17:05:08 +01:00
Tobias Skarhed
add5a5c01e
LDAP: Use InteractiveTable and remove gf-form usage (#80291)
* Use InteractiveTable

* Remove unused return

* Fix icon alignment

* InteractiveTable in LdapUserMappingInfo

* Update no teams text

* InteractiveTable in LdapUserGroups

* Remove unused code

* Cleanup

* LdapSyncInfo to InteractiveTable

* Update more tables

* Memoize

* Fix connection status

* Update lockfile

* Refactor LdapSyncInfo

* Fix lockfile

* Remove showAttributeMapping as it is always true
2024-01-25 17:01:22 +01:00
Fabrizio
5195e5347e
Prettify tsconfig.json files for T&P data sources (#81262) 2024-01-25 16:44:16 +01:00
renovate[bot]
828c2cebf0
Update dependency @types/lucene to v2.1.7 (#81273)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 15:22:19 +00:00
renovate[bot]
343556c3c5
Update dependency @types/js-yaml to v4.0.9 (#81272)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 17:21:27 +02:00
lean.dev
021aca256c
Fix typos (#81270) 2024-01-25 15:20:20 +00:00
Alex Khomenko
ab467a41c2
Chore: Remove Form usage from AddPermission (#81261) 2024-01-25 17:04:30 +02:00
renovate[bot]
27839fec11
Update dependency @types/diff to v5.0.9 (#81266)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 15:02:06 +00:00
renovate[bot]
138b314a07 Update dependency @types/d3-force to v3.0.9 2024-01-25 14:51:23 +00:00
Isabella Siu
5772662cee
CloudWatch: decouple from ngalert/models and query packages (#81210) 2024-01-25 09:40:55 -05:00
renovate[bot]
da6614bf56
Update dependency @types/common-tags to v1.8.4 (#81250)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 14:28:29 +00:00
renovate[bot]
4dfc18e628
Update dependency @types/chance to v1.1.6 (#81243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 14:28:07 +00:00
Adela Almasan
22561e8690
Annotations: Prevent creating a new range in unsaved dashboards (#81256) 2024-01-25 14:14:46 +00:00
Sergej-Vlasov
9ba13dd309
Dashboards: Remove emptyDashboardPage feature flag (#81188)
* remove emptyDashboardPage feature toggle from DashNav

* remove emptyDashboardPage feature toggle from NewDashboardWithDS

* remove emptyDashboardPage feature toggle from DashboardGrid

* remove emptyDashboardPage feature toggle from DashboardModel

* remove emptyDashboardPage feature toggle from initDashboard

* remove unused AddPanelWidged component

* remove add-panel type from test

* remove emptyDashboardPage feature flag from registry.go
2024-01-25 14:04:29 +00:00
Hugo Kiyodi Oshiro
d66d7a9642
Plugins: Change managedPluginsInstall to public preview (#81053) 2024-01-25 14:32:31 +01:00
Ida Štambuk
9b4c78dbc9
Cloudwatch: Import httpClient from grafana-plugin-sdk-go instead of grafana/infra (#81187) 2024-01-25 13:33:31 +01:00
Alexander Zobnin
3094531b63
Folders: Optimize shared folders listing (#81245)
* 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>
2024-01-25 13:02:32 +01:00
Alexa V
2774e0d023
Dashboard: Migration - EditVariable Settings: Implement DataSource Variable (#80885)
* 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
2024-01-25 12:56:37 +01:00
idafurjes
0880a239f8
Add leftover metrics for FolderID (#81246) 2024-01-25 12:14:18 +01:00
brendamuir
85429f7bd0
Alerting docs: swap alert steps (#81249)
* Alerting docs: swap annotation and notification steps

* Updates data source managed rule steps
2024-01-25 12:02:35 +01:00
renovate[bot]
c58dc09e84
Update dependency @glideapps/glide-data-grid to v6 (#81189)
* 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>
2024-01-25 10:52:49 +00:00
ismail simsek
14e55fefbb
InfluxDB: Check the value type before casting it to the string (#80986)
* 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
2024-01-25 11:28:25 +01:00
Ivana Huckova
c6793d4f12
Loki: Implement visual query builder from @grafana/experimental (#81140)
* Loki: Use visual query builder from grafana/experimental

* Update to 1.7.7

* Update

* In renderOperation console.error instead of throwing error

* Remove redundant comment
2024-01-25 11:19:22 +01:00
Misi
4577e61ee7
Auth: Improve /admin/authentication permission checks and include new SSO pages (#81183)
* Move evalAuthSettings to ssoutils

* Improve permission check for auth page
2024-01-25 11:13:24 +01:00
idafurjes
7e5544ab21
Add MFolderIDsServiceCount to count folderIDs in services pkg (#81237) 2024-01-25 11:10:35 +01:00
renovate[bot]
0d66ad68f8 Update dependency @swc/core to v1.3.106 2024-01-25 09:59:30 +00:00
Sofia Papagiannaki
478d7d58fa
Nested folders: Allow creating folders with duplicate names in different locations (#77076)
* 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
2024-01-25 11:29:56 +02:00
brendamuir
030a68bbf7
Alerting docs: recovery threshold (#81069)
* Alerting docs: recovery threshold

* ran prettier

* Adds note that only available in oss

* ran prettier
2024-01-25 10:28:32 +01:00
renovate[bot]
12e19d5364
Update dependency @braintree/sanitize-url to v7 (#81186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 09:22:31 +00:00
Ashley Harrison
3e073c4dc1
Nested Folders: Update documentation (#81054)
* docs updates!

* Apply suggestions from code review

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Apply suggestions from code review

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* simplify

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2024-01-25 09:20:37 +00:00
Ashley Harrison
c741697333
Chore: Don't import from outside of grafana-ui (#81160)
don't import from outside of grafana-ui
2024-01-25 09:20:09 +00:00
Sonia Aguilar
0bcc60f437
Alerting: Swap order between Annotations and Labels step in the alert rule form. (#81060)
* 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
2024-01-25 09:57:10 +01:00
Sofia Papagiannaki
6e827889b4
Chore: Fix folders flaky test (#81234)
It used to wrongly assume slice ordering
2024-01-25 10:55:44 +02:00
Sonia Aguilar
6218e28ee9
Alerting: Add refresh button to contact points selector in simplified routing section. (#80748)
* 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
2024-01-25 09:53:54 +02:00
Piotr Jamróz
ebe8c005ce
Explore: Set default time range to now-1h (#81135)
Update default time range in Explore back to now-1h
2024-01-25 08:51:16 +01:00
Sofia Papagiannaki
5e88d29814
Folders: Introduce folder service function for fetching folders by org and UIDs that contain optionally the folder full path (#80716)
* 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.
2024-01-25 09:27:13 +02:00
Alex Khomenko
f154b2b855
Grafana/ui: Add Space component (#81145)
* 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
2024-01-25 08:59:24 +02:00
Torkel Ödegaard
05eb4fcd7f
Drawer: Resizable via draggable edge (#80796)
* Drawer: POC of draggable resizable drawer side

* Cleaner solution

* refinements

* refinements

* Add touch support
2024-01-25 07:54:32 +01:00
Torkel Ödegaard
e08700c1b5
Dashboard: New EmbeddedDashboard runtime component (#78916)
* 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
2024-01-25 07:32:07 +01:00
Adela Almasan
9da3db1ddf
Annotations: Prevent creating on unsaved dashboard (#81200) 2024-01-24 19:24:52 -06:00
Kim Nylander
1d25039674
[DOC] Fix broken link tempo data source (#81126)
* 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>
2024-01-24 16:47:35 -06:00
William Wernert
2203bc2a3d
Alerting: Refactor provisioning tests/fakes (#81205)
* Fix up test Alertmanager config JSON

* Move fake AM config and provisioning stores to fakes package
2024-01-24 17:15:55 -05:00
Matthew Jacobson
e45f664ca4
Alerting: Replace index role_id, action, scope with action, scope, role_id on permission table (#80336)
* 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
2024-01-24 16:18:14 -05:00
Matthew Jacobson
71e70c424f
Alerting: During legacy migration reduce the number of created silences (#78505)
* 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`.
2024-01-24 15:56:19 -05:00
Santiago
fbbda6c05e
Alerting: Retry readiness check to the remote Alertmanager on 5xx status code responses (#81174) 2024-01-24 21:39:06 +01:00
Ryan McKinley
c9ff6a9ab9
Chore: Generate shorter UIDs (#79843) 2024-01-24 11:27:46 -08:00
Galen Kistler
a81d3b1d22
Table: Cell inspector auto-detecting JSON (#81152)
* set inspect mode to json if no errors parsing json
2024-01-24 12:08:18 -06:00
Josh Hunt
a138ce668d
I18n: Remove unneeded i18n:compile script (#81184) 2024-01-24 17:24:24 +00:00