-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Dev tools plugin | ||
|
||
The ui/registry/dev_tools is removed in favor of the `dev_tools` plugin which exposes a register method in the setup contract. | ||
Registering app works mostly the same as registering apps in core.application.register. | ||
Routing will be handled by the id of the dev tool - your dev tool will be mounted when the URL matches `/app/kibana#/dev_tools/<YOUR ID>`. | ||
This API doesn't support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element. | ||
|
||
During the migration this plugin exposes the registered dev tools in the start contract. This is necessary to keep the dev tools app | ||
which is still living in the legacy platform working and will be removed once everything is moved over to the new platform. It should | ||
not be used by other plugins. | ||
|
||
## Example registration | ||
|
||
```ts | ||
// For legacy plugins | ||
import { npSetup } from 'ui/new_platform'; | ||
npSetup.plugins.dev_tools.register(/* same details here */); | ||
|
||
// For new plugins: first add 'dev_tools' to the list of `optionalPlugins` | ||
// in your kibana.json file. Then access the plugin directly in `setup`: | ||
|
||
class MyPlugin { | ||
setup(core, plugins) { | ||
if (plugins.dev_tools) { | ||
plugins.dev_tools.register(/* same details here. */); | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters