|
1 | | -# Basic url drilldown implementation |
| 1 | +## URL drilldown |
| 2 | + |
| 3 | +> NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to `ui_actions_enhanced` plugin. |
2 | 4 |
|
3 | 5 | Url drilldown allows navigating to external URL or to internal kibana URL. |
4 | 6 | By using variables in url template result url can be dynamic and depend on user's interaction. |
5 | 7 |
|
6 | 8 | URL drilldown has 3 sources for variables: |
7 | 9 |
|
8 | | -- Global static variables like, for example, `kibanaUrl`. Such variables won’t change depending on a place where url drilldown is used. |
9 | | -- Context variables are dynamic and different depending on where drilldown is created and used. |
10 | | -- Event variables depend on a trigger context. These variables are dynamically extracted from the action context when drilldown is executed. |
| 10 | +1. Global static variables like, for example, `kibanaUrl`. Such variables won’t change depending on a place where url drilldown is used. |
| 11 | +2. Context variables are dynamic and different depending on where drilldown is created and used. |
| 12 | +3. Event variables depend on a trigger context. These variables are dynamically extracted from the action context when drilldown is executed. |
11 | 13 |
|
12 | 14 | Difference between `event` and `context` variables, is that real `context` variables are available during drilldown creation (e.g. embeddable panel), |
13 | 15 | 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. |
14 | 16 |
|
15 | 17 | In current implementation url drilldown has to be used inside the embeddable and with `ValueClickTrigger` or `RangeSelectTrigger`. |
16 | 18 |
|
17 | | -- `context` variables extracted from `embeddable` |
18 | | -- `event` variables extracted from `trigger` context |
| 19 | +* `context` variables extracted from `embeddable` |
| 20 | +* `event` variables extracted from `trigger` context |
19 | 21 |
|
20 | 22 | 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. |
21 | 23 | This extensibility improvements are tracked here: https://github.com/elastic/kibana/issues/55324 |
22 | 24 |
|
23 | 25 | In case a solution app has a use case for url drilldown that has to be different from current basic implementation and |
24 | | -just extending variables list is not enough, then recommendation is to create own custom url drilldown and reuse building blocks from `ui_actions_enhanced`. |
| 26 | +just extending variables list is not enough, then recommendation is to create own custom url drilldown and reuse building blocks from `ui_actions_enhanced`. |
0 commit comments