1242 Commits

Author SHA1 Message Date
6747b60822 Plugins: Remove pluginsDetailsRightPanel feature toggle (#107321)
remove pluginsDetailsRightPanel feature toggle
2025-07-25 13:02:05 +01:00
d852bde2a5 Fix: plugin loader cache not matching on decoupled plugin paths (#108529)
* fix(plugins): match decoupled plugin path in fe plugin loader cache

* chore(devenv): update local_cdn to work with latest changes in core

* refactor(plugins): improve legibility by splitting regexs into two

* revert(devenv): revert -oss removal in local_cdn rewrite path
2025-07-24 11:53:30 +02:00
4588c6c11c ExtensionSidebar: Pass closeSidebar to plugin helpers (#108171)
* ExtensionSidebar: Add `CloseExtensionSidebarEvent`

* ExtensionSidebar: Use `CloseExtensionSidebarEvent` in provider

* ExtensionSidebar: Pass `closeSidebar` to plugin helpers
2025-07-16 11:35:15 +00:00
5b82e05697 Plugins: replaces various plugin imports with pluginImporter (#108002)
* Plugins: renames plugin_loader

* Wip

* chore: adds pluginImporter

* chore: some small refactors

* chore: better typings

* chore: merge functions

* chore: create a generic plugin cache

* chore: adds comments

* chore: change to const

* chore: remove unused change

* chore: put everything behind feature toggle

* chore: rename test file and props

* chore: adds sync cache as well

* chore: fix the typings

* chore: fix broken unit test

* chore: small rename

* chore: adds tests

* chore: updates after PR feedback

* chore: updates after PR feedback
2025-07-16 06:42:28 +02:00
d1f785c8bf New link extension point for DatasourceTestingStatus (#107571) 2025-07-14 15:51:19 +02:00
4260dea554 Plugins: adds plugin version to mutation logs (#108057)
* Plugins: adds plugin version to mutation logs

* chore: updates after PR feedback
2025-07-14 11:52:48 +02:00
75a6aa7838 Plugin Extensions: Update extension-point ID validation (#107959)
* feat(extensions): don't allow core grafana extension point ids in plugins

* feat(extensions): log more specific errors if extension point id validation fails

* chore: move the ExtensionSidebar ext. point id to grafana-data

* review: remove type assertion
2025-07-14 10:18:21 +02:00
0f3edd3b5f Plugins: renames snake cased plugin files (#107862)
* Plugins: renames plugin_loader

* test(pluginloader): fix mock paths to pluginLoader

* chore: rename sandbox files

* Trigger build

* Trigger build

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2025-07-09 13:18:44 +02:00
20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00
5b7f06c24e Extensions: Wrap extension components with a sandbox wrapper div (#103064)
* feat(sandbox): wrap extension components with sandbox wrapper div

* fix: remove circular dependency

This was caused by sandbox_plugin_loader_registry -> helpers -> backend_srv -> ... plugin_loader -> setup.

* fix: add dependency to react hook

* tests: add tests for extensions sandbox wrapper

* fix: only wrap modal content after plugin loading

* chore: remove unused code

* Wip

* review(actions.ts): extract logic to function

* test: remove testing app id

* tests: fix extension utils tests

* tests: remove unnecessary code
2025-07-08 07:10:19 +02:00
31b71f79dd Internationalisation: Manual mark up following review (#107625)
* mark up and add confirmText to lint rule

* mark up and add ariaLabel to lint rule

* add confirmText to propertiesToCheck

* mark up and add body to propsToCheck

* mark up latest

* mark up 'Dashboard saved'

* mark up filterbyvalue options

* mark up tooltip options

* mark up and add lint rules for noOptionsMessage/loadingMessage

* mark up 'Convert field type'

* mark up placeholderText/noOptionsMessage

* mark up run query

* mark up variable editor fields

* mark up week start options

* mark up dashboard link options

* mark up prom options

* mark up builder/code toggles

* make CI happy

* kick CI
2025-07-07 16:43:19 +01:00
cfa05a63c5 Plugin Loader: Don't load an app plugin multiple times (#107579)
* fix(plugin_loader): don't import an app plugin twice

* review: extract IIFE to a separate function (async part of plugin loading)

* fix: remove code for testing
2025-07-07 15:05:13 +02:00
77f84e494d Plugin Extensions: Add error boundaries (#107515)
* feat(grafana-data): expose PluginContext

This is aimed to be used in the `PluginErrorBoundary` (which is a class component, and cannot use the hook.)

* feat(PluginErrorBoundary): add an error boundary for plugins

* feat(ExtensionsErrorBoundary): add an error boundary for extensions)

* feat(Extensions/Utils): wrap components with error boundaries

* feat(Plugins): wrap root plugin page with an error boundary

* fix: Fallback component should always be visible for onClick() modals

* review: use object arguments instead of positional ones for `renderWithPluginContext()`

* review: update `wrapWithPluginContext()` to receive args as an object

* refactor(AppChromeExtensionPoint): remove the error boundary

We have an error boundary on the extensions-framework level now

* refactor(ExtensionSidebar): remove the ErrorBoundary from the extensions

This is handled on the extensions-framework level now.

* test(ExtensionSidebar): add tests

* chore: translation extraction

* chore: prettier formatting

* fix(PluginErrorBoundary): remove unnecessary type casting
2025-07-07 14:51:04 +02:00
68cbd23916 Chore: reduces barrel files (#107512)
* Chore: reduce barrel files

* chore: fixes unit test

* chore: fix broken path
2025-07-07 09:23:27 +02:00
bfd33467fb Tests: removes jest duplicate manual mock warning (#107459)
* Tests: removes jest duplicate manual mock warning

* Trigger build

* Trigger build
2025-07-02 09:25:25 +02:00
bd14061367 Plugin Extensions: adds source and id to mutation logs (#107385)
* Plugin Extensions: adds source and id to mutation logs

* chore: fix broken tests

* chore: updates after PR feedback
2025-07-01 09:58:44 +02:00
24138bde70 Plugin Extension: improves mutation logs (#107370)
* Plugin Extension: improves  mutation logs

* chore: removes feature toggle

* chore: rename function
2025-07-01 06:10:57 +02:00
470f3c1578 Plugin Extensions: Mutable props for extension components (#107290)
* Plugin Extensions: Mutable props for extension components

* chore: updates after PR feedback
2025-06-30 05:54:12 +02:00
f7eab21f9f Loki: Decouple data source plugin (#107242)
* WIP

* Update yarn.lock

* Align uuid dependency

* Add e2e test and update

* Update cue version

* Fix lint

* Update snapshot test

* Fix test that was importing from coupled module

* Fix lint

* Update public/app/plugins/datasource/loki/package.json

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-06-27 15:09:45 +02:00
4e8802afff Plugins: Add repositoryUrl parameter to plugin details panel. (#107048)
add repositoryUrl parameter to plugin details
2025-06-26 08:59:46 +02:00
249be02010 Plugins: Improve the info box for enterprise plugins (#106630)
* Refine the enterprise plugin info box

* Update wording

* Update

* Remove white space before punctuation

* Update

* fix test

* Update
2025-06-25 09:48:30 +02:00
478c1debe0 Plugin Loader: Wait for plugins to register their extensions (#106969)
* fix: mark apps as preloaded after being preloaded

* move marking as preloaded into `preload`

* add tests

* refactor: make it reuse promises of already loaded plugins

* fix: review notes

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2025-06-25 06:49:25 +00: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
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
301d78bf96 User Storage: Expose functionality for frontend-only datasources (#106165) 2025-05-29 14:44:00 +02:00
7bfa78c6e6 I18n: Update eslint rule to catch some untranslated object properties (#105072) 2025-05-28 21:14:43 +01:00
c7cd06d5f5 i18n: exports TFunction from @grafana/i18n package (#105921) 2025-05-23 10:34:35 +02:00
3fe31e19b2 Plugins: Change versions tab column name (#105596) 2025-05-19 13:37:00 +02:00
119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00
a9b6d098e9 Chore: Add eslint no-restricted-globals rule (#104519)
* Chore: Add no-restricted-globals eslint rule

* Fix eslint warnings

* Revert some changes

* Update

* Feedback
2025-05-12 12:38:26 +03:00
8f17f607fa FEMT: Add no-restricted-img-srcs rule (#105006) 2025-05-12 10:34:17 +01:00
a3cd68d47f Plugins: Fix unauthorized message on login screen (#105053)
fix(plugins): hide error alert for unauthed users
2025-05-09 09:05:07 +02: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
bcb2a7e36f Plugin Extensions: Read-only props for extension components (#102079)
* feat: pass read-only props to extension components

This initial commit is used to verify that things are broken in case
the datasource object is not cloned before passed in as a prop.

* chore: update tests

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-05-06 06:55:23 +02:00
700f208b6e Plugins: Add sponsorship link to plugin details panel (#104687)
Add sponsorship link to plugin details panel
2025-05-01 13:39:50 +02:00
1c5545da04 Internationalisation: Check and mark up tooltip content prop (#104536)
* make lint rule check for "content"

* undo unnecessary translation
2025-04-30 14:40:15 +01:00
82332819ef DataSourceSrv: include alias in type filter (#104308) 2025-04-22 21:34:56 +03:00
9ed3c9ee8a Internationalisation: Final mark up of strings (#104165)
* some more markup

* more markup

* more markup

* almost there...

* more markup

* more markup

* last markup!

* fix unit tests
2025-04-22 11:02:01 +01:00
61cd19c540 Chore: More internationalisation markup (#104051)
* More markup

* fix some ternaries

* more alerting markup

* fix unit tests
2025-04-16 09:25:18 +01:00
7b4eb22242 Chore: Remove code for feature flag frontendSandboxMonitorOnly (#103982)
* Chore: Remove code for feature flag frontendSandboxMonitorOnly

* Fix lint issues
2025-04-15 12:52:14 +02:00
a2b06e2ec9 Internationalisation: More markup (#103970)
* more markup!

* fix tests

* use times symbol
2025-04-15 10:05:03 +01:00
048d164a3c Advisor: Add redirection notice in data sources and plugins pages (#103894) 2025-04-14 15:40:16 +02:00
722cd25da1 Extension Sidebar: Add openExtensionSidebar helper to plugin extensions (#103962)
* Extension Sidebar: add `openExtensionSidebar` helper

* Extension Sidebar: Change var to `props`

* Extension Sidebar: Fix comment

* Extension Sidebar: Destructure `props`

* Extension Sidebar: Remove `@alpha` and rename `context` to `props` as `any`

* Extension Sidebar: Improve docs

* Extension Sidebar: Rename `openExtensionSidebar` to `openSidebar`

* Extension Sidebar: Use `Record<string, unknown>` as type

* Extension Sidebar: Use `Record<string, unknown>` as type

* Extension Sidebar: Add tests for event based opening

* Extension Sidebar: Lint

* Extension Sidebar: Fix toolbar button tests
2025-04-14 14:59:35 +02:00
20d8223b6e Chore: Clean up code from pluginsAPIMetrics feature toggle (#103965) 2025-04-14 13:15: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
8df9c57045 Internationalisation: More markup for translations (#103726)
* mark up variables/trails/transformers

* more markup

* fix unit tests

* final unit test fix
2025-04-10 13:52:46 +01: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
e2475a2189 DataSourceSrv: Get datasource of type (#101495) 2025-04-08 13:51:21 -06:00
641031cfaf Chore: Type fixes (#103340)
* tidy tidy

* more fixes

* some TableNG fixes

* another TableNG test fix

* some more fixes

* betterer...
2025-04-07 11:29:30 +01:00