3850 Commits

Author SHA1 Message Date
314e337d76 Build swagger ui in seperate webpack build (#102046)
* Build swagger ui in seperate webpack build

* render grafana and swagger

* include light theme

* merge main

* update webassets usage

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-04-25 14:22:57 +01:00
73c018b298 Bootdata: Expose grafanaBootData under /bootdata URL (#104258) 2025-04-25 10:50:03 +01:00
7b492d7e16 FEMT: Add feature toggle and expose the service in regular grafana (#104428) 2025-04-25 12:24:25 +03:00
1f707d16ed Apply security patch 357-202503311017.patch (#104490)
* Sanitize paths before evaluating access to route

* use util.CleanRelativePath

---------

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2025-04-24 20:15:17 +01:00
e7b800f35a Rendering: Add support for rate limiter (#103987)
* Rendering: Add support for rate limiter

* remove unnecessary golint exception

* add lint exception back
2025-04-24 15:31:19 +02:00
e385237daf Access control: Make sure that user permission cache is cleared after new dashboard and folder creation (#104193)
* make sure that user permission cache is cleared after new dashboard and folder creation

* more test fixes

* Update pkg/services/dashboards/service/dashboard_service.go

* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts

* set SA permissions for folders as well

* fix tests
2025-04-24 16:02:39 +03:00
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
17e4a3b386 Playlists: Remove kubernetesPlaylists flag (#104171) 2025-04-22 10:39:40 +02:00
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03:00
f5ad1ef69b K8s: Folders: Add v1 api (#103842) 2025-04-11 13:09:52 +01:00
50499fa749 Dashboards: Add a config setting that limits the number of series that will be displayed in a panel. Users can opt in to render all series. (#103405)
* Limit series in panels in dashboards

* fix mangled comment
2025-04-11 13:56:58 +02:00
3607356f65 i18n: Update internationalization/dates.ts to use locale (#103731) 2025-04-11 11:24:40 +02:00
79400018a4 Preferences: Allow setting lang and theme from URL (#103587)
* allow setting theme/language via url

* set in backend instead

* add locale as well
2025-04-11 09:21:06 +01:00
fd6fd91115 Prometheus: Add support for cloud partners Prometheus data sources (#103482)
* wip

* Add prom flavor support for data source variables and export/import dashboards (#103321)

* add dashboard and data source var selection

* use match plugin id instead

* use updated matchpluginid

* formatting

* cleanup

* regex anchor

* update error msg

* Alerting: Clean up prometheus-flavored types and functions (#103703)

* clean up types and utility functions for dealing with
prometheus-flavored data sources

* Refactor alerting datasource types to use constants as source of truth

* Alerting: Clean up prometheus-flavored types and functions on the bac… (#103716)

Alerting: Clean up prometheus-flavored types and functions on the backend

* add matchPluginId tests

* Update matchPluginId func to bidirectional (#103746)

* update matchpluginid func to bidirectional

* lint

* formatting

* use actual isSupportedExternalRulesSourceType in test

* add tests in datasource_srv

* betterer

* remove type assertion

* remove unnecessary case

* use satisifies to not have to convert tuple to an array of string

* add prometheus_flavor test

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Alexander Akhmetov <me@alx.cx>
2025-04-10 12:49:11 -07:00
757be6365a CI: Bump golangci-lint to 2.0.2 (#103572) 2025-04-10 14:42:23 +02:00
5053aa576d [IAM] Prepend AppSubURL to redirectURI before validating it (#103475) 2025-04-10 11:15:19 +02:00
a7197d02ad PluginProxy: Fix nil pointer in OAuth forwarding (#103626) 2025-04-09 09:08:21 -04:00
4caa9853cb Authorization: Add group to role DisplayName to make filtered list more clear (#102950)
* add group to role DisplayName to make searching easier

* clean up more role names; add filtered display text when fetching

* pass filter state into role menu to decide how to display role name

* prop name better describes what it does
2025-04-08 09:15:03 -05:00
f96e4e9ad2 Frontend: Remove Angular (#99760)
* chore(angularsupport): delete feature toggle to disable angular

* feat(angular-support): remove config.angularSupportEnabled

* chore(jest): remove angular from setup file

* chore(angular): delete angular deprecation ui components

* refactor(angular): move migration featureflags into migration notice

* chore(dashboard): remove angular deprecation notices

* chore(annotations): remove angular editor loader

* feat(appwrapper): no more angular app loading

* feat(pluginscatalog): clean up angular plugin warnings and logic

* chore(angular): delete angular app and associated files

* feat(plugins): delete old angular graph plugin

* feat(plugins): delete old angular table panel

* feat(frontend): remove unused appEvent type

* feat(dashboards): clean up angular from panel options and menu

* feat(plugins): remove graph and table-old from built in plugins and delete sdk

* feat(frontend): remove angular related imports in routes and explore graph

* feat(theme): remove angular panel styles from global styles

* chore(i18n): run make i18n-extract

* test(api_plugins_test): refresh snapshot due to deleting old graph and table plugins

* chore(angulardeprecation): delete angular migration notice components and usage

* test(frontend): clean up tests that assert rendering angular deprecation notices

* chore(backend): remove autoMigrateOldPanels feature flag

* chore(config): remove angularSupportEnabled from config preventing loading angular plugins

* chore(graphpanel): remove autoMigrateGraphPanel from feature toggles

* chore(tablepanel): delete autoMigrateTablePanel feature flag

* chore(piechart): delete autoMigratePiechartPanel feature flag

* chore(worldmappanel): remove autoMigrateWorldmapPanel feature toggle

* chore(statpanel): remove autoMigrateStatPanel feature flag

* feat(dashboards): remove automigrate feature flags and always auto migrate angular panels

* test(pluginsintegration): fix failing loader test

* test(frontend): wip: fix failures and skip erroring migration tests

* chore(codeowners): remove deleted angular related files and directories

* test(graphite): remove angular mock from test file

* test(dashboards): skip failing exporter test, remove angularSupportEnabled flags

* test(dashbaord): skip another failing panel menu test

* Tests: fixes pkg/services/pluginsintegration/loader/loader_test.go (#100505)

* Tests: fixes pkg/services/pluginsintegration/plugins_integration_test.go

* Trigger Build

* chore(dashboards): remove angularComponent from getPanelMenu, update test

* feat(dashboards): remove all usage of AngularComponent and getAngularLoader

* chore(betterer): refresh results file

* feat(plugins): remove PluginAngularBadge component and usage

* feat(datasource_srv): remove usage of getLegacyAngularInjector

* feat(queryeditor): delete AngularQueryComponentScope type

* Chore: removes Angular from plugin_loader

* Chore: remove angular from getPlugin

* Chore: fix i18n

* Trigger Build

* Chore: remove more Angular from importPanelPlugin

* Chore: remove search options warning

* Chore: remove and deprecate Angular related

* chore(angular): remove angular dependencies from core and runtime

* chore(runtime): delete angular injector

* chore(data): delete angular scope from event bus

* chore(plugin-catalog): remove code pushing app plugins angular config page

* chore(yarn): refresh lock file

* chore(frontend): remove ng-loader from webpack configs, remove systemjs cjs plugin

* chore(navigation): remove tether-drop cleanup from GrafanaRouter, delete dependency

* chore(runtime): delete AngularLoader

* chore(betterer): refresh results file

* chore(betterer): fix out of sync results file

* feat(query): fix type and import errors in QueryEditorRow

* test(dashboards): delete skipped angular related tests

* Tests: add back tests and fix betterer

* Tests: fix broken test

* Trigger build

* chore(i18n): remove angular deprecation related strings

* test: clean up connections and plugins catalog tests

* chore(betterer): update results file

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-04-04 11:31:35 +02:00
4918d8720c Dashboard Restore: Remove experimental functionality under feature flag dashboardRestore for now - this will be reworked (#103204) 2025-04-03 02:52:54 -05:00
26eab9981a Return correct disabled status when looking up a user (#103182) 2025-04-02 13:38:10 +02:00
1c07fd3d4f feat: add ft and add datasource:explore to viewers for viewers_can_edit (#103251)
* feat: add ft and add datasource:explore to viewers for viewers_can_edit

* removed the feature toggle

* remove file
2025-04-02 12:25:42 +03:00
d8c5c2d3b8 K8s: Folders: Modify GetChildren to return only Folder References (#103072)
* Return FolderReference instead of Folder on GetChildren

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-04-02 01:30:17 -03:00
4ad0492d3d i18n: Add locale to backend (#102233) 2025-03-31 15:59:07 +02:00
4cb756c5d1 K8s: Fix error conversion for provisioned dashboards (#103074) 2025-03-31 14:34:54 +01:00
18ae5d7f0c i18n: wires up translations for plugins (#102853)
* i18n: consolidate i18n types & runtime services

* Chore: updates after PR feedback

* Chore: updates after feedback

* Chore: updates after feedback

* Chore: adds feature toggle

* Chore: adds locale to backend

* Chore: adds locales to i18n instance

* Chore: fix missing path in CODEOWNERS

* Chore: fix go lint issues

* Chore: fix missing path in CODEOWNERS

* Chore: updates after PR feedback

* Trigger build

* Chore: updates after PR feedback

* Chore: use resolved language for lookup

* Chore: updates after PR feedback

* Update pkg/plugins/plugins.go

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

* Chore: updates after PR feedback

* Chore: updates after PR feedback

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2025-03-31 06:38:38 +02:00
b67b9e3c5e K8s: Folders: Reduce db calls with /api/folders (#103058) 2025-03-28 18:13:08 -05:00
d0d7078953 App Platform: Remove mutable globals (#102962)
* App Platform: Remove mutable globals

* chore: clarify why this exists

* fix: support multi-tenant mode

* refactor: call builder providers directly

* CI: Force re-build
2025-03-27 15:46:09 +01:00
ff6039567b RBAC: Return 404 instead of 403 if a dashboard cannot be found (#102815)
return 404 instead of 403 if a dashboard cannot be found
2025-03-26 12:26:14 +00:00
01c7283a88 Alerting: Check recording rules are enabled as well as feature toggle (#102633)
* Add `recordingRulesEnabled` to grafanaBootData

* Check for recording rules being enabled, as well as feature toggle

* Remove unnecessary config line

* Move recording rules check to featureToggles file

* Update NoRulesCTA.tsx
2025-03-26 08:59:45 +00:00
7c2890384a K8s: Dashboards: Set v1alpha1 as priority (#102729) 2025-03-25 10:32:49 -06:00
169b0eb5f5 Config: Removes setting viewers_can_edit (#102275)
Revert "Revert "Config: Removes setting `viewers_can_edit` (#101767)" (#102191)"

This reverts commit 56c896fa72529b86260f560ab14a906282a233fc.
2025-03-25 13:55:59 +00:00
1e4555c79b K8s: Folders: fix error conversion (#102737) 2025-03-24 19:59:26 +02:00
c76a681a43 Dashboards: Prevent version restore to same data (#102665) 2025-03-24 10:48:46 -05:00
55f2812466 Annotations: Fix annotations scope resolver (#102612)
* Fix annotations scope resolver
2025-03-24 16:00:07 +01:00
543c0bbccb App platform: Add cleanup job for dashboards when going through /apis (kubectl) (#102506)
* Add dashboard cleanup job

Change log message

Adjust logic to account for new head RV logic

Don't update lastResourceVersion due to pagination

Save improvements

* Address review feedback

* Update docs.

* Remove docs

* Rename config

---------

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
2025-03-22 23:47:27 +01:00
1a00801e6a Provisioning: Merge watch support into live (#102618) 2025-03-21 16:45:25 +02:00
73436e3d55 RBAC: Remove dashboard guardians pt 3 (#102558)
* remove usage of New dashboard guardian

* fix tests
2025-03-21 10:44:16 +00:00
e2737f195b RBAC: Remove dashboard guardians pt 2 (#102556)
* remove NewByDashboard guardian

* remove unused authorizer

* more cleanup

* simplify canAdmin evaluation
2025-03-21 10:32:27 +00:00
163546d40f RBAC: Remove dashboard guardians pt 1 (#102314)
* replace the usage of dashboard guardians with calling AC evaluators or checking access in middleware

* linting fixes

* fix test

* more test fixes

* remove a todo comment
2025-03-20 17:38:09 +00:00
8cdbc51b04 feat: expose Live message size limit to frontend (#100169)
Developers using Grafana Live need to know whether a message is too
big to be sent over the Grafana Live websocket. Since this limit
is configurable, it is useful to expose it to the frontend.

This commit adds a new field to the frontend settings,
`liveMessageSizeLimit`, which the frontend can use to access the
limit configured in the backend.

Relates to #99770.
2025-03-20 18:26:09 +02:00
5b67ae1876 Plugins: Remove support for secrets manager plugins (#101467)
* remove secrets manager code

* remove unused struct

* add test toggles back

* rollback golden file changes

* add missing TestMain

* update betterer
2025-03-20 10:00:59 +00:00
0c58d39e76 Spanner-related fixes (#102376)
* Fix UNION syntax in resourcepermissions package.
* Fix migrations in usermig package to work with Spanner.
* Fix health query.
* Use more connections for integration tests.
* Add test-go-integration-spanner target to run integration tests against Spanner emulator.
* Add test for enterprise.
* Don't delete sequence number for migration_log.id column.

* Only bump max open connections to 20 for Spanner.
Lower integration test timeout.
2025-03-19 12:34:44 +01:00
20f9902ed5 CloudMigrations: Remove public preview banner (#102354) 2025-03-18 16:21:16 +01:00
ff6a97f1a1 Provisioning: Update APIs in main (#102345) 2025-03-18 14:55:22 +02:00
56c896fa72 Revert "Config: Removes setting viewers_can_edit (#101767)" (#102191)
This reverts commit d3a9c045627089d8de8aca2dc9afed3754253848.
2025-03-14 13:39:59 +00:00
d3a9c04562 Config: Removes setting viewers_can_edit (#101767)
Reapply "Authz: Removes setting `viewers_can_edit`" (#101528)

This reverts commit 5f6b00a72f2cebc154ac5f1bbb9b4c655fb0afea.
2025-03-14 08:38:48 +00:00
9264431c81 RBAC: Remove action set feature toggle (#101959)
* remove action set feature toggle

* don't pass feature toggles to action set service instantiation

* linting

* test fixes and frontend clean-up

* fix test
2025-03-13 15:18:23 +00:00
5d2ba10113 K8s/Dashboards: Extract Dashboard APIs to an app submodule (#102029)
* Move dashboard k8s APIs to a separate app

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Copy dashboard code in Dockerfile

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix conversion generation

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update OpenAPI snapshot for dashboard/v0alpha1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-13 11:05:01 +02:00
94020aa9cd Config: Remove setting editors_can_admin (#101607)
* Remove editors can admin

* delete file

* add ac_test back

* Add linting ignore

* more static ignore
2025-03-12 16:25:23 +00:00