Commit Graph

6703 Commits

Author SHA1 Message Date
Alexander Weaver
f2a9d0a89d
Alerting: Refactor ruleRoutine to take an entire ruleInfo instance (#83858)
* Make stop a real method

* ruleRoutine takes a ruleInfo reference directly rather than pieces of it

* Fix whitespace
2024-03-04 15:15:01 -06:00
Matthew Jacobson
2e8c514cfd
Alerting: Stop persisting user-defined templates to disk (#83456)
Updates Grafana Alertmanager to work with new interface from grafana/alerting#161. This change stops passing user-defined templates to the Grafana Alertmanager by persisting them to disk and instead passes them by string.
2024-03-04 20:12:49 +02:00
Alexander Weaver
fa51724bc6
Alerting: Move alertRuleInfo and tests to new files (#83854)
Move ruleinfo and tests to new files
2024-03-04 11:24:49 -06:00
Ryan McKinley
3036b50df3
Expressions: expose ConvertDataFramesToResults (#83805) 2024-03-04 18:22:56 +02:00
Alexander Zobnin
82a88cc83f
Access control: Extend GetUserPermissions() to query permissions in org (#83392)
* Access control: Extend GetUserPermissions() to query permissions in specific org

* Use db query to fetch permissions in org

* refactor

* refactor

* use conditional join

* minor refactor

* Add test cases

* Search permissions correctly in OSS vs Enterprise

* Get permissions from memory

* Refactor

* remove unused func

* Add tests for GetUserPermissionsInOrg

* fix linter
2024-03-04 13:29:13 +01:00
Misi
07e26226b7
Auth: Add all settings to Azure AD SSO config UI (#83618)
* Add all settings to AzureAD UI

* prettify

* Fixes

* Load extra keys with type assertion
2024-03-04 11:55:59 +01:00
Ryan McKinley
5f6bf93dd5
Expressions: Use enumerations rather than strings (#83741) 2024-03-01 19:38:32 +02:00
George Robinson
96127dce62
Alerting: Fix bug in screenshot service using incorrect limit (#83786)
This commit fixes a bug in the screenshot service where
[alerting].concurrent_render_limit was used instead of
[rendering].concurrent_render_request_limit, as in the
docs.
2024-03-01 17:17:55 +00:00
Eric Leijonmarck
8b551b08f9
TeamLBAC: Change to public preview (#83761)
change to public preview
2024-03-01 17:05:59 +00:00
Santiago
8ad367e4ad
Chore: Remove redundant error check (#83769) 2024-03-01 13:28:08 -03:00
owensmallwood
0dfdb2ae47
Revert "Add FolderUID for library elements" (#83776)
Revert "Add FolderUID for library elements (#79572)"

This reverts commit 2532047e7a.
2024-03-01 18:16:43 +02:00
Jo
0aebb9ee39
Misc: Remove unused params and impossible logic (#83756)
* remove unused params and impossible logic

* remove unused param
2024-03-01 12:08:00 +01:00
Jo
36a19bfa83
AuthProxy: Allow disabling Auth Proxy cache (#83755)
* extract auth proxy settings

* simplify auth proxy methods

* add doc mentions
2024-03-01 11:31:06 +01:00
idafurjes
2532047e7a
Add FolderUID for library elements (#79572)
* Add FolderUID in missing places for libraryelements

* Add migration for FolderUID in library elements table

* Add Folder UIDs tolibrary panels

* Adjust dashboard import with folder uid

* Fix lint

* Rename back FolderUID to UID

* Remove default

* Check if folderUID is nil

* Add unique indes on org_id,folder_uid,name and kind

* Update pkg/services/libraryelements/database.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Fix folder integration test, with unique index on library elements

* Make folder uids nullable and rewrite migration query

* Use dashboard uid instead of folder_uid

* Adjust test

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-03-01 10:16:33 +01:00
Jo
2182cc47ac
LDAP: Fix LDAP users authenticated via auth proxy not being able to use LDAP active sync (#83715)
* fix LDAP users authenticated via auth proxy not being able to use ldap sync

* simplify id resolution at the cost of no fallthrough

* remove unused services

* remove unused cache key
2024-03-01 10:14:32 +01:00
Charandas
b87ec69431
K8s: add a remote services file config option to specify aggregation config (#83646) 2024-02-29 17:29:05 -08:00
linoman
b02ae375ba
Chore: Query oauth info from a new instance (#83229)
* query OAuth info from a new instance

* add `hd` validation flag

* add `disable_hd_validation` to settings map

* update documentation

---------

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2024-02-29 16:48:32 +01:00
Levente Balogh
f394e8333e
Chore: remove the dataConnectionsConsole feature toggle (#83661)
chore: remove `dataConnectionsConsole` feature toggle
2024-02-29 10:29:41 +01:00
Alexander Weaver
a862a4264d
Alerting: Export rule validation logic and make it portable (#83555)
* ValidateInterval doesn't need the entire config

* Validation no longer depends on entire folder now that we've dropped foldertitle from api

* Don't depend on entire config struct

* Export validate group
2024-02-28 14:40:13 -06:00
William Wernert
af528d2f66
Alerting/Annotations: Prevent panics from composite store jobs from crashing Grafana (#83459)
* Don't directly use pointer to json

* Don't crash entire process if a store job panics

* Add debug logs when failing to parse/handle Loki entries
2024-02-28 20:16:37 +02:00
Joe Blubaugh
b905777ba9
Alerting: Support deleting rule groups in the provisioning API (#83514)
* Alerting: feat: support deleting rule groups in the provisioning API

Adds support for DELETE to the provisioning API's alert rule groups route, which allows deleting the rule group with a
single API call. Previously, groups were deleted by deleting rules one-by-one.

Fixes #81860

This change doesn't add any new paths to the API, only new methods.

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-28 10:19:02 -05:00
Arati R
467302480f
Search: Include collapsed panels in search v2 (#83047)
* Include collapsed panels in searchv2
* Include collapsed row in TestReadSummaries
2024-02-28 16:11:09 +01:00
Misi
3b7e7483c8
Auth: Align loading the legacy auth.grafananet section to the current behaviour in OAuthStrategy (#83479)
* Align oauth_strategy to the current behaviour

* lint

* Address feedback
2024-02-28 13:45:59 +01:00
Scott Lepper
70009201d4
Expressions: Sql expressions with Duckdb (#81666)
duckdb temp storage of dataframes using parquet and querying from sql expressions
---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-02-27 16:16:00 -05:00
김은빈
96dfb385ca
Grafana: Replace magic number with a constant variable in response status (#80132)
* Chore: Replace response status with const var

* Apply suggestions from code review

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Add net/http import

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-02-27 18:39:51 +02:00
linoman
a7fbe3c6dc
Password Policy: Update frontend facing messages (#83227)
* update tests

* update error messages
2024-02-27 17:34:43 +01:00
Will Browne
5edd96ae77
Plugins: Refactor plugin config into separate env var and request scoped services (#83261)
* seperate services for env + req

* merge with main

* fix tests

* undo changes to golden file

* fix linter

* remove unused fields

* split out new config struct

* provide config

* undo go mod changes

* more renaming

* fix tests

* undo bra.toml changes

* update go.work.sum

* undo changes

* trigger

* apply PR feedback
2024-02-27 12:38:02 +01:00
Gabriel MABILLE
8d9921a5ba
RBAC: Fix delete team permissions on team delete (#83442)
* RBAC: Remove team permissions on delete

* Remove unecessary deletes from store function

* Nit on mock

* Add test to the database

* Nit on comment

* Add another test to check that other permissions remain
2024-02-27 12:21:26 +01:00
Jo
cc3b088b6c
Teams: Fix missing context in team service (#83327)
fix missing context in team service
2024-02-27 11:10:54 +01:00
Misi
9709ac8b84
Auth: Revert provider list change (#83435)
* Load auth.grafananet as the last provider

* skip test
2024-02-26 20:59:49 +01:00
Takashi Idobe
f209a5a8b8
fix typos (#83414) 2024-02-26 10:52:44 -07:00
Misi
617adb137c
Auth: OAuth strategy load extra fields separately (#83408)
Load extra fields separately
2024-02-26 15:33:29 +01:00
idafurjes
80447dd0cc
Restructure cloudmigration service (#83211)
* Restructure cloudmigation service

* Adjust codewoners and wire

* Comment out unused metrics
2024-02-26 14:52:16 +01:00
Gabriel MABILLE
80d6bf6da0
AuthN: Remove embedded oauth server (#83146)
* AuthN: Remove embedded oauth server

* Restore main

* go mod tidy

* Fix problem

* Remove permission intersection

* Fix test and lint

* Fix TestData test

* Revert to origin/main

* Update go.mod

* Update go.mod

* Update go.sum
2024-02-26 11:29:09 +01:00
Serge Zaitsev
d0679f0993
Chore: Add support bundle for folders (#83360)
* add support bundle for folders

* fix ProvideService in tests

* add a test for collector
2024-02-26 11:27:22 +01:00
Todd Treece
e5a26a3f7c
K8s: Add apimachinery and apiserver packages (#83190) 2024-02-23 15:15:43 -05:00
Ieva
19b1e71fee
IP range AC for data sources: compare the base of the URL only (#83305)
* compare the base of the URL and ignore the path

* change the logic to compare scheme and host explicitly

* fix the test
2024-02-23 18:13:21 +02:00
Ieva
65534e62a6
RBAC: add kind, attribute and identifier to annotation permissions during the migration (#83299)
add kind, attribute and identifier to annotation permissions during the migration
2024-02-23 16:03:23 +00:00
Jo
b2601d71d5
IAM: Remove fully rolled out feature toggles (#83308)
* remove anon stat ft

* remove split scope flag

* remove feature toggle from frontend
2024-02-23 17:53:37 +02:00
George Robinson
a0353b237a
Alerting: Update swagger specs (#83260) 2024-02-23 11:25:43 +00:00
Ashley Harrison
a3c73ae7c4
E2C: Add initial empty state (#83232)
* update subtitle

* add empty state

* rename to InfoPaneLeft/Right

* use &apos;

* add "direction" prop to Box

* update subtitle

* Revert "add "direction" prop to Box"

This reverts commit 99f82a27c7.
2024-02-23 13:18:09 +02:00
George Robinson
a564c8c439
Alerting: Keep order of time and mute time intervals consistent (#83257) 2024-02-22 16:57:20 +00:00
Misi
1ef2e8d366
Chore: Allow self-serve for ssoSettingsApi feature toggle (#83140)
* Set AllowSelfServe to true ssoSettingsApi

* Align ft registry validation with latest changes
2024-02-22 18:33:27 +02:00
George Robinson
1ed1242358
Alerting: Basic support for time_intervals (#83216)
This commit adds basic support for time_intervals, as mute_time_intervals
is deprecated in Alertmanager and scheduled to be removed before 1.0.
It does not add support for time_intervals in API or file provisioning,
nor does it support exporting time intervals. This will be added in
later commits to keep the changes as simple as possible.
2024-02-22 15:58:56 +00:00
Joey
ee5dc14e17
Tempo: Remove trace to metrics feature toggle (#82884)
* Remove trace to metrics feature toggle

* Fix after merge
2024-02-22 13:30:41 +00:00
Gábor Farkas
3ba33fe278
mysql: do not use unexported grafana-core config (#83062)
* mysql: do not use unexported grafana-core config

* updated test
2024-02-22 14:22:14 +01:00
Klesh Wong
9282c7a7a4
AuthProxy: Invalidate previous cached item for user when changes are made to any header (#81445)
* fix: sign in using auth_proxy with role a -> b -> a would end up with role b

* Update pkg/services/authn/clients/proxy.go

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>

* Update pkg/services/authn/clients/proxy.go

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
2024-02-22 10:02:31 +01:00
Agnès Toulet
8d68159b52
Public Dashboards: Disable email-sharing when there is no license (#80887)
* PublicDashboards: Disable email-shared dashboards when feature is disabled

* fix pubdash creation when it was email-shared

* add feature name const in OSS

* update doc

* Update service.go

* fix test & linter

* fix test

* Update query_test.go

* update tests

* fix imports

* fix doc linter issues

* Update docs/sources/administration/enterprise-licensing/_index.md

* fix after merge
2024-02-22 09:34:14 +01:00
Ashley Harrison
c75502dd8c
Cloud migration UI: Add migrate-to-cloud route (#83072)
* add migrate-to-cloud route

* fix chunk name

* gate route behind feature toggle

* update permission checks
2024-02-21 15:50:13 +00:00
Alexander Zobnin
9bbb7f67e0
Chore: Move store interface to top level (#83153)
* Chore: Move store interface to top level

* Update store mock
2024-02-21 14:32:54 +01:00