[TSVB][Lens] Navigate to Lens context converting improvement.#139719
[TSVB][Lens] Navigate to Lens context converting improvement.#139719Kuznietsov merged 153 commits intoelastic:mainfrom
Conversation
…hub.com:Kunzetsov/kibana into navigate-to-lens-context-converting-imporvement
…ntext-converting-imporvement
flash1293
left a comment
There was a problem hiding this comment.
Still looking. Found two small things in the meantime
| operationType: Operations.MAX, | ||
| sourceField: field.name, | ||
| ...createColumn(series, metric, field), | ||
| params: { ...getFormat(series) }, |
There was a problem hiding this comment.
Applies to all the cases where there is an inner column (cumulative sum, differences, moving average)
| if (aggregation.name === 'counter_rate') { | ||
| const numeratorFormula = constructFilterRationFormula( | ||
| `${aggregation.name}(max('${field}',`, | ||
| const numeratorFormula = `max(${constructFilterRationFormula( |
There was a problem hiding this comment.
some left-over max differences which should be counter_rate
| yRight: Boolean(model.show_grid), | ||
| }, | ||
| yLeftExtent: extents.yLeftExtent, | ||
| yRightExtent: extents.yRightExtent, |
There was a problem hiding this comment.
Not for this PR, but I noticed we don't convert the axis scale (setting it to log doesn't carry that over to Lens but it could). I will open an issue for it
There was a problem hiding this comment.
I added support of it here
src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/terms.ts
Outdated
Show resolved
Hide resolved
| if (series.terms_order_by === '_count' || !series.terms_order_by) { | ||
| const columnId = uuid(); | ||
| return { | ||
| orderBy: { type: 'column', columnId }, |
|
|
||
| // not supported formatters should be converted to number | ||
| if (!isSupportedFormat(series.formatter)) { | ||
| return { format: { id: DATA_FORMATTERS.NUMBER, ...(suffix && { params: { suffix } }) } }; |
There was a problem hiding this comment.
If there is no suffix and no formatter is specified, we should leave this empty so it can fall back to the data view formatting (right now it's forcing it to number)
There was a problem hiding this comment.
if we don't specify formatter (default), the series.formatter is undefined and above in code we provide empty object.
There was a problem hiding this comment.
I guess that's the case that should be fixed here
There was a problem hiding this comment.
oh, thank you Joe, I will update condition here
…-ref HEAD~1..HEAD --fix'
stratoula
left a comment
There was a problem hiding this comment.
This looks great, some comments from my side:
- cumulative sum of the value count should navigate to formula in order to work properly
- This also happens in main but I am trying to understand why it doesn't work. (we can do it on a followup PR).
While on the timeseries mode we are allowing nested combinations of aggregations (such as overall max of average) on topN we dont. Which is the reason for that? - I have this configuration
this should be allowed, it should go to Lens with pipeline agg (this works in 8.4) - Same for percentile_rank
|
@stratoula, I've fixed all the comments you left. Could you, please, review the PR again? Thanks 😃 |
…-ref HEAD~1..HEAD --fix'
stratoula
left a comment
There was a problem hiding this comment.
Thanx @Kunzetsov! I can't find more regressions, this works fine! I tested almost all aggregations and settings. Everything works fine! LGTM
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @VladLasitsa @Kunzetsov |
Won’t get to check this again this week, dismissing my review as it has two approvals from the team already









Summary
Completes part of #138236.
counter_rateof TSVB at Lens.Testing notes
[ link to a file with notes will be placed here ]