816 Commits

Author SHA1 Message Date
c94f930950 Update dependency prettier to v3.6.2 (#108689)
* Update dependency prettier to v3.6.2

* run prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-25 17:47:44 +01:00
22bcd4dab4 Chore: bump version to 12.2.0-pre (#108623)
* bump version to 12.2.0-pre

* make gen-cue
2025-07-24 21:25:26 -05:00
15d9df93f9 Fix: Prevent Rollup from treeshaking NPM packages (#108567)
fix(packages): prevent rollup from treeshaking libraries
2025-07-24 10:54:02 +02:00
abd519899f Update dependency @testing-library/react to v16.3.0 (#108428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 08:47:52 +00:00
6ecbe1f61b Update dependency esbuild to v0.25.8 (#108385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 14:57:34 +01:00
5b9cb1f568 Update dependency rollup-plugin-esbuild to v6.2.1 (#108303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 11:44:47 +01:00
aa17dd8056 Update dependency esbuild to v0.25.6 (#107799)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 09:36:22 +01:00
35bf093201 Update dependency @types/systemjs to v6.15.3 (#107774)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 12:56:49 +00:00
2fabedc363 Update dependency @types/lodash to v4.17.20 (#107767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 11:50:43 +00:00
5d2bbfd3ee Update dependency @rollup/plugin-node-resolve to v16.0.1 (#107766)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 11:27:09 +00:00
acdb0e151c datasources: remove empty if (#105314) 2025-07-07 08:58:48 +02:00
ab676ce035 Loki: Add scope filters to queries on the frontend (#104638)
* Add scopes to queries in DataSourceWithBackend

* Remove Prometheus-specific solution

* Readd prometheus support

* move scopes reordering ti loki ds

* Add tests and logQLScope feature flag

* Move featureToggles to before/after each

* Remove irrelevant file change
2025-07-04 18:35:52 +02:00
17ecd4c051 Update dependency typescript to v5.8.3 (#101501)
* Update dependency typescript to v5.8.3

* get correct window type

* fix @grafana/data

* update lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-04 14:43:01 +01:00
4738957360 Querying: Pass dashboard and panel title as headers (#107032)
* WIP dashboard titile

* Add tests

* Fix tests

* Fix tests

* Remove redundant imports
2025-06-25 13:51:23 +02:00
b30f501bff backendsrv: Implement optional URL path fetch sanitize (#106540)
* feat: Implement optional URL path sanitization in BackendSrv methods

* add comment

* revert

* remove namespace import from backendsrv

* change method to validatePath, remove query params and fragments

* Moved validatePath call into fetch and make it throw an error instead

* update pluginSettings tests

* prettier

* Update public/app/features/plugins/pluginSettings.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* change name to validatePath

* fix other tests

* rename property in backend_srv tests

* rename to validatePath in backend_srv, add extra tests

* Move path validation into parseUrlFromOptions

* fix

* Add additional check

* Add test

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-06-20 11:27:53 +01:00
f6e330b3d7 Alerting: Allow disabling recording rules write for a data source in the UI (#106664)
Adds a new "Allow as recording rules target" toggle to Prometheus datasource configuration that controls whether the datasource can be selected as a target for writing recording rules.
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
2025-06-17 22:55:45 +02:00
09e8484bac i18n: rename locale to regionalFormat (#106585)
* locale -> regionalFormat, mirroring #102233

* set up regionalFormat to replace locale entirely

* replace locale with regionalFormat

* update reportInteraction arguments
2025-06-16 21:53:55 +02:00
e0d27dc0d7 Dashboard: Add configurable quick ranges for the time picker (#102254)
* Dashboard: Add configurable quick ranges for the time picker

* fix test and linter errors

* update from array to TimeOption

* Switching to grafana-scenes (Part 1 - remove grafana-ui changes

* Update SceneTimePicker initialization

* betterer

* remove hallucinated argument

* Revert "Bump scenes and fix types (#105167)"

This reverts commit c6428dfc7463250f786a9089c46a2fac910333cb.

* make gen-go

* reset files

* Shorten documentation to increase maintainability

* Update _index.md

* the

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2025-06-12 17:51:46 +02:00
e33ef2885f Chore: Remove rollup-plugin-dts (#106442)
* chore(packages): remove rollup dts plugin

* build(packages): add rollup copy plugin settings to copy ts declarations to esm and cjs builds

* build(packages): remove copy settings as result doesnt pass attw cli checks

* build(packages): use single types output in dist/types directory

* ci(packages): update prepare and validate scripts for single type builds

* fix(grafana-schema): copy raw types to dist/esm directory for grafana/scenes support
2025-06-12 15:25:16 +02:00
1564e1bac9 URLParams: Stringify true values as key=true always (fixes issues with variables with true value) (#106440)
* Restore prev fix

* added one more test

* Fix linkUrl issue
2025-06-10 12:08:08 +02:00
7c3f7b9e8b Alerting: Use default_datasource_uid as the default target for recording rules in UI (#106415)
* Alerting: Use default_datasource_uid as the default target for recording rules

* Add tests

---------

Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
2025-06-10 11:58:42 +02:00
301d78bf96 User Storage: Expose functionality for frontend-only datasources (#106165) 2025-05-29 14:44:00 +02:00
a3c6b7c28d Update dependency rxjs to v7.8.2 (#105351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-21 14:34:29 +00:00
91d9cac157 FEMT: Call /bootdata and render grafana (#105176)
* rename /mtfe route to /femt to match project name

* set correct navTree JSON property name

* call GetWebAssets in the request handler to prevent stale assets during development

* Call /bootdata and render grafana

* set nonce on script

* write csp header in index handler

* write report-only csp as well

* debug stuff

* more debug logging

* move importing app into a seperate, async-loaded module

* Clean up comments

* make /femt redirect to / in the frontend

* remove console.log

* remove stale commented code

* call __grafana_load_failed if bootstrap fails

* comment for __grafana_boot_data_promise

* remove console.log

* remove blank newline

* codeowners
2025-05-13 09:58:46 +01:00
98df41235d datasources: query-service url fix (#105178) 2025-05-13 09:36:20 +02:00
8f17f607fa FEMT: Add no-restricted-img-srcs rule (#105006) 2025-05-12 10:34:17 +01:00
8a2af6166c i18n: adds @grafana/i18n package (#104603)
* i18n: adds grafana/i18n

* Trigger build

* chore: fix frontend lint

* chore: refactor

* chore: refactor

* chore: expose getI18nInstance in shared deps

* chore: refactors away second init

* Trigger build

* chore: updates after PR feedback

* chore: sync with enterprise

* chore: adds shouldUnescape

* Trigger build

* chore: makes functions internal

* Trigger build

* chore: fix for Pseudo locale

* chore: bumps package version

* chore: fix the version of i18n package
2025-05-09 05:45:20 +02:00
f7216db6bc Chore: bump version to 12.1.0-pre (#104468)
bump version to 12.1.0-pre
2025-04-24 15:47:14 +01:00
e93fc9c003 UserStorage: Improve error handling (#104025) 2025-04-15 15:32:46 +02: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
8ebce76535 UserStorage: multiple improvements (#103779) 2025-04-11 11:32:31 +02:00
3607356f65 i18n: Update internationalization/dates.ts to use locale (#103731) 2025-04-11 11:24:40 +02:00
05338838b0 Sidecar: Remove experimental Sidecar implementation (#103786)
* Sidecar: remove `appSidecar` feature toggle

* Sidecar: Remove sidecar implementation

* lint
2025-04-10 22:04:12 +02:00
39dcff23f9 Plugin Extensions: Clean up the deprecated APIs (#102102)
* PanelMenuBehaviour: stop using the deprecated `getPluginLinkExtensions()` API

* Wip

* grafana-runtime: remove deprecated APIs `usePluginExtensions()`, `usePluginLinkExtensions()` and `usePluginComponentExtensions()`

* Wip

* Wip

* wip

* wip

* Chore: removed PluginExtensionLinkConfig

* Chore: removed PluginExtensionComponentConfig

* Chore: fixed grafana-pyroscope-datasource QueryEditor test

* Chore: fixed PublicDashboardScenePage.test.tsx

* Chore: fix PanelDataQueriesTab test

* Chore: fix PanelMenuBehavior test

* Chore: fix transformSceneToSaveModel test

* Chore: fix last type errors

* Chore: fix alerting/unified/testSetup/plugins.ts

* Chore: break out types to separate file

* feat(Extensions): expose an observable API for added links and components

* chore: prettier fixes

* Revert "chore: prettier fixes"

This reverts commit 53aa7676647a50785cb18098c6cc4c81bad5b4c7.

* Revert "feat(Extensions): expose an observable API for added links and components"

This reverts commit bdc588250e790f91a3c93c7c79448280d39fbd22.

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-04-09 10:24:29 +02:00
63af403897 Live: Remove queryOverLive and live-service-web-worker experimental feature flags (#103518) 2025-04-07 17:47:35 +03: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
9ea1c203e6 Plugin Extensions: Move observable extension apis from the unstable entrypoint (#103271)
feat(grafana-runtime): move observable extension apis from /unstable to /
2025-04-02 14:42:28 +03:00
135fbf6258 data sources: feature toggle: route explore queries to the new query service (#103192)
* data sources: route explore queries to the new query service

* prettier fix

* easier to read logical statement
2025-04-02 12:00:33 +02:00
9eb5ed5db9 Extensions: Expose new observable APIs for accessing components and links (#103063)
* feat(Extensions): expose an observable API for added links and components

* refactor: make `getObservablePluginExtensions()` more RxJS style

* refactor(getPluginExtensions): remove unnecessary types

* fix(getPluginExtensions): remove unused imports

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* refactor(getPluginExtensions): stop using `shareReply()`

* fix(grafana-runtime/extensions): typo in error messages

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-04-01 10:07:44 +03:00
69d8419109 Plugins: Remove userStorageAPI feature toggle (#102915) 2025-03-27 13:40:00 +01:00
6822805c32 Grafana Runtime: Use package.json exports for internal code (#102100)
* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime

* feat(runtime): introduce internal api entrypoint and exports property

* refactor(frontend): update runtime imports to use internal entrypoint

* chore(betterer): update results file

* refactor(bookmarks): update runtime/unstable import

* chore(betterer): update results file

* test(frontend): fix failing tests due to mocking nested runtime imports

* test(datasourcesrv): fix failing tests due to mocks

* chore(alerting): clean up redundant import

* fix(packages): fix default require export pointing to types declaration file

* docs(packages): update readme related to exports

* chore(internationalization): fix import paths

* chore(betterer): update results file
2025-03-27 08:59:57 +01:00
f2fc1d8575 Dashboard: Add unconfigured panel state to new panels (#102719)
* Update

* Update

* Update new panel title

* Update
2025-03-26 13:34:37 +01: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
6f2a9abc03 i18n: consolidate i18n types & runtime services (#102535)
* i18n: consolidate i18n types & runtime services

* Chore: updates after PR feedback

* Chore: updates after feedback

* Chore: updates after feedback

* Chore: updates after PR feedback

* Chore: fix i18n

* Chore: updates after PR feedback
2025-03-24 13:20:00 +01:00
ddd3b82581 remove webpack aliasing for runtime + data (#102449) 2025-03-24 10:07:03 +00:00
674d81d7ee Chore: Bump version of front-end modules to 12.0.0-pre (#102615)
---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
2025-03-21 17:35:55 +02:00
9fce4311e9 Live: allow publishing over Centrifuge subscription (#102325)
* Live: allow publishing over Centrifuge subscription

Currently when publishing over a Grafana Live channel,
the data is sent over the HTTP API. This works fine when
there is only a single Grafana instance running, but
when there are multiple instances, the data will only hit
one instance, which is often not desired: sometimes you need
to guarantee that the data appears on the same instance that
the frontend is connected to.

An example of this is in the Grafana LLM app when running the
MCP server. The MCP protocol is stateful; users subscribe to
a channel to get a long-lived stream of server-sent events,
then send subsequent requests to the server to get further
results. If there are multiple Grafana instances running then
the requests are likely to land on an instance other than the
one that the user is connected to.

This commit adds a new option to the `GrafanaLiveSrv` interface
that allows the user to publish data over the Centrifuge
subscription instead of the HTTP API. This is not the default and
should rarely be used, but is required to fulfil certain use cases.

* Address nits from code review

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

---------

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2025-03-20 16:50:52 +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
e948376a95 feat: component extension point for adaptive telemetry query actions (#101331)
* feat: component extension point for adaptive telemetry query actions

- only render the first non-null added-component, and provide utility in the added component infrastructure to  support this

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2025-03-18 12:45:01 -04:00