Commit Graph

14046 Commits

Author SHA1 Message Date
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
ismail simsek
6548ea377d
Chore: Bump grafana-plugin-sdk-go version to v0.247.0 (#93095)
* Bump grafana-plugin-sdk-go version to v0.247.0

* make update-workspace

* make update-workspace
2024-09-09 14:36:59 +03: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
Andreas Christou
d61530941a
AzureMonitor: Add errorsource (#92094)
* Add errorsource

* Migrate to individually build metric queries

* Migrate logs queries to be built individually

* Migrate to individually build resource graph queries
2024-09-09 10:29: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
Dave Henderson
e1090db5d9
Chore: Bump Go to 1.23.1 (#93007)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-09-06 20:58:50 +03:00
Todd Treece
85759da360
Tracing: Add Start helper (#93052) 2024-09-06 13:02:17 -04: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
Ryan McKinley
3cf84d1921
Chore: update centrifuge library (#93020) 2024-09-06 12:17:43 +03: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
Claudiu Dragalina-Paraipan
1ce43b4c42
[authn] update authlib and claims versions (#92987)
* update authlib and claims versions

* 2nd make update-workspace

* manual fix
2024-09-05 19:17:15 +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
Karl Persson
bc20592fd4
IAM: Add and use identity ref (#92978)
* Add and use identity ref

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-09-05 16:10:23 +02:00
Matheus Macabu
95ef2a1eb2
CloudMigrations: Fix snapshot creation on Windows systems (#92941)
* cloudmigration: improve error logging stringify body

* deps: update migration snapshot library to v1.3.0 (fix to Windows)
2024-09-05 15:34:20 +02:00
Ashley Harrison
82fe497b9d
Chore: remove adhocFilterOneOf toggle (#92979)
remove adhocFilterOneOf toggle
2024-09-05 15:49:24 +03:00
Claudiu Dragalina-Paraipan
085aaec958
Fix playlist tests (#92837) 2024-09-05 15:41:28 +03:00
Santiago
87f4df4bc3
Remote Alertmanager: update github.com/go-openapi/runtime (v0.27.1 -> v0.28.0) (#92951) 2024-09-05 08:47:38 -03:00
Karl Persson
2bfa607ad0
ServiceAccount: Update service account api resource and add service account token (#92972)
* Create own legacy store function to list service accounts and update api model

* Add service account tokens as a sub resource for service accounts
2024-09-05 13:43:54 +02:00
Arati R.
47cd8288cd
SearchV2: Fix reading library panels (#92961)
* Fix reading of library panel field
* Add test to check reading of library panel field
2024-09-05 13:42:15 +02:00
Mihai Doarna
ebd17adecf
API keys: Return 410 Gone status from POST /auth/keys endpoint (#92965)
* return 410 Gone status from POST /auth/keys endpoint

* generate swagger

* remove postAPIkeyResponse

* re-generate swagger

* remove docs for api key creation endpoint
2024-09-05 13:10:24 +03:00
Ryan McKinley
5441e4c752
Storage: create a client with access to all interfaces, not just ResourceStore (#92967) 2024-09-05 12:52:30 +03:00
Ryan McKinley
9338e40dc3
K8s/IAM: Move identity.grafana.app to iam.grafana.app (#92929) 2024-09-05 09:43:54 +03:00
Dave Henderson
c00a3bed42
chore(tests): Attempting to fix flaxy SMTP unit test (#92786)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-09-04 16:25:44 -04:00
Marcus Efraimsson
0a337ff3b3
Chore: Update SDK to v0.246.0 (#92938) 2024-09-04 17:30:37 +02:00
Gabriel MABILLE
cffaefddc3
Signer: Fix typo (#92928) 2024-09-04 15:01:24 +02:00
Ryan McKinley
cb484f9883
K8s: Move ResourceInfo from common to utils (#92924) 2024-09-04 14:53:14 +03:00
Tom Ratcliffe
aec73f3501
Alerting/Chore: Mock API (MSW) in browser (#89223)
Co-authored-by: joshhunt <josh@trtr.co>
2024-09-04 10:22:03 +01:00
Jean-Philippe Quéméner
5dce149221
feat(querier): propagate all known alerting headers (#92873) 2024-09-03 18:01:27 +02:00
Kyle Brandt
d382ea773a
Prometheus: Enable the promQLScope (Scopes, Adhoc filters and groupby) by default (#92080) 2024-09-03 09:56:25 -04:00
Alexander Zobnin
88259da745
RBAC: Optimize permissions caching (#92673)
* Access control: Use composite cache key for team permissions

* use composite key for teams

* use cache for hotpath (getCachedUserPermissions)

* don't cache empty teams set

* don't pass permissions as argument

* early return if no teams found

* reload cache correctly

* optimize allocations

* Clear user's teams cache

* remove composite cache for teams

* fix linter

* don't clear teams permissions

* pre-allocate memory for basic roles permissions
2024-09-03 15:46:56 +02:00
Serge Zaitsev
e699a71340
Chore: Bump moby version (#92857)
* bump moby version

* update workspace
2024-09-03 15:43:36 +03:00
Ieva
46e81e98cf
RBAC: Always store action sets (#92833)
always store action sets, even if FT is disabled
2024-09-03 11:30:47 +01:00
Piotr Jamróz
d7d22bbbb8
TraceView: Display event names of a span (#91382)
* Display event name of a span

* Clean up

* Retrigger the build

* Show colon only when there are fields to display

* Rollback

* Use event name when exporting to OTLP

* Allow filtering spans by event name

* Show duration as a key/value pair

* Update betterer report (we do not translate panels that are planned to be externalized)

* Fix tests after changing how duration is rendered

* Handle long names

* Test handling long names

* Make parenthesis gray

* Fix a test

* Fix linting

* Fix tests

* Update label
2024-09-03 11:18:50 +02:00
Sven Grossmann
5ad7c47816
Plugin Instrumentation: Add target property to request logs (#91946)
* Plugin Instrumentation: Add `target` property to request logs

* remove comment

* remove error
2024-09-02 17:41:26 +02:00
Arati R.
f26f655615
Provisioning: Fix admin reloading of dashboard configuration (#92462)
* Set dashboard provisioner before provisioning dashboards
* Test provisioner instantiation during dashboard provisioning
2024-09-02 15:48:13 +02:00
Isabella Siu
2d10068714
CloudWatch: Logs queries should retry on throttling errors (#92535)
CloudWatch: logs queries should retry on throttling errors
2024-08-30 13:55:00 -04:00
Karl Persson
294712d7ef
User: Add sub resource and api for user teams (#92649)
* Add sub resource for user teams

* Add test snapshots

* Update to use ref:s
2024-08-30 15:05:27 +02:00
Sergej-Vlasov
00ae49a61a
FeatureToggle - new filters UI feature toggle (#92189)
* add newFiltersUI experimental feature toggle

* adjust Ad hoc filter varibale layout property based on feature toggle

* restore file

* bump to latest scenes
2024-08-30 15:48:13 +03:00
Alexander Akhmetov
152d3540db
Alerting: Log number of dimensions instead of all evaluation results (#92733) 2024-08-30 12:35:02 +02:00
Ashley Harrison
c16cc488c9
AdHocFilters: Add support for new isOneOf multi value operator (#91837)
* handle oneOf operator in prometheus

* use new supportsMultiValueOperators

* remap oneOf to regex in prometheus datasource

* Remap one of operators for scope filters

* use plugin.json property instead of feature toggle

* optional chaining

* fix unit tests

* use getInstanceSettings

* update to latest scenes

* fix unit tests

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-08-30 11:03:44 +01:00
Leonor Oliveira
2e451b2ed7
Use dw dynamic config (#91882)
* Remove kubernetesPlaylists feature_toggle

* Remove unified_storage_mode

* Remove double import

* Read from config instead from feature_toggle

* cover scenario for when unified storage is not defined

* Be temporarily retro compatible with previous feature toggle

* Properly read unified_storage section

* [WIP] Read new format of config

* Fix test

* Fix other tests

* Generate feature flags file

* Use <group>.<resource> schema

* Use <group>.resource format on the FE as well

* Hide UniStore config from Frontend

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

* unwanted changes

* Use feature toggles in the FE. Enforce FTs are present before enabling dual writing
Co-authored-by: Ryan McKinley <ryantxu@users.noreply.github.com>

* use kubernetes playlists feature toggle on the FE

* Remove unwanted code

* Remove configs from the FE

* Remove commented code

* Add more explicit example

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Maicon Costa <maiconscosta@gmail.com>
2024-08-30 11:59:42 +02:00
Pepe Cano
6a29e4aecf
IAM docs: Transform API keys to Migrate API keys docs (#92380)
* IAM docs: Transform `API keys` to `Migrate API keys` docs

* Update links to `API keys` in other doc pages

* Grafana UI: update help button link

* Update OpenAPI/Swagger links

* Update docs/sources/administration/service-accounts/migrate-api-keys.md

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

* Update `relref` links to the new URL

* fix space before em dash

spaces before or after em dashes are not recommended (https://developers.google.com/style/dashes)

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
2024-08-30 11:37:36 +02:00
Jeff Levin
372d0acec8
Instrument tracing across dashboards (#91937)
Add tracing across dashboards and accesscontrol
2024-08-29 22:26:15 -08:00
Yuri Tseretyan
ce64d79027
Alerting: Integration tests for Receiver API (#90632)
---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-08-29 22:27:26 -04:00
Matthew Jacobson
d5fd6aceca
Alerting: Stop redacting receivers by default in receiver_svc (#92631)
* Stop redacting receivers by default in receiver_svc

[REDACTED] is only used in provisioning API since response doesn't include
SecureFields. This is not necessary in k8s or notifications api, instead we do
not include the encrypted settings in Settings at all, leaving it to
SecureFields to specify when a secure field exists.

* Capitalize logs messages
2024-08-29 14:48:59 -04:00
Matthew Jacobson
e43ddd516d
Alerting: Ensure k8s receiver API create/update will never store nil settings (#92701)
Ensure Create/Update will never store nil Settings
2024-08-29 20:00:55 +03:00
Sarah Zinger
8774642788
QueryService: Forward headers to datasource clients (#92329)
Query Service: pass expected headers
2024-08-29 12:47:38 -04:00
maicon
9e6a464328
UniStore: Remove unused feature toggles from docs (#92688)
`grafanaAPIServer` got removed on https://github.com/grafana/grafana/pull/81030
`idForwarding` got removed on https://github.com/grafana/grafana/pull/92209

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-08-29 18:27:38 +03:00
Carl Bergquist
56d35d32e2
Scopes: increase limit on list calls to storage (#92687)
scopes: increase limit on list calls to storage

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-08-29 18:12:11 +03:00
Sarah Zinger
c0b2fafd5e
Ensure that datasource apiservers receive and forwards headers (#92304)
* Ensure that datasource apiservers receive and forwards headers for datasources:
- adds log line for prometheus to see when from alert header is received
- add logging to the datasource apiserver
- Updates the Connect func in sub query to forward expected headers to datasources and log unexpected ones.
2024-08-29 11:06:25 -04:00
maicon
2b3d2e5b40
UniStore: Remove leftover references to unifiedStorage feature toggle (#92685)
it got removed on https://github.com/grafana/grafana/pull/92192

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-08-29 18:04:36 +03:00
Sven Grossmann
15a4ff992b
Explore Logs: Add feature flags (#92670) 2024-08-29 15:55:59 +02:00
Leonor Oliveira
66e0121dd5
Pass resource name into the dual writer initialization (#92654) 2024-08-29 13:30:48 +02:00
Ryan McKinley
82417c916f
K8s: Use stacks plural not singular in grafana namespaces (#92550) 2024-08-29 14:15:00 +03:00
Andres Martinez Gotor
f9cd0fe5d1
Add debug headers when downloading plugins (#92579) 2024-08-29 11:30:21 +02:00
Laura Fernández
8aaa155cb0
singleTopNav: Create feature toggle (#92610) 2024-08-29 10:48:32 +02:00
Karl Persson
56487d37db
Authn: No longer hash service account token twice during authentication (#92598)
* APIKey: Only decode and hash token once during authentication

* Only update last used every 5 minutes
2024-08-29 09:56:23 +02:00
Charandas
4f024d94d8
Authn: resolve issues with setting up a nil identity (#92620) 2024-08-29 00:49:41 +03:00
Ida Štambuk
1735235277
Chore: Update elasticsearch_test.go (#92602) 2024-08-28 17:34:57 +02:00
Gábor Farkas
abca0380a8
use count_bytes_reader from plugin-sdk-go (#92553)
* use count_bytes_reader from plugin-sdk-go

* run `make update-workspace`

* update postgres tests

* update mysql tests

* time back to utc

* make update-workspace done

---------

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2024-08-28 16:44:13 +02:00
Leonor Oliveira
09f102b72e
Remove condition on where we return from unified storage in mode2 (#92593) 2024-08-28 16:31:53 +02:00
Gabriel MABILLE
2a1a43fc9b
PermissionRegistry: Error on unknown kind (#91469)
* PermissionRegistry: Error on unknown kind

* Account for PR feedback

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Add missing alerting scope

---------

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2024-08-28 15:58:25 +02:00
Todd Treece
2bb2183b41
Scopes: Move title and groups to status in ScopeDashboardBinding (#92377)
---------

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
2024-08-28 08:59:18 -04:00
Arati R.
34149c86d0
Provisioning: Prevent provisioning folder errors from failing startup (#92560)
* Prevent provisioning folder errors from failing startup
* Refactor setting of dashboard provisioner
2024-08-28 14:49:00 +02:00
Arati R.
c5b377f06e
Provisioning: Revert "Allow startup when there are dashboard provisioning failures" (#92568)
Revert "Provisioning: Allow startup when there are dashboard provisioning failures (#92201)"

This reverts commit 927ce6c700.
2024-08-28 14:19:59 +02:00
Karl Persson
1eb49e1b0f
Chore: restructure legacy store for identity (#92572)
* Restructure user queries

* restructure display query

* restructure team queries

* restructure team bindings query

* Restructure team members

* Restructure store
2024-08-28 14:15:26 +02:00
Eric Leijonmarck
6a19278f23
API Keys: Removal & Redirect of Create endpoint (#92144)
* API keys: redirecting of create endpont

* update naming and using admonition

* fmt

* Apply suggestions from code review

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

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-08-28 12:20:36 +01:00
Aaron Godin
86e8e3b75d
Revert "RBAC: Optimize permissions caching" (#92548)
Revert "RBAC: Optimize permissions caching (#92412)"

This reverts commit 488e994d37.

Co-authored-by: gamab <gabriel.mabille@grafana.com>
2024-08-28 10:44:38 +02:00
Karl Persson
4addd9637e
Team: Add sub resource and api for team members (#92492)
* Add team members as a sub resource

* Fix and clean up pagination for teams

* Fix and clean up pagination for users

* Fix and clean up pagination for service accounts

* Update snapshots
2024-08-28 10:30:23 +02:00
Todd Treece
85ef26a85d
K8s: Add generic support for status (#92378) 2024-08-28 03:45:04 +03:00
Charandas
af2e79aa83
K8s: namespace mapper should use authlib's util (#92332) 2024-08-27 15:01:42 -07:00
Andreas Christou
931d64b8fc
CI: Run prettier in bump-version workflow (#92195)
Run prettier
2024-08-27 20:21:51 +01:00
maicon
de2c9a06bf
Unified Storage: First iteration Dual Write Syncer (#89809)
* Unified Storage: First iteration Dual Write Syncer

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Leonor Oliveira <9090754+leonorfmartins@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-08-27 13:31:40 -03:00
Stephanie Hingtgen
a4266df16d
SQL Store: Fix parse time setup (#92484) 2024-08-27 17:39:27 +03:00
Misi
a3d688c8ed
CLI: Provide the list of admins if the admin with the default ID was not found (#92217)
* Provide the list of admins if the admin with the default ID was not found

* Clean up

* Update docs

* Update docs/sources/cli.md

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update pkg/cmd/grafana-cli/commands/reset_password_command.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Lint

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-08-27 16:01:33 +02:00
Alexander Zobnin
0e0c877609
Zanzana: Model fixed roles as a part of schema (#92364)
* model fixed roles for dashboards and folders

* Correctly translate fixed role assignments

* minor refactor

* assign fixed roles to teams

* fix linter errors

* Migrate general folder permissions for fixed roles

* fix dashboards:create permission
2024-08-27 15:39:22 +02:00
Ryan McKinley
c59dddf7af
MySQL: Add parseTime=true to SQL connections (#92469) 2024-08-27 14:16:04 +03:00
Ryan McKinley
5a30e12a10
SQLTemplate: Make Ident only work for identifiers (not any string) (#92387) 2024-08-27 13:22:40 +03:00
Laura Benz
1f35bc8346
RestoreDashboards: Make confirmation text consistent (#92388)
* refactor: change wording

* refactor: change API

* refactor: clean up
2024-08-27 13:13:48 +03:00
Ryan McKinley
419edef4dc
LibraryPanels: Expose library panels in dashboard apiserver (#92213) 2024-08-27 12:12:22 +03:00
Alexander Zobnin
488e994d37
RBAC: Optimize permissions caching (#92412)
* Access control: Use composite cache key for team permissions

* use composite key for teams

* use cache for hotpath (getCachedUserPermissions)

* fix linter

* fix sorting

---------

Co-authored-by: Jeff Levin <jeff@levinology.com>
2024-08-27 10:31:52 +02:00
Alexander Akhmetov
7f6b6dea45
Alerting: Change expire placeholder for Pushover in the UI to 10800 seconds (#92379)
* Alerting: Change max retry for Pushover in the UI to 10800 seconds
* Update alerting to 70248a7a3a674e50e026a37205ebac86e1ec25fd
2024-08-27 11:13:58 +03:00
Karl Persson
2872e11c13
Teams: Add apis for team membership (#92204)
* Add TeamBinding resource

* Implement read api:s for TeamBindings
2024-08-27 08:31:29 +02:00
Andrew Hackmann
eac194815e
MSSQL: decouple plugin (#89597)
* decouple from core

* yarn decouple

* make health check work and azure config

* f

* driver error not needed

* merge
2024-08-26 23:09:21 +03:00
Yuri Tseretyan
4755eb5176
Alerting: Support template UID in template service (#92164)
* add uid to template and populate it
* update delete method to support both uid and name
* update UpdateTemplate to support search by UID and fallback to name + support renaming of the template
* update upsert to exit if template not found and uid is specified
* update Get method to address by name or uid

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-08-26 23:05:38 +03:00
Eric Leijonmarck
413b511452
Revert "feat: Add new read filtering to datasources guardian" (#92407)
Revert "feat: Add new read filtering to datasources guardian (#91345)"

This reverts commit 0176ead117.
2024-08-26 13:16:04 -04:00
Alexander Weaver
490d6ba2fd
Alerting: Extend scheduler user with datasources:read (#92410)
Add permission
2024-08-26 10:59:54 -05:00
Matthew Jacobson
32f06c6d9c
Alerting: Receiver API complete core implementation (#91738)
* Replace global authz abstraction with one compatible with uid scope

* Replace GettableApiReceiver with models.Receiver in receiver_svc

* GrafanaIntegrationConfig -> models.Integration

* Implement Create/Update methods

* Add optimistic concurrency to receiver API

* Add scope to ReceiversRead & ReceiversReadSecrets

migrates existing permissions to include implicit global scope

* Add receiver create, update, delete actions

* Check if receiver is used by rules before delete

* On receiver name change update in routes and notification settings

* Improve errors

* Linting

* Include read permissions are requirements for create/update/delete

* Alias ngalert/models to ngmodels to differentiate from v0alpha1 model

* Ensure integration UIDs are valid, unique, and generated if empty

* Validate integration settings on create/update

* Leverage UidToName to GetReceiver instead of GetReceivers

* Remove some unnecessary uses of simplejson

* alerting.notifications.receiver -> alerting.notifications.receivers

* validator -> provenanceValidator

* Only validate the modified receiver

stops existing invalid receivers from preventing modification of a valid
receiver.

* Improve error in Integration.Encrypt

* Remove scope from alert.notifications.receivers:create

* Add todos for receiver renaming

* Use receiverAC precondition checks in k8s api

* Linting

* Optional optimistic concurrency for delete

* make update-workspace

* More specific auth checks in k8s authorize.go

* Add debug log when delete optimistic concurrency is skipped

* Improve error message on authorizer.DecisionDeny

* Keep error for non-forbidden errutil errors
2024-08-26 10:47:53 -04:00
Julien Duchesne
3ac8760321
OpenAPI: Fix ValidationError message attribute (#90846)
It's `message`, not `msg`. It's been fixed for a while here: 9ef6983612/scripts/pull-schema.sh (L46-L49)

I've also reflected the change in the tests
2024-08-26 10:05:37 -04:00
Julien Duchesne
087df1d8e5
OpenAPI: Fix alerting DeleteMuteTiming errors (#91109)
The `GenericPublicError` is not what is actually returned by the API. Using `PublicError` describes the API correctly
2024-08-26 10:04:36 -04:00
Julien Duchesne
0075abe383
OpenAPI: Fix ProvisionedAlertRule.for type (#90841)
This override has been in the client for a while now: 9ef6983612/scripts/pull-schema.sh (L34-L39)

The API expects a string here and transforms it to a duration internally
2024-08-26 10:04:15 -04:00
Kristina
1dd830b9f1
Correlations: Migrate config type to root (#91855)
* WIP

* Validate new field, and add value in provisioning if not defined in correct spot

* Simplify logic, use correct value

* fix tests

* Fix linter errors

* fix swagger and tests

* 😬

* Auto-generation isnt doing this..

* Fix linter

* test if nullable is the issue…

* Change structure on the frontend fields

* Try with backtick

* try programatic quoting

* Try only quote non-ints

* quoting, no backticks

* Remove debugging
2024-08-26 08:02:48 -05:00
Kyle Brandt
84e5c3af22
Prometheus/Promlib: Remove the PrometheusDataplane feature so always enabled (#92218)
This has been default behavior since v10

---------

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2024-08-26 08:53:38 -04:00
Karl Persson
ddee95cb6d
Team: Create permission type for team membership (#92352)
* Create permission type enum for team and remove usage of dashboard permission type
2024-08-23 12:34:34 +02:00
Arati R.
927ce6c700
Provisioning: Allow startup when there are dashboard provisioning failures (#92201)
* Stop returning an error if dashboard provisioning fails
* Test that Run() does not error when dashboard provisioning fails
2024-08-23 11:48:42 +02:00
Tito Lins
4a124469fa
Check is config is default by comparing hashes (#92296) 2024-08-23 11:22:06 +02:00
Andres Martinez Gotor
a990b77c70
Add preinstall feature to defaults.ini (#92347) 2024-08-23 10:32:23 +02:00