Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSVB] Enables url drilldowns for range selection #95296

Merged
merged 24 commits into from
Apr 2, 2021

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Mar 24, 2021

Summary

Closes #92164
Until now, TSVB supports only the brush event by using the APPLY_FILTER trigger directly. As a result, the user can't create url drilldowns as they require the RANGE_SELECT_TRIGGER instead.

This PR changes the event type and also converts the data to DataTable in order for the event to work properly. The brush event actually requires only the timefilter to work correctly but as we also want to enable filter click on TSVB (currently not supported #83892) I have created the convertSeriesToDataTable function as a step towards this direction.

How to test it

Go to Dashboard and create a timeseries TSVB visualization. On edit mode create a url drilldown (license should be updated first). You can see that now, there is an extra option Range Selection. You can use Discover as the Go to drilldown

{{kibanaUrl}}/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'{{date event.from}}',to:'{{date event.to}}'))&_a=(columns:!(_source),filters:{{rison context.panel.filters}},index:'{{context.panel.indexPatternId}}',interval:auto,query:(language:{{context.panel.query.language}},query:'{{context.panel.query.query}}'),sort:!())

Save the drilldown, switch to view mode and then brush on the TSVB vis. You should see a popup with the url drilldown you have just created as an option. Click it, it should navigate to Discover with the correct timeframe.

image

Checklist

Delete any items that are not applicable to this PR.

@stratoula stratoula changed the title Drilldowns temp [TSVB] Url Drilldowns Mar 26, 2021
@elastic elastic deleted a comment from kibanamachine Mar 30, 2021
@stratoula stratoula changed the title [TSVB] Url Drilldowns [TSVB] Enables Url Drilldowns for range selection Mar 30, 2021
@elastic elastic deleted a comment from kibanamachine Mar 30, 2021
@stratoula stratoula added Feature:TSVB TSVB (Time Series Visual Builder) release_note:feature Makes this part of the condensed release notes v7.13.0 v8.0.0 labels Mar 30, 2021
@stratoula stratoula marked this pull request as ready for review March 30, 2021 13:12
@stratoula stratoula requested a review from a team March 30, 2021 13:12
@stratoula stratoula added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Mar 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review 👍 . Just a minor nitpick really.

Tested PR on Firefox, Chrome and Safari.
Cannot really test on Safari as the TSVB panel is white (but it's same as master so not a blocker here)

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula stratoula changed the title [TSVB] Enables Url Drilldowns for range selection [TSVB] Enables url drilldowns for range selection Apr 2, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeTimeseries 501 502 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 1.6MB 1.6MB +1.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visTypeTimeseries 109.2KB 109.1KB -6.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@stratoula stratoula merged commit d2a484c into elastic:master Apr 2, 2021
stratoula added a commit to stratoula/kibana that referenced this pull request Apr 2, 2021
* Temp research code

* Make it work

* Cleanup

* Convert series to datatable

* Remove unecessary log

* Minor

* Fix types problem

* Add unit tests

* Take under consideration the override index pattern setting

* Implement brush event for dual mode

* Move indexpatterns fetch outside the loop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
stratoula added a commit that referenced this pull request Apr 5, 2021
* Temp research code

* Make it work

* Cleanup

* Convert series to datatable

* Remove unecessary log

* Minor

* Fix types problem

* Add unit tests

* Take under consideration the override index pattern setting

* Implement brush event for dual mode

* Move indexpatterns fetch outside the loop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TSVB] Enable url drilldowns
4 participants