kibana/x-pack/examples/embedded_lens_example
Nathan Reese b213eb6bb2
[embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960)
Embeddable ViewMode is part of legacy embeddable architecture. This PR
removes Embeddable ViewMode and replaces its usage with
presentation-publishing ViewMode. presentation-publishing ViewMode is a
string literal type so an enum is no longer needed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-04 09:05:23 -07:00
..
public [embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960) 2025-03-04 09:05:23 -07:00
.eslintrc.json
kibana.jsonc [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md
tsconfig.json [embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960) 2025-03-04 09:05:23 -07:00

Embedded Lens examples

To run this example plugin, use the command yarn start --run-examples.

This example shows how to embed Lens into other applications. Using the EmbeddableComponent of the lens start plugin, you can pass in a valid Lens configuration which will get rendered the same way Lens dashboard panels work. Updating the configuration will reload the embedded visualization.

It is possible to use the same configuration and the navigateToPrefilledEditor method to navigate the current user to a prefilled Lens editor so they can manipulate the configuration on their own and even save the results to a dashboard. Make sure to always check permissions using canUseEditor whether the current user has permissions to access Lens.