grafana/public/app/features/plugins
Marcus Andersson b63c56903d
Plugins: Extend panel menu with commands from plugins (#63802)
* 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.

* Started to add structure for supporting commands.

* fixed tests.

* adding commands to the registry

* tests: group test cases in describe blocks

* tests: add a little bit more refactoring to the tests

* tests: add a test case for checking correct placements

* feat: first version of the command handler

* feat: register panel menu items with commands

* refactor: make the 'configure' function not optional on `PluginExtensionRegistryItem`

* Wip

* Wip

* Wip

* added test to verify the default configure function.

* added some more tests to verify that commands have the proper error handling for its configure function.

* tests: fix TS errors in tests

* tests: add auxiliary functions

* refactor: small refactoring in tests

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* refactor: refactoring tests for registryFactory

* draft of wrapping command handler with error handling.

* refactor: refactoring tests for registryFactory

* added test for edge case.

* replaced the registry item with a configure function.

* renamed the configure function type.

* refactoring of the registryfactory.

* added tests for handler error handling.

* fixed issue with assert function.

* added comment about the limited type.

* Update public/app/features/plugins/extensions/errorHandling.test.ts

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

* Update public/app/features/plugins/extensions/errorHandling.test.ts

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

* Update public/app/features/plugins/extensions/errorHandling.test.ts

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

* added missing tests.

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-03-08 14:23:29 +01:00
..
admin Nav: Handle app plugin installation/uninstallation (#63706) 2023-03-02 09:50:01 +01:00
components Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
extensions Plugins: Extend panel menu with commands from plugins (#63802) 2023-03-08 14:23:29 +01:00
sql MySQL: Quote identifiers that include special characters (#61135) 2023-01-31 18:16:28 +01:00
systemjsPlugins Plugins: Fix plugins CDN not working when plugins are not in domain's root path (#63202) 2023-02-24 14:28:13 +01:00
tests Chore: fix type errors in tests (#63270) 2023-02-14 16:46:42 +01:00
all.ts Angular: More isolation and removing of unused components (#41630) 2021-11-15 15:12:45 +01:00
built_in_plugins.ts Schema: Initial Azure Monitor query schema (#62018) 2023-02-03 16:06:54 +00:00
datasource_srv.ts Dashboard: Reverted the changes of hiding multi-select and all variable in the datasource picker (#53521) 2022-08-10 15:30:00 +02:00
importPanelPlugin.ts PanelRenderer: Improves PanelRenderer performance (#51092) 2022-06-20 14:41:39 +02:00
plugin_loader.ts Plugins: Allow loading panel plugins from a CDN (#59096) 2023-01-27 15:08:17 +01:00
pluginPreloader.ts Plugins: Extend panel menu with commands from plugins (#63802) 2023-03-08 14:23:29 +01:00
pluginSettings.test.ts Alerting: Declare incident from a firing alert (#61178) 2023-01-11 11:52:20 +00:00
pluginSettings.ts Alerting: Declare incident from a firing alert (#61178) 2023-01-11 11:52:20 +00:00
routes.tsx Plugins: Case-sensitive routes for standalone pages (#62779) 2023-02-03 09:01:34 +01:00
utils.test.ts Navigation: Fix finding the active nav item for plugins (#62123) 2023-01-26 14:10:09 +00:00
utils.ts Navigation: Fix finding the active nav item for plugins (#62123) 2023-01-26 14:10:09 +00:00