grafana/pkg/plugins
Jack Westbrook 8c8f584b41
Plugins: Extend panel menu with links from plugins (#63089)
* feat(plugins): introduce dashboard panel menu placement for adding menu items

* test: add test for getPanelMenu()

* added an unique identifier for each extension.

* added context to getPluginExtensions.

* wip

* Wip

* wiwip

* Wip

* feat: WWWIIIIPPPP 🧨

* Wip

* Renamed some of the types to align a bit better.

* added limit to how many extensions a plugin can register per placement.

* decreased number of items to 2

* will trim the lenght of titles to max 25 chars.

* wrapping configure function with error handling.

* added error handling for all scenarios.

* moved extension menu items to the bottom of the more sub menu.

* added tests for configuring the title.

* minor refactorings.

* changed so you need to specify the full path in package.json.

* wip

* removed unused type.

* big refactor to make things simpler and to centralize all configure error/validation handling.

* added missing import.

* fixed failing tests.

* fixed tests.

* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs

* removed the compose that didn't work for some reason.

* added tests just to verify that validation and error handling is tied together in configuration function.

* adding some more values to the context.

* draft validation.

* added missing tests for getPanelMenu.

* added more tests.

* refactor(extensions): move logic for validating extension link config to function

* Fixed ts errors.

* Update packages/grafana-data/src/types/app.ts

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

* Update packages/grafana-runtime/src/services/pluginExtensions/extensions.test.ts

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

* refactor(extensions): rename limiter -> pluginPlacementCount

* refactor(getpanelmenu): remove redundant continue statement

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2023-03-02 15:42:00 +01:00
..
adapters Chore: Rename Id to ID in alerting models (#62777) 2023-02-02 17:22:43 +01:00
backendplugin Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
codegen Kindsys: Replace DefForGen with kindsys.Kind (#62642) 2023-01-31 19:40:15 -05:00
config Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
licensing chore: move models/licensing into licensing service (#61878) 2023-01-23 11:53:43 -05:00
log Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
manager Plugins: Extend panel menu with links from plugins (#63089) 2023-03-02 15:42:00 +01:00
pfs Plugins: Extend panel menu with links from plugins (#63089) 2023-03-02 15:42:00 +01:00
plugincontext Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
plugindef Plugins: Extend panel menu with links from plugins (#63089) 2023-03-02 15:42:00 +01:00
pluginscdn Plugins: Fix plugins CDN not working when plugins are not in domain's root path (#63202) 2023-02-24 14:28:13 +01:00
repo Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
storage Plugins: Introduce plugin package specific logger (#62204) 2023-02-28 16:10:27 +01:00
accesscontrol.go Chore: Move ReqContext to contexthandler service (#62102) 2023-01-27 08:50:36 +01:00
errors.go Plugins: Use error plane for api/ds/query (#54750) 2022-09-14 18:19:57 +02:00
fakes.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
ifaces.go Plugins: Add tailored interface for plugins licensing needs (#61045) 2023-01-18 18:02:54 +01:00
models.go Plugins: Extend panel menu with links from plugins (#63089) 2023-03-02 15:42:00 +01:00
plugins.go Plugins: Extend panel menu with links from plugins (#63089) 2023-03-02 15:42:00 +01:00