kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[TSVB][Lens] Add "open in lens" functionality for Top N

Open VladLasitsa opened this issue 3 years ago • 5 comments
trafficstars

Summary

As part of phasing out TSVB and Visualize all TSVB visulizations should support "open in lens" functionality. In that PR converter for Top N was added.

Top N in TSVB: Снимок экрана 2022-08-05 в 15 57 43

In Lens: Снимок экрана 2022-08-05 в 15 58 15

VladLasitsa avatar Aug 05 '22 12:08 VladLasitsa

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

elasticmachine avatar Aug 09 '22 09:08 elasticmachine

@elasticmachine merge upstream

VladLasitsa avatar Aug 09 '22 09:08 VladLasitsa

@elasticmachine merge upstream

VladLasitsa avatar Aug 10 '22 08:08 VladLasitsa

Hey! Thanx for working on this. Some comments and questions from my side:

I wonder why don't we allow the transition for multiple layers? For example: image

can be translated to image

As long this is not allowed in TSVB, we should not allow the transition to Lens either image

The last value mode should be converted to Lens with the Reduced time range setting. Am I right @flash1293 ? image

There are some aggs that work on TSVB such as the cumulative sum (due to the date_histogram) but not in Lens. Should we allow this transition? cc @flash1293 image

In case of percentile ranks split by terms the custom color is not transferred in Lens. So for example this will transition to Lens with the default green color. image

stratoula avatar Aug 10 '22 10:08 stratoula

I wonder why don't we allow the transition for multiple layers

Vlad and me discussed this - as the chart looks pretty weird due to the empty slots for the other series, we decided to not convert these for now. However, looking at it again I think it's worth doing the conversion even if it looks a little weird - better than no chart. @VladLasitsa could you change this? Sorry for the back and forth

The last value mode should be converted to Lens with the Reduced time range setting. Am I right

yes exactly! I didn't mention this in the doc. We can also split it out. I'll update the doc

There are some aggs that work on TSVB such as the cumulative sum (due to the date_histogram) but not in Lens. Should we allow this transition?

No, let's block these please.

flash1293 avatar Aug 10 '22 13:08 flash1293

Thanx Joe! I had updated the doc some days ago if I recall correctly!

stratoula avatar Aug 10 '22 13:08 stratoula

@elasticmachine merge upstream

VladLasitsa avatar Aug 12 '22 12:08 VladLasitsa

@stratoula, Could you please review again?

VladLasitsa avatar Aug 12 '22 12:08 VladLasitsa

Thanx Vlad! Found one bug! If I am on TopN last value and then go back to timeseries and click "Navigate to Lens" I see this error image

This happens because we also transfer the last value mode which is wrong as the timeseries chart is not compatible with this.

stratoula avatar Aug 12 '22 14:08 stratoula

@elasticmachine merge upstream

VladLasitsa avatar Aug 16 '22 07:08 VladLasitsa

Thanx Vlad! Found one bug! If I am on TopN last value and then go back to timeseries and click "Navigate to Lens" I see this error image

This happens because we also transfer the last value mode which is wrong as the timeseries chart is not compatible with this.

Fixed

VladLasitsa avatar Aug 16 '22 09:08 VladLasitsa

Looks pretty good, just found one bug: "Last value" mode is not respected for formula-type dimensions (like standard deviation or filter ratio) - it seems like it's just ignored for these cases.

flash1293 avatar Aug 17 '22 10:08 flash1293

Looks pretty good, just found one bug: "Last value" mode is not respected for formula-type dimensions (like standard deviation or filter ratio) - it seems like it's just ignored for these cases.

@flash1293, Could you please re-test?

VladLasitsa avatar Aug 17 '22 15:08 VladLasitsa

Seems like filter ratio is not convertable anymore: Screenshot 2022-08-18 at 11 21 20

Maybe the check for "missing field" went wrong?

It also still tries to set the reduced time range when on a timeseries chart: Screenshot 2022-08-18 at 11 22 44 Screenshot 2022-08-18 at 11 22 47

flash1293 avatar Aug 18 '22 09:08 flash1293

As discussed in the weekly sync, parent pipeline aggregations should not be convertable for charts other than time series because they are executed along the time axis and there isn't a time axis in Lens: Screenshot 2022-08-18 at 11 25 50 Screenshot 2022-08-18 at 11 25 16

This conversion is not equivalent, the overall_sum is doing something else in Lens than in TSVB

flash1293 avatar Aug 18 '22 09:08 flash1293

@elasticmachine merge upstream

VladLasitsa avatar Aug 22 '22 10:08 VladLasitsa

:green_heart: Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeTimeseries 361 363 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 2428 2431 +3
visualizations 386 388 +2
total +5

Async chunks

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

id before after diff
lens 1.2MB 1.2MB +182.0B
visTypeTimeseries 453.0KB 459.8KB +6.8KB
visualizations 197.4KB 197.4KB +88.0B
total +7.1KB

Page load bundle

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

id before after diff
data 429.5KB 429.6KB +52.0B
visTypeTimeseries 18.7KB 18.9KB +178.0B
total +230.0B
Unknown metric groups

API count

id before after diff
data 3114 3117 +3
visualizations 414 416 +2
total +5

async chunk count

id before after diff
visTypeTimeseries 11 13 +2

History

  • :green_heart: Build #65986 succeeded a328328aae402a050c6b532caaafabda4f22f7fb
  • :green_heart: Build #65961 succeeded 4c97ac3398dd2f9723460bcee520f21fdce7d1a1
  • :green_heart: Build #65292 succeeded d32db796638cc1cf5330aa2c06e4f3422c51e923
  • :green_heart: Build #64791 succeeded 059c42e058f4db2e454a708558dc23fea33bfc74
  • :green_heart: Build #64148 succeeded 87559dfa14b32be77ff0aeb71e319bc80539a70e
  • :green_heart: Build #63843 succeeded f05039fd00c6d5f952bde4a46f8f25014756a230

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

cc @VladLasitsa

kibana-ci avatar Aug 22 '22 12:08 kibana-ci