kibana/x-pack/plugins/drilldowns/url_drilldown/README.md
Anton Dosov 4b6d77fa5d
[Drilldowns] Config to disable URL Drilldown (#77887)
This pr makes sure there is way to disable URL drilldown feature.
I decided to extract Url drilldown definition into a separate plugin to benefit from regular disabling a plugin feature.
Having it as a separate plugin also makes sense because we will start adding registries specific to URL drilldown implementation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-23 11:12:12 +02:00

1.9 KiB
Raw Blame History

URL drilldown

NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to ui_actions_enhanced plugin.

Url drilldown allows navigating to external URL or to internal kibana URL. By using variables in url template result url can be dynamic and depend on user's interaction.

URL drilldown has 3 sources for variables:

  1. Global static variables like, for example, kibanaUrl. Such variables wont change depending on a place where url drilldown is used.
  2. Context variables are dynamic and different depending on where drilldown is created and used.
  3. Event variables depend on a trigger context. These variables are dynamically extracted from the action context when drilldown is executed.

Difference between event and context variables, is that real context variables are available during drilldown creation (e.g. embeddable panel), but event variables mapped from trigger context. Since there is no trigger context during drilldown creation, we have to provide some mock variables for validating and previewing the URL.

In current implementation url drilldown has to be used inside the embeddable and with ValueClickTrigger or RangeSelectTrigger.

  • context variables extracted from embeddable
  • event variables extracted from trigger context

In future this basic url drilldown implementation would allow injecting more variables into context (e.g. dashboard app specific variables) and would allow providing support for new trigger types from outside. This extensibility improvements are tracked here: https://github.com/elastic/kibana/issues/55324

In case a solution app has a use case for url drilldown that has to be different from current basic implementation and just extending variables list is not enough, then recommendation is to create own custom url drilldown and reuse building blocks from ui_actions_enhanced.