Commit Graph

836 Commits

Author SHA1 Message Date
Andres Martinez Gotor 8ebce76535
UserStorage: multiple improvements (#103779) 2025-04-11 11:32:31 +02:00
Laura Fernández 3607356f65
i18n: Update `internationalization/dates.ts` to use `locale` (#103731) 2025-04-11 11:24:40 +02:00
Sven Grossmann 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
Levente Balogh 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 53aa767664.

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

This reverts commit bdc588250e.

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-04-09 10:24:29 +02:00
Ryan McKinley 63af403897
Live: Remove queryOverLive and live-service-web-worker experimental feature flags (#103518) 2025-04-07 17:47:35 +03:00
Jack Westbrook 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
Levente Balogh 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
Gábor Farkas 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
Levente Balogh 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
Hugo Kiyodi Oshiro 69d8419109
Plugins: Remove userStorageAPI feature toggle (#102915) 2025-03-27 13:40:00 +01:00
Jack Westbrook 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
Torkel Ödegaard 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
Tom Ratcliffe 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
Hugo Häggmark 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
Ashley Harrison ddd3b82581
remove webpack aliasing for runtime + data (#102449) 2025-03-24 10:07:03 +00:00
Yuri Tseretyan 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
Ben Sully 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
Ben Sully 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
Will Browne 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
Darren Janeczek 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
Matheus Macabu 20f9902ed5
CloudMigrations: Remove public preview banner (#102354) 2025-03-18 16:21:16 +01:00
Ashley Harrison d82a877f65
GrafanaUI: Mark up or ignore remaining grafana-ui translations (#102203)
* markup or ignore remaining grafana-ui translations

* fix unit tests, commit betterer results which somehow didn't get autocommitted?! :o

* fix SharedPreferences unit test

* fix remaining unit tests

* fix azure e2e test

* better solution
2025-03-17 12:27:40 +00:00
Andrej Ocenas a6c16c52e6
Scopes: Refactor services and the api client (#102042)
* Externalize api and remove dependency cycles

* fix tests

* Update comment

* Split the state observable creation in ScopesService

* Make the feature flag guard more explicit

* Change reduce to map
2025-03-14 10:48:12 +01:00
Josh Hunt d6c97bd6c9
I18n: Add useT/useTranslate PR feedback that got missed (#102098)
I18n: Add PR feedback that got missed
2025-03-13 12:49:49 +00:00
Josh Hunt 50ff1ae69b
I18n: Add useT hook for plugin translation API (#102033)
* Create placeholder useT function

* expose useT() in @grafana/runtime

* fix setting useT correctly

* example usage of useT

* rename hook to useTranslate

* fix rename

* remove comment
2025-03-13 13:54:57 +02:00
Eric Leijonmarck 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
David Kim (DK) 4a713bd9ed
Plugin: expose nested folder component from core grafana (#97765)
* expose nested folder component from core grafana

* prettier

* import order

* remove unused commented code

* remove unneeded file

* make a LazyFolderPicker

* fix types, change permission to string

* comment

* reset some changes back to main

* no need to log

---------

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: joshhunt <josh.hunt@grafana.com>
2025-03-10 10:50:42 +00:00
Tobias Skarhed cf95a42507
ScopesContext: Move export from unstable to regular entrypoint (#101765)
Revert unstable export
2025-03-07 11:40:40 +02:00
Tobias Skarhed 7acfdfa0af
ScopesContext: Move runtime service to unstable (#101600)
* Move ScenesContext runtime service to unstable

* Move ScopesContext to unstable folder

* Remove dummy export
2025-03-06 10:20:25 +01:00
Jack Westbrook 6d4a271a39
Frontend: Expose unstable entrypoints for data and runtime (#101547)
* feat(grafana-data): introduce unstable entrypoint to package

* feat(grafana-runtime): introduce unstable entrypoint to package

* feat(plugins): expose unstable entrypoints for data and runtime to plugins

* feat(packages): dummy exports so package verification and shared deps imports work
2025-03-04 16:22:05 +01:00
Jack Westbrook 859c12bbb4
Grafana UI: Expose unstable entrypoint (#97080)
* feat(grafana-ui): build unstable entrypoint for experimental components

* feat(plugins): expose grafana/ui/unstable

* build(grafana-ui): add rollup plugin to create alias package.json for unstable entrypoint

* build(packages): rewrite prepare npm script to generate alias packagejson files

* chore(packages): use relative paths in publishConfig for exports generation

* chore(frontend): move npmcli/package-json package to root package.json

* revert(grafana-ui): remove rollup plugin for generating alias package.json files

* chore(grafana-ui): clean up unstable directory postpack to prevent yarn lock issues

* build(packages): fix scope for pkgName usage

* feat(packages): create separate cjs and esm builds that validate with arethetypeswrong cli

* chore(yarn): refresh lock file

* fix(packages): make sure alias package.jsons point to existing files
2025-03-04 09:55:41 +01:00
Marcus Andersson ccc1477c7d
PluginExtensions: Migrate edit profile page to use new plugin components API (#101346)
* wip.

* Refactored page a bit.

* Fixed tests.

* Update public/app/features/profile/UserProfileEditTabs.tsx

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

* Changed name.

* rename again.

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2025-02-28 07:28:01 +01:00
Jack Westbrook eca045bc11
Build: Reduce repetition in rollup configs (#93916)
* build(packages): add extendable pieces of rollup config

* build(packages): rewrite rollup configs to make use of extendable parts
2025-02-25 09:11:09 +01:00
Marcus Andersson c969a7251e
PluginExtensions: Fixed so we expose the proper types for usePluginComponents (#100949)
* Fixed usage of incorrect type in the 'usePluginComponents' hook.

* improved betterer.

* Changed import path of usePluginLinks types.

* improved betterer result.
2025-02-20 15:22:27 +01:00
Adam Bannach cb05ead1b2
chore: add react-loading-skeleton to @grafana/runtime (#100941) 2025-02-19 07:47:16 +01:00
Marcus Andersson 84d22e176b
PluginExtensions: Exposing registry meta for components returned via `usePluginComponents` (#100587)
Exposing meta information from registry via Component.meta.
2025-02-17 14:50:35 +01:00
Dominik Süß 8a8e47fcea
PluginExtensions: Added support for sharing functions (#98888)
* feat: add generic plugin extension functions

* updated betterer.

* Fixed type issues after sync with main.

* Remved extensions from datasource and panel.

* Added validation for extension function registry.

* Added tests and validation logic for function extensions registry.

* removed prop already existing on base.

* fixed lint error.

---------

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2025-02-13 10:18:55 +01:00
renovate[bot] 79bd3ffd8c
Update dependency rollup-plugin-esbuild to v6.2.0 (#100421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 14:44:41 +00:00
renovate[bot] 8c0e087ce2
Update dependency esbuild to v0.25.0 [SECURITY] (#100426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 16:04:18 +02:00
Marco Schaefer dec07c4c34
Update-faro-versions-in-grafana-packages (#100354)
* update faro versions in grafana-runtime

* update faro packages in root

* update Faro version in Grafana UI

* upgrade faro version in grafana-prometheus

* replace deprecated type
2025-02-10 15:07:32 +01:00
Elliot Kirk 95e61f63f7
Faro: Upgrading faro deps to 1.13.1, enabling error serializer (#100145)
* upping faro deps, enabling error serializer

* linting

* fix lint errors

* more linting stuff

* yarn lock
2025-02-10 09:32:47 +01:00
Jev Forsberg 88c62cd828
Chore: Manually update versions and update `grafana-test-datasource` to "workspace:*" (#99999)
* baldm0mma/ manually update deps and run yarn

* baldm0mma/ update version from workspace to actual version

* baldm0mma/ revert some workspaces

* baldm0mma/ update workspace

* baldm0mma/ update deps
2025-02-03 15:12:05 -07:00
renovate[bot] 9ae5552cab
Update testing-library monorepo (#99889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-31 13:30:24 +00:00
Andrej Ocenas 86a68627dd
QueryLibrary: Make query library available outside of Explore (#99319) 2025-01-30 14:53:01 +01:00
Sven Grossmann 336449c169
Explore: Add `hide_logs_download` and hide button to download logs (#99512)
* Explore: Add `disableLogsDownload` and hide button to download logs

* change copy

* Explore: Change `disableLogsDownload` to `hide_logs_download`

* change casing in frontend

* also hide from inspector

* add test

* lint
2025-01-29 11:53:52 +01:00
Oscar Kilhed 056b5a7b08
Dashboards: Monitor dashboard loading performance (#99629)
* WIP benchmark dashboard rendering

* Script

* Benchmark with variable and a panel

* Add one more benchmark

* Explicitely enable profiling

* Playwright tests

* update scenes

* Report measurement to faro when config set

* Let user enable metrics reporting in UI

* Fix logging

* Change how performance metrics is enabled per dashboard, now in config file only

* add benchmark run option

* Fix benchmark runs

* fix description for performance config

* remove console.log

* update codeowners

* add back crashDetection init that was lost in merge

* fix yarn.lock

* restore custom.ini

* fix import

* Make sure we have the echoSrv

* fix config type

* Try to limit changes to e2e runs

* remove benchmark

* Fix lint issue

* fix codeowners

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2025-01-28 18:36:10 +01:00
renovate[bot] a05f539dd2
Update dependency @types/lodash to v4.17.15 (#99632)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 10:02:23 +00:00
Ezequiel Victorero 865e911e10
Share: Add analytics to invite user flow (#99116) 2025-01-21 11:47:57 -03:00
Ashley Harrison 7411663b74
Chore: Upgrade to React 18.3 (#99183)
upgrade to react 18.3
2025-01-17 15:56:44 +00:00
Ryan McKinley 0d302a161a
BackendSrv: Support streaming chunked responses (#98691) 2025-01-15 10:01:22 +03:00
Edvard Falkskär e38bab43db
Remove console.log from correlations service (#98969) 2025-01-14 16:09:32 +01:00
Edvard Falkskär e45eb95812
Correlations: Expose correlations logic through correlations service (#98124)
* Correlations: Expose correlations logic through correlations service

* Resolve remaining todos

* Marked new items as @alpha
2025-01-14 13:27:13 +02:00
Matheus Macabu 4e398bf2bd
Datasources: Add toggle to control default behaviour of 'Manage alerts via Alerts UI' toggle (#98441)
* Datasources: Add toggle to control default behaviour of 'Manage alerts via Alerts UI' toggle

* Update documentation with suggestions

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2025-01-10 15:20:09 +01:00
Torkel Ödegaard 7639934818
RuntimeDataSource: Support in core for runtime registered data sources (#93956)
* RuntimeDataSource: Support in core for runtime registered data sources

* Added tests for runtime datasource.

* added another test to make sure runtime ds isn't included in datasource list.

* changed so we not are expecting the settings to be returned by name.

* Fixed betterer error.

* fixed type issues.

* updated comment according to feedback.

* will prevent runtime ds registration from overwriting regular ds.

---------

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2025-01-10 14:42:49 +01:00
Andrej Ocenas 41c120ba89
Sidecar: Fix cases when sidecar wouldn't open depending on the first loaded route (#98679)
Update mainOnAllowedRoute even if no activeId
2025-01-10 11:09:12 +01:00
renovate[bot] bf8524e5a6
Update dependency typescript to v5.7.3 (#98753)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-09 17:47:23 +00:00
renovate[bot] e0121055fb
Update dependency typescript to v5.7.2 (#93749)
* Update dependency typescript to v5.7.2

* typescript fixes

* don't need this change

* remaining typescript fixes

* remove emotion/react aliasing

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-01-09 15:20:45 +00:00
renovate[bot] 5482742891
Update dependency @types/lodash to v4.17.14 (#98520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 11:59:23 +00:00
renovate[bot] 166e86a0c6
Update dependency esbuild to v0.24.2 (#98308)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 09:53:31 +00:00
renovate[bot] 54e603e552
Update dependency rollup-plugin-node-externals to v8 (#98211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 18:57:09 +02:00
renovate[bot] 89774f3c8d
Replace usage of `react-test-renderer` and `@testing-library/react-hooks` (#98152)
* Update dependency @types/react-test-renderer to v19

* replace usage of react-test-renderer

* use renderHook from @testing-library/react in most tests

* update tests to work without @testing-library/react-hooks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-12-18 11:55:25 +00:00
renovate[bot] 77fafd887a
Update dependency @rollup/plugin-node-resolve to v16 (#98114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-17 15:32:14 +00:00
renovate[bot] dbe273d0eb
Update dependency tslib to v2.8.1 (#98068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-17 09:57:45 +00:00
renovate[bot] b310b6f8c5
Update dependency react-use to v17.6.0 (#98042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 16:00:27 +00:00
renovate[bot] 630b7d3c0d
Update dependency @testing-library/react to v16.1.0 (#97939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-13 14:21:40 +00:00
Bogdan Matei 7cc0604360
Scopes: Add ScopesContext to `@grafana/runtime` (#97566) 2024-12-09 16:37:50 +02:00
Jev Forsberg 4ea109593b
Chore: Update dep version (#97507)
* update dep versions

* run gen-cue
2024-12-05 13:01:59 -07:00
Andres Martinez Gotor a41902330f
@grafana/runtime: User storage (#95834) 2024-11-28 15:49:34 +01:00
Andrej Ocenas 58e9f22c1b
Sidecar: Specify where it can be opened and when it automatically closes (#96683) 2024-11-21 11:27:01 +01:00
Sriram bd56b47bb5
Datasources: Health check error tracking (#96629)
* datasource health check error tracking

* type fix
2024-11-19 08:47:46 +00:00
Andrej Ocenas 4b5ce0efe7
Sidecar: Add rudderstack events (#96566) 2024-11-18 18:17:28 +01:00
Sven Grossmann 2ff9baa271
Sidecar: Always hide at `/login` page (#96621) 2024-11-18 14:07:59 +02:00
Andrej Ocenas 19844c4ba8
Sidecar: Route handling rework (#96337) 2024-11-14 17:28:12 +01:00
renovate[bot] 2799e5aa75
Update dependency @types/lodash to v4.17.13 (#96159)
* Update dependency @types/lodash to v4.17.13

* fix types

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-11-11 18:16:20 +02:00
Jack Westbrook 8c41137bcf
Frontend: Update to Eslint 9 (#94823)
* chore(eslint): bump all eslint related packages to latest

* chore(eslint): update linting scripts work with v9

* chore(eslint): introduce flat config

* chore(eslint): delete legacy configs

* feat(grafana-eslint-rules): update rules to use eslint 9 APIs

* chore(eslint): migrate all nested eslintrc files over to root config

* chore(packages): bump eslint dependencies

* feat(betterer): make it work with eslint 9

* style(grafana-data): remove non-existant ban-types rule from disable declarations

* chore(wip): [wip] link eslint-config-grafana

* chore(packages): add @eslint/compat

* chore(eslint): add compat to testing library and fix alerting rules

* chore(eslint): bump grafana eslint-config to v8

* chore(explore): delete legacy eslint config

* chore: clean codeowners file, remove grafana/eslint-config from e2e plugins

* test(eslint-rules): fix no-border-radius-literal and no-aria-label-e2e-selectors rule tests

* Add .js to prettier checks so new eslint.config.js file isn't missed

* chore(eslint): move emotion/syntax-preference to grafana/defaults

* test(eslint): use core-js structured-clone

* revert(services): undo merge backend-format githook changes

* test(eslint-rules): remove structured-clone polyfill from tests

* chore(eslint): add back public/lib/monaco to ignore list, sort alphabetically

* chore(e2e-plugins): remove eslint config 7 from plugins package.json

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-11-07 16:31:06 +01:00
Andrej Ocenas e55100fa90
Sidecar: isAppOpened returns true only if there are 2 apps rendered (#95978)
* Check if sidecar is used

* Update packages/grafana-runtime/src/services/SidecarService_EXPERIMENTAL.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2024-11-07 11:50:05 +01:00
Ashley Harrison 0fae3579e8
Chore: improve some types (#95728)
* fix some typings

* fix some more

* more type fixes

* fix some graphite types

* few influx fixes
2024-11-05 09:57:30 +00:00
Josh Hunt 189802d3c3
EchoSrv: Add BrowserConsoleBackend to log analytics events (#95554)
* EchoSrv: Add BrowserConsoleBackend to log analytics events

* rename config name

* warn on non-scalar property values
2024-10-29 18:20:54 +00:00
renovate[bot] 5f8af8860f Update dependency @types/jest to v29.5.14 2024-10-23 09:40:48 +00:00
Andrej Ocenas 5b1d99b8c4
Sidecar: Remove extension helpers and use the sidecar service directly (#94979) 2024-10-22 11:46:29 +02:00
Andrej Ocenas c3c1f6ac27
Sidecar: Move service to runtime (#94860) 2024-10-21 20:26:39 +02:00
Syerikjan Kh 20a33632bf
feat: pass orgrole when adding rs event (#94890)
* chore: pass orgRole, orgId for RS event report

* chore: track panel plugin search

* ref: extract interaction const to separate file
2024-10-21 12:22:51 -04:00
renovate[bot] 2974ab634f Update dependency @types/lodash to v4.17.12 2024-10-21 16:15:42 +03:00
Tobias Skarhed bbc4dc3867
Frontend Monitoring: Add config option to enable all default instrumentations (#94862)
* Add config options to enable all faro instrumentation

* Fix ts error

* Fix type in test

* Add to default config files
2024-10-18 15:35:39 +02:00
renovate[bot] afeb0fc792
Update dependency @types/testing-library__jest-dom to v6 (#94607)
* Update dependency @types/testing-library__jest-dom to v6

* remove package and fix types

* don't include setupTests in the build tsconfig

* exclude testUtils

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-18 11:59:47 +01:00
Esteban Beltran f248a55576
Frontend Sandbox: Create a plugin sandbox enable registry. Use enable list instead of disable list (#94809)
* Use a enable configuration to enable frontend sandbox

* Modify settings to load enableFrontendSandbox

* Check for signature type

* Update commment

* Fix e2e tests for the frontend sandbox

* Modify logic so a custom check function is used instead of a list of checks

* Fixes flaky test

* fix comment

* Update comment

* Empty commit

* Empty commit
2024-10-17 16:56:50 +02:00
Jack Westbrook 9e50866356
Build: Nx improvements (#88341)
* feat(frontend): introduce project.json for every workspace to improve caching

* refactor(frontend): use nx tags for grafana dependson

* refactor(frontend): clean up nx tags for packages and plugins

* build(nx): make grafana dependent on cacheable generate icons command

* build(nx): clean up project files
2024-10-15 14:25:45 +02:00
renovate[bot] 77effa6d90
Update testing-library monorepo (#94632)
* Update testing-library monorepo

* add @testing-library/dom

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-14 12:22:34 +03:00
Andres Martinez Gotor 235f7db967
Add query migration handlers (#93735) 2024-10-14 09:29:44 +02:00
grafana-delivery-bot[bot] 032d0669cd
Release: Bump version to 11.4.0-pre (#94569)
bump version 11.4.0-pre

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-11 11:31:04 +01:00
renovate[bot] 45835f7ea2 Update dependency @types/lodash to v4.17.10 2024-10-07 10:54:58 +00:00
Giuseppe Guerra 0db65d229e
Plugins: Add Subresource Integrity checks (#93024)
* Plugins: Pass hashes for SRI to frontend

* Add SRI hashes to frontendsettings DTOs

* Add docstring

* TestSriHashes

* Fix typo

* Changed SriHashes to ModuleHash

* update loader_test compareOpts

* update ModuleHash error message

* Add TestModuleHash/no_module.js

* Add omitEmpty to moduleHash

* Add ModuleHash to api/plugins/${pluginId}/settings

* moved ModuleHash field

* feat(plugins): add moduleHash to bootData and plugin types

* feat(plugins): if moduleHash is available apply it to systemjs importmap

* Calculate ModuleHash for CDN provisioned plugins

* Add ModuleHash tests for TestCalculate

* adjust test case name

* removed .envrc

* Fix signature verification failing for internal plugins

* fix tests

* Add pluginsFilesystemSriChecks feature togglemk

* renamed FilesystemSriChecksEnabled

* refactor(plugin_loader): prefer extending type declaration over ts-error

* added a couple more tests

* Removed unused features

* Removed unused argument from signature.DefaultCalculator call

* Removed unused argument from bootstrap.DefaultConstructFunc

* Moved ModuleHash to pluginassets service

* update docstring

* lint

* Removed cdn dependency from manifest.Signature

* add tests

* fix extra parameters in tests

* "fix" tests

* removed outdated test

* removed unused cdn dependency in signature.DefaultCalculator

* reduce diff

* Cache returned values

* Add support for deeply nested plugins (more than 1 hierarchy level)

* simplify cache usage

* refactor TestService_ModuleHash_Cache

* removed unused testdata

* re-generate feature toggles

* use version for module hash cache

* Renamed feature toggle to pluginsSriChecks and use it for both cdn and filesystem

* Removed app/types/system-integrity.d.ts

* re-generate feature toggles

* re-generate feature toggles

* feat(plugins): put systemjs integrity hash behind feature flag

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-10-04 14:55:09 +02:00
Levente Balogh 6096f46774
Plugin Extensions: Require meta-data to be defined in `plugin.json` during development mode (#93429)
* feat: add extensions to the backend plugin model

* feat: update the frontend plugin types

* feat(pluginContext): return a `null` if there is no context found

This will be necessary to understand if a certain hook is running inside a plugin context or not.

* feat: add utility functions for checking extension configs

* tests: fix failing tests due to the type updates

* feat(AddedComponentsRegistry): validate plugin meta-info

* feat(AddedLinksRegistry): validate  meta-info

* feat(ExposedComponentsRegistry): validate meta-info

* feat(usePluginComponent): add meta-info validation

* feat(usePluginComponents): add meta-info validation

* feat(usePluginLinks): add meta-info validation

* fix: only validate meta-info in registries if dev mode is enabled

* tests: add unit tests for the restrictions functionality

* tests: fix Go tests

* fix(tests): revert accidental changes

* fix: run goimports

* fix: api tests

* add nested app so that meta data can bested e2e tested

* refactor(types): extract the ExtensionInfo into a separate type

* refactor(extensions/utils): use Array.prototype.some() instead of .find()

* refactor(usePluginLinks): update warning message

* feat(usePluginExtensions()): validate plugin meta-info

* Wip

* fix(e2e): E2E tests for extensions

* fix(extensions): allow multiple "/" slashes in the extension point id

* fix(extensions/validators): stop validating the plugin id pattern

---------

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2024-10-04 08:41:26 +02:00
Jack Westbrook 012d62782c
Fix: Prevent import errors caused by Rollup 4 (#93903)
fix(packages): prevent import errors by injecting exports.esmodule and check for default prop
2024-09-27 12:18:52 +01:00
Jack Westbrook f22bee8ca2
Build: Migrate packages to rollup v4 (#93731)
* chore(packages): bump rollup and rollup plugins to latest

* chore(packages): fix rollup node-externals plugin imports

* chore(packages): update build/bundle scripts to pass configPlugin arg to rollup

* feat(packages): migrate rollup configs to be esm compliant

* feat(packages): build using es2018 target and use same tsconfig and tsc for rollup
2024-09-27 11:00:13 +02:00
renovate[bot] db697a3e23
Update dependency @rollup/plugin-node-resolve to v15.3.0 (#93677)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 15:43:03 +01:00
renovate[bot] 5193318c56 Update dependency @types/lodash to v4.17.9 2024-09-24 11:47:46 +00:00
renovate[bot] 1a13e7fd95 Update dependency @types/systemjs to v6.15.1 2024-09-23 14:11:17 +00:00
renovate[bot] 07f11e9222 Update dependency @rollup/plugin-node-resolve to v15.2.4 2024-09-23 13:37:26 +00:00
renovate[bot] 08b2805d07
Update dependency esbuild to v0.24.0 (#87650)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 12:27:38 +01:00