Commit Graph

12845 Commits

Author SHA1 Message Date
Sofia Papagiannaki
22d8258e48
Postgres: Allow disabling SNI on SSL-enabled connections (#83892)
* Postgres: Allow disabling SNI on SSL-enabled connections

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-03-12 12:03:24 +02:00
Adam Yeats
c2b94429e4
Google Cloud Monitor: Fix res being accessed after it becomes nil in promql_query.go (#84223)
Fix res being accessed after it becomes nil in promql_query.go
2024-03-12 10:38:16 +01:00
Misi
63f1c30313
Auth: Set the default org after User login (#83918)
* poc

* add logger, skip hook when user is not assigned to default org

* Add tests, move to hook folder

* docs

* Skip for OrgId < 1

* Address feedback

* Update docs/sources/setup-grafana/configure-grafana/_index.md

* lint

* Move the hook to org_sync.go

* Update pkg/services/authn/authnimpl/sync/org_sync.go

* Handle the case when GetUserOrgList returns error

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-03-12 09:35:13 +01:00
Karl Persson
6ea9f0c447
AuthN: Use fetch user sync hook for render keys connected to a user (#84080)
* Use fetch user sync hook for render keys connected to a user
2024-03-12 09:15:14 +01:00
Charandas
da327ce807
K8s: enable insecure to skip server cert validation for now (#84038) 2024-03-12 01:13:14 +02:00
Alexander Weaver
6c5e94095d
Alerting: Scheduler and registry handle rules by an interface (#84044)
* export Evaluation

* Export Evaluation

* Export RuleVersionAndPauseStatus

* export Eval, create interface

* Export update and add to interface

* Export Stop and Run and add to interface

* Registry and scheduler use rule by interface and not concrete type

* Update factory to use interface, update tests to work over public API rather than writing to channels directly

* Rename map in registry

* Rename getOrCreateInfo to not reference a specific implementation

* Genericize alertRuleInfoRegistry into ruleRegistry

* Rename alertRuleInfo to alertRule

* Comments on interface

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

---------

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2024-03-11 22:57:38 +02:00
Dan Cech
1ffd1cc8f4
Storage: Support listing deleted entities (#84043)
* support listing deleted entities

* fold listDeleted into List
2024-03-11 13:59:54 -04:00
ismail simsek
3fb6319d1b
Prometheus: Introduce prometheus backend library (#83952)
* Move files to prometheus-library

* refactor core prometheus to use prometheus-library

* modify client transport options

* mock

* have a type

* import aliases

* rename

* call the right method

* remove unrelated test from the library

* update codeowners

* go work sync

* update go.work.sum

* make swagger-clean && make openapi3-gen

* add promlib to makefile

* remove clilogger

* Export the function

* update unit test

* add prometheus_test.go

* fix mock type

* use mapUtil from grafana-plugin-sdk-go
2024-03-11 17:22:33 +01:00
ismail simsek
3bb38d82ab
Chore: Bump grafana-plugin-sdk-go version to v0.214.0 (#84162)
* bump grafana-plugin-sdk-go version to v0.214.0

* make swagger-clean && make openapi3-gen
2024-03-11 16:49:53 +01:00
Will Browne
225ac8003c
Plugins: Tidy config struct (#84168)
* tidy plugins config usage

* fix tests
2024-03-11 16:28:46 +01:00
Karl Persson
9c292d2c3f
AuthN: Use sync hook to fetch service account (#84078)
* Use sync hook to fetch service account
2024-03-11 15:56:53 +01:00
Jo
108202f96c
UsageStats: Separate context and threads for usage stats (#83963)
* separate context and threads for usage stats

* use constants

* ignore original context

* fix runMetricsFunc

* fix collector registration

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* change background ctx

* fix test randomness

* Add traces to support bundle collector

* Remove unecessay span

* Add trace to usagestats api

* Close spans

* Mv trace to bundle

* Change span name

* use parent context

* fix runtime declare of stats

* Fix pointer dereference problem on usage stat func

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>

* fix broken support bundle tests by tracer

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-03-11 15:18:42 +01:00
Karl Persson
0b55d72fb5
FeatureToggles: Add feature toggle for sso email verification (#84184)
* FeatureToggles: Add feature toggle for sso email verification

* Rename toggle

* Fix json
2024-03-11 15:09:44 +01:00
carrychair
0913324668
Chore: Remove repetitive words (#84132)
remove repetitive words

Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-11 08:55:18 -04:00
Josh Hunt
1ab8857e48
E2C: Add cloud migration is_target server config option (#83419) 2024-03-11 14:29:44 +02:00
Selene
275ccf994b
Schemas: Reduce duplicated jenny code (#84061)
* Remove jenny_ts_resources and use jenny_ts_types for all cases

* Unify TS generated files into one jenny

* Add missing imports to versioned files

* Update Parca plugin

* Fix loki

* Use LokiQuery

* Fix pyroscope tests

* Fix prettier

* 😒 fix default pyroscope value name

* Set the LokiQuery

* Update Elasticsearch and TestData

* Missed files from testdata

* Order imports
2024-03-11 12:51:44 +01:00
Leonard Gram
5a123bda80
CloudMigration: wires the service (#84081) 2024-03-11 12:40:26 +01:00
Georges Chaudy
15e358e3b9
k8s: add support for configuring the gRPC server address (#84006)
* k8s: add support for configuring the gRPC server address
2024-03-11 11:23:03 +02:00
Andreas Christou
07676ab8a0
Prometheus: Add missing Azure setting (#84094) 2024-03-11 08:57:42 +00:00
Ryan McKinley
d82f3be6f7
QueryService: Use types from sdk (#84029) 2024-03-08 18:12:59 +02:00
Yuri Tseretyan
21719a6b5b
Chore: Fix log message in access control (#84101) 2024-03-07 23:34:22 +02:00
Yuri Tseretyan
7147af6b8e
Alerting: Disable legacy alerting for ever (#83651)
* hard disable for legacy alerting
* remove alerting section from configuration file 
* update documentation to not refer to deleted section
* remove AlertingEnabled from usage in UA setting parsing
2024-03-07 16:01:11 -05:00
Selene
1181141b40
Schemas: Refactor plugin's metadata (#83696)
* Remove kinds verification for kind-registry

* Read plugin's json information with json library instead of use thema binding

* Remove grafanaplugin unification

* Don't use kindsys for extract the slot name

* Fix IsGroup

* Remove all plugindef generation

* Refactor schema interfaces

* Pushed this change from a different branch by mistake...

* Create small plugin definition structure adding additional information for plugins registration

* Add some validation checks

* Delete unused code

* Fix imports lint
2024-03-07 11:09:19 +01:00
Mihai Doarna
beea7d1c2b
Auth: use the scope parameter instead of a hardcoded value in appendUniqueScope() (#84053)
use the scope parameter instead of a hardcoded value
2024-03-07 12:08:58 +02:00
Sofia Papagiannaki
b8d8662bd9
Swagger: Re-generate the enterprise specification if enterprise is cloned (#81730)
* Swagger: Re-generate the enterprise specification if enterprise is cloned successfully

* API change to trigger the swagger CI step execution

* Swagger: Silence logs
2024-03-07 12:07:35 +02:00
Mihai Doarna
e3314f04e4
Auth: perform read locking on every exported func from social providers (#83960)
perform read locking on every exported func from social providers
2024-03-07 10:32:55 +02:00
linoman
8e827afb8c
Password Policy: Validate strong password upon update (#83959)
* add drawer for auth settings

* add StrongPasswordField component

* Add style to different behaviours

* update style for component

* add componenet to ChangePasswordForm

* pass the event handlers to the child component

* add style for label container

* expose strong password policy config option to front end

* enforce password validation with config option
2024-03-07 01:56:48 -06:00
Alexander Weaver
201f5d3ac9
Alerting: Extract large closures in ruleRoutine (#84035)
* extract notify

* extract resetState

* move evaluate metrics inside evaluate

* split out evaluate
2024-03-06 16:39:23 -06:00
Alexander Weaver
7a171fd14a
Regenerate openapidocs at 1.21.8 to match ci (#84037)
* Regenerate openapidocs at 1.21.8 to match ci

* Adjust trigger to work on the actual outputted files

* Also put go.mod and go.sum in the triggers

* manually fix

* Make an arbitrary change rather than touching the trigger to force a run

* Drop all triggers - run all the time

* Print diff - taken from @papagian's PR

* Manual fixes to swagger doc

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-03-06 16:08:45 -06:00
gotjosh
948c8c45d6
Alerting: Use Alertmanager types extracted into grafana/alerting (#83824)
* Alerting: Use Alertmanager types extracted into grafana/alerting

We're in the process of exporting all Alertmanager types into grafana/alerting so that they can be imported in the Mimir Alertmanager, without a neeed to import Grafana directly.

This change introduces type aliasing for all Alertmanager types based on their 1:1 copy that now live in grafana/alerting.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
---------

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-03-06 20:48:32 +00:00
Alexander Weaver
d5fda06147
Alerting: Decouple rule routine from scheduler (#84018)
* create rule factory for more complicated dep injection into rules

* Rules get direct access to metrics, logs, traces utilities, use factory in tests

* Use clock internal to rule

* Use sender, statemanager, evalfactory directly

* evalApplied and stopApplied

* use schedulableAlertRules behind interface

* loaded metrics reader

* 3 relevant config options

* Drop unused scheduler parameter

* Rename ruleRoutine to run

* Update READMED

* Handle long parameter lists

* remove dead branch
2024-03-06 13:44:53 -06:00
Josh Hunt
6a4e0c692a
Page: Use browser native scrollbars for the main page content (#82919)
* remove custom scroll bars from Page component

* make flagged scroller the actual scrolling element,

* enable feature flag by default

* re-enable the scroll props in Page

* rename feature toggle

* fix css

* only update when deleted

* set .scrollbar-view on our scrolling wrapper

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-03-06 15:06:47 +00:00
Ieva
2c5b72e844
AuthZ: add headers for IP range AC checks for data source proxy requests (#81662)
* add a middleware that appens headers for IP range AC to data source proxy requests

* update code

* add tests

* fix a mistake

* add logging

* refactor to reuse code

* small cleanup

* skip the plugins middleware if the header is already set

* skip the plugins middleware if the header is already set
2024-03-06 12:40:48 +00:00
Eric Leijonmarck
e611a736ed
Serviceaccounts: Add ability to add samename SA for different orgs (#83893)
* add ability to add samename SA for different orgs

* Update pkg/services/user/userimpl/user.go

* fix tests

* refactor name

* removed tests

* add migration

* fix linting
2024-03-06 09:53:58 +01:00
Dan Cech
7e4badff1d
Storage: Use our own key format and support unnamespaced objects (#83929)
* use our own key format and support unnamespaced objects

* fix tests
2024-03-05 16:31:39 -05:00
Ryan McKinley
3e86a4edc8
PanelTitleSearch: Show datasource usage in plugins (#83922) 2024-03-05 22:20:38 +02:00
Charandas
e916372249
K8s: bug fixes for file storage to allow for watcher initialization on startup (#83873)
---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-03-05 10:34:47 -08:00
Dan Cech
9fa9eaab44
Storage: Support get with resourceversion (#83849)
support getting old resourceversion, return explicit resource version in list
2024-03-05 10:57:32 -05:00
Carl Bergquist
b3efb4217e
Cfg: Adds experimental scope grafana.ini settings (#83174)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-03-05 16:41:19 +01:00
Dan Cech
7b4925ea37
Storage: Watch support (#82282)
* initial naive implementation

* Update pkg/services/store/entity/sqlstash/sql_storage_server.go

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>

* tidy up

* add action column, batch watch events

* initial implementation of broadcast-based watcher

* fix up watch init

* remove batching, it just adds needless complexity

* use StreamWatcher

* make broadcaster generic

* add circular buffer to replay recent events to new watchers

* loop within poll until all events are read

* add index on entity_history.resource_version to support poller

* increment r.Since when we send events to consumer

* switch broadcaster and cache to use channels instead of mutexes

* cleanup

---------

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
2024-03-05 10:14:38 -05:00
ismail simsek
2cce9aa2f7
Chore: Move tracing function in influxdb package (#83899)
move tracing function in influxdb package
2024-03-05 07:34:08 -06:00
Michael Mandrus
73c4b24a52
Queries: Fix debug logging of metrics queries (#83877)
fix log statements
2024-03-05 08:27:44 -05:00
Ivan Ortega Alba
a7c06d26f1
Dashboards: Add new toggle for dashboard changes out of dashgpt toggle (#83897) 2024-03-05 14:01:31 +02:00
Karl Persson
22074c5026
RBAC: add debug log for permission evaluation (#83880)
* fix: add debug log when evaluating permissions that includes target permissions
2024-03-05 08:50:19 +01:00
Alexander Weaver
1bb38e8f95
Alerting: Move ruleRoutine to be a method on ruleInfo (#83866)
* Move ruleRoutine to ruleInfo file

* Move tests as well

* swap ruleInfo and scheduler parameters on ruleRoutine

* Fix linter complaint, receiver name
2024-03-04 17:15:55 -06:00
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
Ryan McKinley
5aa965b9e9
Prometheus: remove cue definition (#83808)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-04 10:23:32 -08: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
Will Browne
c644826f50
Query: Add query type to json marshal/unmarshal (#83821)
add query type to json marshal/unmarshal
2024-03-04 16:06:57 +01: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
linoman
67c062acc7
Adjust HD validation default value (#83818) 2024-03-04 12:45:07 +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
Todd Treece
869b89dce4
K8s: Add accept header to ctx (#83802) 2024-03-01 20:32:59 -05:00
Ryan McKinley
d7bcd119c3
K8s: improve openapi generation (#83796) 2024-03-02 00:26:04 +02: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
foehammer
1c2b8576e1
CloudWatch: de-duplicate implementation of AWSDatasourceSettings.Load in LoadCloudWatchSettings (#83556) 2024-03-01 10:48:20 -05:00
Gábor Farkas
142ac22023
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx" (#83760)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)"

This reverts commit 8c18d06386.
2024-03-01 12:20:47 +01: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
Misi
75b020c19d
Cfg: Add a setting to configure if the local file system is available (#83616)
* Introduce environment.local_filesystem_available

* Only show TLS client cert, client key, client ca when local_filesystem_available is true

* Rename LocalFSAvailable to LocalFileSystemAvailable
2024-03-01 10:39:50 +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
Ryan McKinley
74115f1f08
Chore: fix apiserver integration tests (#83724)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-02-29 14:58:49 -08:00
JERHAV
b2cb8d8038
CloudWatch: Remove unnecessary sortDimensions function (#83450)
Remove sortDimension

Closes #83338
2024-02-29 08:54:37 -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
David Harris
5572158eea
chore: update core plugin descriptions (#83449)
* update alertmanager

* fix typo

* update candlestick

* update histogram

* update xy

* fix prettier

* dh-update-desc/ update snapshots

* dh-update-desc/ revert variable

* update failing test snapshot

---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-02-29 13:14:12 +00:00
Levente Balogh
f394e8333e
Chore: remove the dataConnectionsConsole feature toggle (#83661)
chore: remove `dataConnectionsConsole` feature toggle
2024-02-29 10:29:41 +01:00
Selene
f8ce8d0600
Schemas: Restore spec core go generation (#83594)
* Restore spec core go generation

* Fix go imports
2024-02-29 10:20:28 +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
Gábor Farkas
8c18d06386
Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)
* postgres: switch from lib/pq to pgx

* postgres: improved tls handling
2024-02-28 07:52:45 +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
Adam Yeats
facb19fefb
AzureMonitor: Fix mishandled resources vs workspaces (#83184) 2024-02-27 16:46:29 +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
Yuri Tseretyan
6a11bee6af
Alerting: Deprecate max_annotations_to_keep and max_annotation_age in [alerting] configuration section (#83266)
* introduce new config section [unified_alerting.state_history.annotations] and deprecate settings in [alerting]

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-02-26 17:04:27 -05:00
Isabella Siu
bdeff84068
CloudWatch: Refactor "getDimensionValuesForWildcards" (#83335) 2024-02-26 16:19:45 -05:00
Isabella Siu
44639e1063
CloudWatch: Fetch externalId from settings instead of env (#83332) 2024-02-26 16:18:22 -05:00
Isabella Siu
0bfe9db668
CloudWatch: Move SessionCache onto the instance (#83278) 2024-02-26 15:59:54 -05: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
Mihai Doarna
7b2fa28e0b
SSO: update info field from SocialBase struct (#83407)
update info field from SocialBase struct
2024-02-26 18:02:46 +02:00
Isabella Siu
7f8a87458f
CloudWatch: Remove unused handleGetRegions and regionCache (#83333)
* remove unused handleGetRegions and regionCache

* cleanup
2024-02-26 09:35:59 -05: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
Khushi Jain
d02de5ddb9
Image Rendering: Add settings for default width, height and scale (#82040)
* Add Image width & height

* ability to change default width, height and scale

* default ini

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/setting/setting.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/setting/setting.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Added docs, changed frontend

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/dtos/frontend_settings.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/frontendsettings.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/render.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* add query float 64

* Update packages/grafana-runtime/src/config.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/dashboard/components/ShareModal/utils.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* spacing

* fix tests

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-02-26 13:27:34 +01:00
Andres Martinez Gotor
fc8a9aad22
Datasource API: Add config to ctx (#83386) 2024-02-26 13:02:55 +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
Selene
dea0a0f6c8
Kinds: Generate k8 resources without use kindys/thema (#83310)
Generate k8 resources reading cue file directly instead of use thema/kindsys binding
2024-02-26 10:18:19 +01:00
Todd Treece
110028706a
K8s: Update codegen to support new packages (#83347)
---------

Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2024-02-23 16:36:23 -08:00
Todd Treece
e5a26a3f7c
K8s: Add apimachinery and apiserver packages (#83190) 2024-02-23 15:15:43 -05:00
Tania
8895b43c85
Chore: Remove docs and kinds report generators (#83277)
* Chore: Remove codegen for docs

* Remove kindsysreport
2024-02-23 20:06:43 +01: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
Todd Treece
49d3cb29eb
Chore: Add go workspace (#83191)
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-23 08:54:24 -05: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
Gábor Farkas
ae77fe3602
postgres: do not use unexported grafana-core config (#83241)
* postgres: do not use unexported grafana-core config

* fixed wrong value
2024-02-22 16:47:03 +01: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
Pablo
cfcf03bf7a
CloudWatch: Add Firehose kms-related metrics (#83192)
Add KMS firehose metrics
2024-02-21 14:57:31 -05: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
linoman
7e8b679237
OAuth: Improve domain validation (#83110)
* enforce hd claim validation

* add tests
2024-02-21 15:40:18 +01:00
Carl Bergquist
028d0d0c2c
Rename scope.name to scope.title since name exists in metadata. (#83172)
name is part of metadata which is confusing

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-02-21 09:32:57 -05: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
Ryan McKinley
809c1eaddb
Snapshots: delete from same org (#83111)
delete in org
2024-02-21 08:04:15 -05:00
Giuseppe Guerra
68fe045ec7
Plugins: Remove pluginsInstrumentationStatusSource feature toggle (#83067)
* Plugins: Remove pluginsInstrumentationStatusSource feature toggle

* update tests

* Inline pluginRequestDurationWithLabels, pluginRequestCounterWithLabels, pluginRequestDurationSecondsWithLabels
2024-02-21 12:57:40 +01:00
Gábor Farkas
a62dccb0c0
plugins: add more configuration parameters to the plugin-config (#83060)
* envvars: add more configs

* made row-limit optional

* more consistent naming
2024-02-21 12:32:10 +02:00
Alexander Zobnin
e7a1ecca28
Annotations: Improve query performance when using dashboard filter (#83112)
* Annotations: Improve query performance when using dashboard filter

* Add dashboard id filter
2024-02-21 10:30:26 +01:00
Torkel Ödegaard
64e0a4282e
DataQuery: Track panel plugin id not type (#83091) 2024-02-21 09:38:42 +01:00
Charandas
0bd009fb53
K8s: fix nil deref from dummy factory for API Server options (#83132) 2024-02-20 23:00:02 +02:00
Jan Garaj
8162ec2960
CloudWatch: Update AWS/ES metrics (#83037)
CloudWatch: update AWS/ES metrics
2024-02-20 13:46:29 -05:00
Jan Garaj
ef23148b36
CloudWatch: Update AWS/EC2 metrics (#83039)
CloudWatch: update AWS/EC2 metrics
2024-02-20 12:13:50 -05:00
Kyle Brandt
4859cdeae5
K8S/Scopes: App-server for storing scope objects (#81996)
Build out app-server stub

---------

Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-02-20 18:28:27 +02:00
Fabrizio
d1c5e491ac
Zipkin: Decouple Zipkin plugin (#81354) 2024-02-20 18:24:40 +02:00
Andres Martinez Gotor
7f9ebe5464
Chore: Make the secret table name configurable (#83106) 2024-02-20 16:56:43 +01:00
Jan Garaj
3829da0616
CloudWatch: Update AWS/Lambda metrics (#83038) 2024-02-20 16:39:03 +01:00
Piotr Jamróz
30178d468f
Skip a flaky test (#82522)
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
2024-02-20 15:08:29 +01:00
Ida Štambuk
5431c51490
Cloudwatch: Add linting to restrict imports from core (#82538)
---------

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2024-02-20 14:52:11 +01:00
Kristina
9d6da82e36
Query History: Count using SQL, not post query (#82208)
* Count in SQL, not externally

* Fix linter
2024-02-20 07:32:40 -06:00
Jan Garaj
914f033497
CloudWatch: Update AWS/AutoScaling metrics (#83036) 2024-02-20 11:22:28 +01:00
Gábor Farkas
57499845c2
envvars: improve tests (#83071)
* envvars: improve tests

* removed commented-out code

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2024-02-20 09:41:11 +02:00
Matthew Jacobson
87ab98ea95
Alerting: Fix panic in provisioning filter contacts by unknown name (#83070) 2024-02-19 17:30:13 +02:00
Jan Garaj
bfd5475e1e
CloudWatch: Update AWS/Kafka metrics (#83035) 2024-02-19 12:04:23 +01:00
Gábor Farkas
7f77be8f85
postgres: tls: only use non-empty certificates (#82182) 2024-02-19 11:58:42 +01:00
Serge Zaitsev
1aff748e8f
Use split scopes instead of substr in search v1 (#82092)
* use split scopes instead of substr in search v1

* tests, of course

* yet, some test helpers dont use split scopes

* another test helper to fix

* add permission.identifier to group by

* check if attribute is uid

* fix tests

* use SplitScope()

* fix more tests
2024-02-18 22:26:08 +01:00
Ryan McKinley
f23f50f58d
Expressions: Add model struct for the query types (not map[string]any) (#82745) 2024-02-17 02:59:11 +02:00
Matthew Jacobson
46a77c0074
Alerting: Validate upgraded receivers early to display in preview (#82956)
Previously receivers were only validated before saving the alertmanager
configuration. This is a suboptimal experience for those upgrading with preview
as the failed channel upgrade will return an API error instead of being
summarized in the table.
2024-02-16 15:17:07 -05:00
Sofia Papagiannaki
38e8c62972
Folders: Switch order of the columns in folder table indexes so that org_id becomes first (#82454)
* Folders: Switch order of the columns in folder table so that org_id becomes first
2024-02-16 21:10:46 +02:00
Xavi Lacasa
46c26bbd0b
Auth: Fix email verification bypass when using basic authentication (#82914) 2024-02-16 18:54:59 +01:00
William Wernert
fabaff9a24
Alerting: Create metric for rules using simple notifications (#82904)
---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-02-16 19:01:49 +02:00
Matthew Jacobson
dfaf6d1e2e
Alerting: Dry-run legacy upgrade on startup (#82835)
Adds a feature flag (alertingUpgradeDryrunOnStart) that will dry-run the legacy 
alert upgrade on startup. It is enabled by default.

When on legacy alerting, this feature flag will log the results of the legacy 
alerting upgrade on startup and draw attention to anything in the current legacy 
alerting configuration that will cause issues when the upgrade is eventually 
performed. It acts as a log warning for those where action is required before 
upgrading to Grafana v11 where legacy alerting will be removed.
2024-02-16 11:29:54 -05:00
Laura Fernández
7422a90e8b
ReturnToPrevious: modify stage of the feature toggle (#82912) 2024-02-16 17:00:51 +01:00
Matthew Jacobson
e7c6e9c5c9
Alerting: Fix migration edge-case race condition for silences (#81206)
If the db already has an entry in the kvstore for the silences of an
alertmanager before the migration has taken place, then it's possible that the
active alertmanager will overwrite the silence file created by the migration
before it has a chance to load it into memory.

This should not happen normally but is possible in edge-cases.

This change opts to bypass the unnecessary step of writing the silences to disk
during the migration and instead write them directly to the kvstore. This avoids
 the race condition entirely and is more correct as we treat the database as the
  source of truth for AM state.
2024-02-16 10:47:34 -05:00
Sven Grossmann
7f7ab32444
Elasticsearch: Add error source to logs (#82901) 2024-02-16 16:28:46 +01:00
Todd Treece
8f0431ba46
K8s: Pass ID token in X-Extra-id-token header (#82893) 2024-02-16 17:07:37 +02:00
kay delaney
82e3e2e558
LibraryPanels/RBAC: Fix issue where folder scopes weren't being correctly inherited (#82700) 2024-02-16 14:17:41 +00:00
Karl Persson
9e04fd0fb7
AuthToken: Remove client token rotation feature toggle (#82886)
* Remove usage of client token rotation flag

* Remove client token rotation feature toggle
2024-02-16 15:03:37 +01:00
Giuseppe Guerra
6ce0efeb41
Plugins: Enable feature toggle angularDeprecationUI by default (#82880)
* Plugins: Enable feature toggle angularDeprecationUI by default

* Clarified feature toggle description
2024-02-16 14:46:14 +02:00
Ieva
7343102d59
RBAC: Migration to remove the scope from permissions where action is alert.instances:read (#82202)
* add a migration to remove the scope from any permissions where action is alert.instances:read

* linting
2024-02-16 11:52:43 +00:00
Misi
bb9d5799cf
Auth: Load oauth_allow_insecure_email_lookup using the SettingsProvider (#82460)
* wip

* Introduce fixed:server.config:writer role

* Fix tests

* Update name
2024-02-16 12:05:00 +01:00
linoman
ac84069071
Password policy (#82268)
* add password service interface

* add password service implementation

* add tests for password service

* add password service wiring

* add feature toggle

* Rework from service interface to static function

* Replace previous password validations

* Add codeowners to password service

* add error logs

* update config files


---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-02-16 04:58:05 -06:00
Gabriel MABILLE
846eadff63
RBAC Search: Replace userLogin filter by namespacedID filter (#81810)
* Add namespace ID

* Refactor and add tests

* Rename maxOneOption -> atMostOneOption

* Add ToDo

* Remove UserLogin & UserID for NamespaceID

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* Remove unecessary import of the userSvc

* Update pkg/services/accesscontrol/acimpl/service.go

* fix 1 -> userID

* Update pkg/services/accesscontrol/accesscontrol.go

---------

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2024-02-16 11:42:36 +01:00
Misi
fe0fc08b93
Chore: Update ssoSettingsApi feature toggle state to Public Preview (#82521)
Update feature toggle state to Public Preview
2024-02-16 12:20:08 +02:00
ismail simsek
94f544c9f6
InfluxDB: Fix tag interpolation when varable used within a regex pattern (#82785)
* fix tag interpolation

* remove redundant variables
2024-02-16 10:20:09 +01:00
Sven Kirschbaum
86c618a6d6
Alerting: Escape namespace and group path parameters (#80504)
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2024-02-16 09:43:47 +01:00
Sofia Papagiannaki
69f604f7fa
Chore: Fix benchmarks (#82714) 2024-02-16 10:40:39 +02:00
Nathan Marrs
cdd3e1c776
chore: Promote panel monitoring feature toggle to GA (#82472) 2024-02-15 21:29:59 -08:00
Yuri Tseretyan
5985876f4a
Alerting: make feature flag alertingSimplifiedRouting public (#82808) 2024-02-15 17:58:34 -05:00
Matthew Jacobson
118e4a50b7
Alerting: Remove start page of legacy upgrade preview (#82010)
Alerting: Remove start page of upgrade preview

Alerting upgrade page will now always show the summary table even before
upgrading any alerts or notification channels. There a few reasons for this:

- The information on the start page is redundant as it's now contained in the
documentation.
- Previously, if some unexpected issue prevented performing a full upgrade, a
user would have limited to no means to using the preview tool to help fix the
problem. This is because you could not see the summary table until the full
upgrade was performed at least once. Now, you can upgrade individual alerts and
notification channels from the beginning.
2024-02-15 17:34:00 -05:00
Ryan McKinley
c879588332
APIServer: Use options pattern in standalone mode (#82760)
use options
2024-02-15 12:00:20 -08:00
Julien Duchesne
ba63e62311
Alerting: Return provenance of notification templates (#82274) 2024-02-15 14:35:54 -05:00
Marcus Efraimsson
b894d26cbc
SQLStore: New store without side-effects (#82657) 2024-02-15 14:03:55 -04:00
Todd Treece
f593161ef6
K8s: Set X-Remote- headers for SignedInUser (#82543) 2024-02-15 12:29:36 -05:00
William Wernert
b7bbc5058f
Alerting: Don't validate rules on group update if they've only been reordered (#81841)
---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-15 12:03:28 -05:00
Ieva
4d53385d5f
RBAC: allow listing permissions on the root folder (#82184)
* allow returning AC metadata for the root folder

* add a test

* share the reserved root folder UID with frontend
2024-02-15 16:13:14 +00:00
Yuri Tseretyan
1eebd2a4de
Alerting: Support for simplified notification settings in rule API (#81011)
* Add notification settings to storage\domain and API models. Settings are a slice to workaround XORM mapping
* Support validation of notification settings when rules are updated

* Implement route generator for Alertmanager configuration. That fetches all notification settings.
* Update multi-tenant Alertmanager to run the generator before applying the configuration.

* Add notification settings labels to state calculation
* update the Multi-tenant Alertmanager to provide validation for notification settings

* update GET API so only admins can see auto-gen
2024-02-15 09:45:10 -05:00
ismail simsek
916a7bbb08
Prometheus: Move converter in prometheus package (#82269)
* use jsoniter from sdk

* move converter into the prometheus

* remove jsonitere

* unit test

* remove redundant ownership
2024-02-15 15:09:30 +01:00
Gábor Farkas
c6d91e9065
sql: remove unused code (#82527) 2024-02-15 12:25:35 +01:00
Gábor Farkas
1bab82ab36
mssql: socks proxy: use plugin-sdk (#82407) 2024-02-15 12:01:18 +01:00
Ryan McKinley
3482c8ef09
Chore: Add omit wrapper for xorm (#82476) 2024-02-14 12:19:46 -08:00
Alexander Weaver
d4ae10ecc6
Alerting: Small refactor, move unrelated functions out of fetcher (#82459)
Move unrelated functions out of fetcher
2024-02-14 20:01:32 +02:00
Diego Augusto Molina
ff08c0a790
Chore: improve test readability in ngalert/schedule (#82453)
Chore: improve test readability
2024-02-14 14:53:32 -03:00
Dominik Prokop
62efe6e170
Panel Query Options: Support query caching options (#82448)
* schema update

* Panel Query Options: Support query caching options
2024-02-14 09:19:39 -08:00
Dominik Prokop
f016f95298
GroupBy variable core integration (#82185)
* Bump scenes

* Make GroupByVariableModel a VariableWithOptions

* Serialise/deserialise group by variable

* WIP: Group by variable editor

* WIP tests

* Group by variable tests

* add feature toggle and gate variable creation behind it

* Fix types

* Do not resolve DS variable

* Do not show the message if no DS is selected

* Now groupby has options and current

* Update public/app/features/dashboard-scene/settings/variables/components/GroupByVariableForm.test.tsx

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* don't allow creating groupby if toggle is off + update tests

* add unit tests

* remove groupByKeys

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-02-14 09:18:04 -08:00
Sven Grossmann
e422309bc4
Loki: Enable lokiStructuredMetadata feature flag by default (#82325) 2024-02-14 17:24:56 +01:00
Nathan Marrs
ce750e0618
Deprecation: Create explicit feature toggles for remaining panels (#82217) 2024-02-14 18:06:25 +02:00
Diego Augusto Molina
9c29e1a783
Alerting: Fix data races and improve testing (#81994)
* Alerting: fix race condition in (*ngalert/sender.ExternalAlertmanager).Run

* Chore: Fix data races when accessing members of *ngalert/state.FakeInstanceStore

* Chore: Fix data races in tests in ngalert/schedule and enable some parallel tests

* Chore: fix linters

* Chore: add TODO comment to remove loopvar once we move to Go 1.22
2024-02-14 12:45:39 -03:00
Misi
12b1170631
Auth: Validation fixes for SSO Settings (#82252)
* Validation fixes

* Add URL validations + tests

* Add ApiUrl validation

* Refactor validators

* lint

* Clean up

* Improvements
2024-02-14 16:06:52 +01:00
Yulia Shanyrova
9dcb7800de
Plugins: Add fuzzy search to plugins catalogue (#81001)
* WIP add fuzzysearch to plugins catalog

* Add keywords to the plugins listing output

* add fuzzy search to plugin catalog, add keywords to plugins at frontend side

* refactor fuzzysearch function after review

* review changes

* change the version of uFuzzy library

* change reduce result object in getPluginDetailsForFuzzySearch

* fix yarn lock error

* fix helpers tests

* fix frontend searching test

* fix frontend linting issues

* fix tests

---------

Co-authored-by: Esteban Beltran <esteban@academo.me>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
2024-02-14 14:30:24 +01:00
Gábor Farkas
2938f891dd
mysql: socks proxy: use plugin-sdk (#82375) 2024-02-14 13:05:47 +01:00
Gábor Farkas
4c221966e4
postgres: socks proxy: use plugin-sdk (#82376) 2024-02-14 13:05:31 +01:00
Ieva
7c44dd713a
IP range AC: Add X-Real-IP header (#82390)
add X-Real-IP header
2024-02-14 11:45:55 +00:00
ismail simsek
63670b7adc
Chore: Use jsoniter in prometheus from grafana-plugin-sdk-go (#82359)
use jsoniter from grafana-plugin-sdk-go
2024-02-13 21:19:13 +01:00
Sofia Papagiannaki
28de94f6a2
Folders: Modify folder service Get() to optionally return fullpath (#81972)
* Folders: Modify Get() to optionally return fullpath

* Set FullPath to folder title if feature flag is off

* Apply suggestion from code review
2024-02-14 04:47:46 +11:00
Ezequiel Victorero
dbde08b03c
Scenes: Refactor original snapshot button in a new component (#82199) 2024-02-13 14:15:55 -03:00
Alexander Weaver
ccb4533a86
Alerting: Remove unused AlertRuleVersionWithPauseStatus (#82383)
Remove unused AlertRuleVersionWithPauseStatus
2024-02-13 10:56:24 -06:00
ismail simsek
3f940f4da1
Chore: Use jsoniter in influxdb from grafana-plugin-sdk-go (#82360)
use jsoniter from grafana-plugin-sdk-go
2024-02-13 17:47:00 +01:00
Alexander Weaver
99fa064576
Alerting: Emit warning when creating or updating unusually large groups (#82279)
* Add config for limit of rules per rule group

* Warn when editing big groups through normal API

* Warn on prov api writes for groups

* Wire up comp root, tests

* Also add warning to state manager warm

* Drop unnecessary conversion
2024-02-13 08:29:03 -06:00
Ivana Huckova
082f020b7d
Elasticsearch: Fix resource calls for paths that include : (#82327)
* Elasticsearch: Fix resource calls for paths that include :

* Add tests

* Add test case and comment

* Remove redundant comment
2024-02-13 13:44:08 +01:00