Commit Graph

7661 Commits

Author SHA1 Message Date
Eric Leijonmarck
f9ad81f715
LBAC for datasources: Allow self serve (#93477)
* LBAC for datasources: Allow self serve

* capitilized LogQL
2024-09-20 14:24:40 +01:00
Gabriel MABILLE
8d84517103
AuthN: Introduce DefaultOrgID function for managed service accounts (#93432)
* Managed Service Accounts: Use AutoAssignOrgID

* Fix the IsExternalServiceAccount function

* Reassign service account role

* Account for AutoAssignOrg

* Update pkg/services/serviceaccounts/models.go

* Simplify IsExternalServiceAccount function

* Add tests

* Easier to understand test

* Revert small change
2024-09-20 14:43:29 +02:00
Matheus Macabu
945484232c
CloudMigrations: remove unused code from sync migration approach (#93430) 2024-09-20 08:58:11 +02:00
William Wernert
f1ba7deff5
Alerting: Also clear fields in model/store validation for recording rules (#93506)
* Fix model validation

* Remove validation from provisioning service
2024-09-20 00:27:37 +03:00
Aaron Godin
735332570f
feat: GroupSync extension UI (#91777)
* feat: supporting code for groupsync extension UI

* Add result of running i18n extraction

* Place the UI behind a feature toggle as well as the license feature

* Also add access checks to route loading of groupsync route with feature toggle

* Add access check on permissions to show External group sync in nav

* fix: New version of multiOrgRoleOptions hook

* Remove OSS route definition

* Apply feedback on nav title
2024-09-19 14:58:11 -05:00
Alexander Weaver
534bfba7e3
Alerting: Use typed errors in prometheus remote writer (#93500)
Strongly typed writer errors
2024-09-19 13:34:35 -05:00
Michael Mandrus
f4c5c5c418
Chore: Fix flaky cloud migration test due to ordered steps running in parallel (#93491)
don't run test in parallel
2024-09-19 18:45:02 +03:00
Alexander Akhmetov
9f5b05f936
Alerting: Add metadata field with editor_settings to alert rule (#93245) 2024-09-19 16:43:41 +02:00
Gabriel MABILLE
7ef13497a8
AuthN: Ext JWT support actions (#92486) 2024-09-19 14:25:43 +02:00
Ryan McKinley
f21a5987a2
Plugins: Expose datasources as apiservers feature toggle (#93250) 2024-09-19 11:28:27 +03:00
Jean-Philippe Quéméner
4f04b5849e
feat(apiserver): add flag to control the request size limit (#93431) 2024-09-18 20:39:32 +03:00
Gabriel MABILLE
bfb25e33eb
RBAC: AccessControlOnCall general availability (#93383)
RBAC: GA accessControlOnCall
2024-09-18 08:58:05 +02:00
Alexander Akhmetov
e59ea00518
Alerting: Add TLS, QoS and retain options to the MQTT receiver (#92331) 2024-09-17 21:11:16 +02:00
Yuri Tseretyan
0f788d8d83
Alerting: Support for renaming receivers (#93349)
* update RenameReceiverInNotificationSettings in DbStore to check for provisioning

* implement renaming in receiver service and provisioning

* do not patch route when stitching

* fix bug in stitching because it returned new name but the old one was expected

* update receiver service to always return result converted from storage model this makes sure that UID and version are consistent with GET\LIST operations

* use provided metadata.name for UID of domain model because rename changes UID and request fails

* remove rename guard

* update UI to not disable receiver name when k8s api enabled

* create should calculate uid from name because new receiver does not have UID yet.
2024-09-17 19:07:31 +03:00
Matthew Jacobson
1ea873950b
Alerting: Reject receiver update in config API when FlagAlertingApiServer enabled (#93300)
* Reject receiver update in config API when FlagAlertingApiServer enabled
2024-09-17 16:49:17 +03:00
kay delaney
cbf2aa993e
LibraryPanels: Fix folderUid nil pointer dereference (#93400) 2024-09-17 13:03:49 +00:00
Jean-Philippe Quéméner
10314585ec
fix(alerting): extend instant vector check for non-nullable types (#93323) 2024-09-17 13:20:40 +02:00
Misi
41cd0f5180
Auth: Add improvedExternalSessionHandling feature toggle (#93385)
Add improvedExternalSessionHandling feature toggle
2024-09-17 13:54:39 +03:00
Matheus Macabu
4f21ecf982
CloudMigrations: improve nil handling (#93257)
* CloudMigrations: fail token decryption if session is not found or without a token

* CloudMigrations: do not report event if session is nil
2024-09-17 08:59:47 +02:00
Matthew Jacobson
3bf77d2e05
Alerting: Include in-use metadata in k8s receiver LIST & GET (#93016)
* Include in-use metadata in k8s receiver List & Get
2024-09-13 20:20:09 +03:00
Matthew Jacobson
bd9fc8127b
Alerting: Fix config api POST provenance guard (#93244)
* Add failing tests

* Fix bug in provenance guard on renaming receivers or moving integrations

* Linting
2024-09-13 12:42:33 -04:00
Andres Martinez Gotor
01a4e6b9af
Remove the need for plugins to implement AdmissionHandler for v0alpha1 (#93272) 2024-09-13 09:08:26 +02:00
Matthew Jacobson
ff6a20f54a
Alerting: Include access control metadata in k8s receiver LIST & GET (#93013)
* Include access control metadata in k8s receiver List & Get

* Add tests for receiver access

* Simplify receiver access provisioning extension

- prevents edge case infinite recursion
- removes read requirement from create
2024-09-12 20:57:53 +03:00
Matthew Jacobson
0aa87fd1d4
Alerting: Fix DashboardUID typo in json provisioning api (#65143)
* Alerting: Fix dasboardUid typo in json provisioning api

The json tag for DashboardUID was incorrectly set to dasboardUid in the provisioning api. This change fixes the typo while keeping backwards compatibility for the typo.

* Add alerting-squad as CODEOWNER for services/provisioning/alerting
2024-09-12 20:44:03 +03:00
Yuri Tseretyan
f8fa5286a1
Alerting: Introduce alert rule models in storage (#93187)
* introduce storage model for alert rule tables
* remove AlertRuleVersion from models because it's not used anywhere other than in storage
* update historian xorm store to use alerting store to fetch rules

* fix folder tests

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-09-12 13:20:33 -04:00
William Wernert
efe62086f9
Alerting: Add type label rule_group_rules metric (#91425)
* Add group and type labels to rule_group_rules metric

* Don't include group to avoid high cardinality

* Add comments

* Reset rule_group_rules before recording new values

* Edit description for rule_group_rules

* Include ruleGroup combo key in labels

* Fix lint
2024-09-12 17:27:09 +03:00
Ryan McKinley
45eb72e95a
K8s: Use wire to initalize the resource client (#93221) 2024-09-12 17:22:27 +03:00
Jean-Philippe Quéméner
eabf3b9f73
feat(alerting): add support for query service instant vectors (#92091) 2024-09-12 15:33:00 +02:00
Tito Lins
a910188675
Replace prom MustRegister with Register (#92725) 2024-09-12 10:24:12 +02:00
janlugt
9d6935388c
Notifications: Add Message-ID header to outgoing emails (#83752)
* Add Message-ID header to outgoing emails

* change message-id format

* parse adddresses with name
2024-09-12 03:58:06 +00:00
Faye Lin
634d590cf1
Search: Fix a bug when searching folders under the general folder (#91042)
* fix: search returns all folders when folder uid is general
* test: add unit test for FolderUIDFilter when NestedFolders is enabled
2024-09-12 05:55:28 +02:00
Will Browne
0469b0f52e
Plugins: Ensure fetch loading strategy cases for nested plugins (#93209)
* fix

* fix func name
2024-09-11 16:35:13 +03:00
Gilles De Mey
90ee52e8d9
Alerting: New search UI – Part 1 (#91620) 2024-09-11 14:29:26 +03:00
Yuri Tseretyan
cb372d3fa8
Alerting: Support secrets in contact points nested fields (#92035)
Back-end:
* update alerting module
* update GetSecretKeysForContactPointType to extract secret fields from nested options
* Update RemoveSecretsForContactPoint to support complex settings
* update PostableGrafanaReceiverToEmbeddedContactPoint to support nested secrets
* update Integration to support nested settings in models.Integration
* make sigv4 fields optional

Front-end:
* add UI support for encrypted subform fields
* allow emptying nested secure fields
* Omit non touched secure fields in POST payload when saving a contact point
* Use SecretInput from grafana-ui instead of the new EncryptedInput
* use produce from immer
* rename mapClone
* rename sliceClone
* Don't use produce from immer as we need to delete the fileds afterwards

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
2024-09-10 22:26:23 -04:00
Ryan McKinley
d724d463b1
DualWriter: Add mode 5 that always uses storage (#93169) 2024-09-10 13:07:06 -04:00
Gabriel MABILLE
697afc71b4
RBAC: FIX Allow specifying several valid scopes for a kind (#93176)
* PermRegistry: Fix regression with actions applying to multiple scopes

* Add tests

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-09-10 17:22:40 +01:00
Gábor Farkas
c48caf0921
logging: log plugin request start (#92925)
log plugin request start
2024-09-10 13:25:50 +02:00
Arati R.
b12a29a1da
K8s: Implement partial folders api with k8s client (#93089)
* Add kubernetes folder feature toggle
* Add kubernetes routes for getting and creating a folder
* Add documentation for interacting with k8s folders
2024-09-10 11:22:08 +02:00
Eric Leijonmarck
f3ede1f53d
Datasources: allow for query but with warning (#93091)
allow for query but with warning
2024-09-10 10:19:02 +01:00
Aaron Godin
6ded6a8872
feat: Add feature toggle for groupAttributeSync (#93116) 2024-09-09 10:29:43 -05:00
Adela Almasan
af48d3db1e
Canvas: Add actions support (#90677)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-09-09 09:11:55 -05:00
Andrej Ocenas
5e2ac24890
Sidecar: Add split view and basic APIs for extensions (#91648)
* Add split view and basic APIs to extensions

* Add comments

* Update public/app/AppWrapper.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Moved the .grafana-app element and deduplicate some code

* Remove the provider variants of usePluginLinks/Components

* Change buildPluginSectionNav

* Update comment

* Use eventBus

* Remove non existent exports

* refactor: use a sidecar service to encapsulate the state

* Don't wrap single app in split wrapper

* Use hook splitter

* Remove inline styles

* Type the style props from useSplitter

* Move the overflow style changes to appWrapper

* Deduplicate some common top level providers

* Move modals

* Move routes wrappers to it's own file

* Use better css and add comments

* Remove query rows app extension point

* Fix test

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-09-09 14:45:05 +02:00
Will Browne
2c47d246fc
Plugins: Introduce LoadingStrategy for frontend loading logic (#92392)
* do it all

* feat(plugins): move loadingStrategy to ds pluginMeta and add to plugin settings endpoint

* support child plugins and update tests

* use relative path for nested plugins

* feat(plugins): support nested plugins in the plugin loader cache by extracting pluginId from path

* feat(grafana-data): add plugin loading strategy to plugin meta and export

* feat(plugins): pass down loadingStrategy to fe plugin loader

* refactor(plugins): make PluginLoadingStrategy an enum

* feat(plugins): add the loading strategy to the fe plugin loader cache

* feat(plugins): load fe plugin js assets as script tags based on be loadingStrategy

* add more tests

* feat(plugins): add loading strategy to plugin preloader

* feat(plugins): make loadingStrategy a maybe and provide fetch fallback

* test(alerting): update config.apps mocks to include loadingStrategy

* fix format

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-09-09 10:38:35 +01:00
Jean-Philippe Quéméner
368c4e53f1
feat(apiserver): refactor the hooking mechanism for standalone apiserver (#93001)
It now uses a full build handler chain that can be passed from up top to `SetupConfig`.

Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2024-09-06 14:12:12 -07:00
Tito Lins
539d363d2c
Create histogram and observe grafana config size (#93028) 2024-09-06 18:25:16 +02:00
Andre Pereira
72ed3107fa
Tempo: Remove usage of traceQLStreaming feature toggle (#93033)
* Remove usage of traceqlStreaming feature toggle and stop checking for Tempo version

* Increase Grafana Live's ClientQueueMaxSize to 4mb to support larger responses from Tempo
2024-09-06 16:12:21 +01:00
Laura Benz
1be0105eb7
RestoreDashboards: Show root location as 'Dashboards' in folder picker (#92936)
* refactor: replace label if its value is Root

* refactor: replace label in the backend
2024-09-06 14:19:39 +02:00
João Calisto
a45ec2670d
chore(tests): fix flaky SMTP test (#93031) 2024-09-06 13:17:26 +01:00
Claudiu Dragalina-Paraipan
d5ebaa0ef9
[authn] adding appPlatformAccessTokens featureflag (#92991)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-09-05 19:18:44 +03:00
linoman
a0c886922e
Auth: Add LDAP scope to Grafana Admin (#92990)
Add LDAP scope to Grafana Admin
2024-09-05 17:15:47 +01:00