Skip to content

[Lens][Agg based metric] Convert to Lens Metric.#142561

Merged
Kuznietsov merged 19 commits intoelastic:mainfrom
Kuznietsov:convert-to-lens_agg-based-metric
Oct 6, 2022
Merged

[Lens][Agg based metric] Convert to Lens Metric.#142561
Kuznietsov merged 19 commits intoelastic:mainfrom
Kuznietsov:convert-to-lens_agg-based-metric

Conversation

@Kuznietsov
Copy link
Copy Markdown
Contributor

@Kuznietsov Kuznietsov commented Oct 4, 2022

Summary

Completes part of #138236

As part of phasing out TSVB and Visualize all Legacy agg based visulizations should support "open in lens" functionality.
In that PR converter for Agg based metric was added.

@Kuznietsov Kuznietsov added the WIP Work in progress label Oct 4, 2022
@Kuznietsov Kuznietsov self-assigned this Oct 4, 2022
@Kuznietsov Kuznietsov changed the title [Lens][Agg based metric] Added support of metric. [Lens][Agg based metric] Convert to Lens Metric. Oct 4, 2022
@Kuznietsov Kuznietsov added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Vis Editor Visualization editor issues Feature:Lens release_note:enhancement loe:medium Medium Level of Effort labels Oct 5, 2022
@Kuznietsov Kuznietsov added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. v8.6.0 backport:skip This PR does not require backporting labels Oct 5, 2022
@Kuznietsov Kuznietsov marked this pull request as ready for review October 5, 2022 13:26
@Kuznietsov Kuznietsov requested a review from a team as a code owner October 5, 2022 13:26
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeMetric 10 27 +17
visualizations 357 358 +1
total +18

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
expressionLegacyMetricVis 48 49 +1
visualizations 695 699 +4
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
visTypeMetric 0.0B 23.5KB +23.5KB
visualizations 239.8KB 240.2KB +371.0B
total +23.9KB

Page load bundle

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

id before after diff
expressionLegacyMetricVis 9.6KB 9.8KB +204.0B
visTypeMetric 8.6KB 13.0KB +4.3KB
visTypeTable 19.4KB 19.4KB +20.0B
total +4.6KB
Unknown metric groups

API count

id before after diff
expressionLegacyMetricVis 48 49 +1
visualizations 725 729 +4
total +5

async chunk count

id before after diff
visTypeMetric 0 1 +1

History

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

cc @Kunzetsov

Copy link
Copy Markdown
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested and works well, LGTM. I realized we emit individual renders for every splitted metric in the legacy metric, but let's take care of that separately

@Kuznietsov Kuznietsov removed the WIP Work in progress label Oct 6, 2022
@Kuznietsov Kuznietsov merged commit 17e0531 into elastic:main Oct 6, 2022
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 11, 2022
* Added support of metric.

* Fixed bundle size.

* Added percentage mode.

* Added fix of snapshot.

* Fixed convertMetricToColumns tests.

* Added tests for percentageMode enabled in convertMetricToColumns

* Updated snapshots of run_pipeline/basic.ts

* Fixed snapshots.

* Fixed types.

* Fixed checks.

* Added tests for convertToColumnInPercentageMode.

* Added unit tests for convertToLens.

* Added tests for palette.

* Added tests for getPercentageModeConfig

* Added tests for getConfiguration.

* Fixed invalid behavior.

* Added functional tests.

* Added validation for top_hit percentage mode support.
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 14, 2022
* Added support of metric.

* Fixed bundle size.

* Added percentage mode.

* Added fix of snapshot.

* Fixed convertMetricToColumns tests.

* Added tests for percentageMode enabled in convertMetricToColumns

* Updated snapshots of run_pipeline/basic.ts

* Fixed snapshots.

* Fixed types.

* Fixed checks.

* Added tests for convertToColumnInPercentageMode.

* Added unit tests for convertToLens.

* Added tests for palette.

* Added tests for getPercentageModeConfig

* Added tests for getConfiguration.

* Fixed invalid behavior.

* Added functional tests.

* Added validation for top_hit percentage mode support.
kibanamachine added a commit that referenced this pull request Dec 8, 2022
# Backport

This will backport the following commits from `main` to `8.6`:
- [Adds the VisEditor docs for 8.6
(#146471)](#146471)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kaarina
Tungseth","email":"kaarina.tungseth@elastic.co"},"sourceCommit":{"committedDate":"2022-12-08T20:18:03Z","message":"Adds
the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6
for the following:\r\n\r\n- #140878, #143946 and
#142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n-
#142936, #142561, #143820, and
#142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n-
#138732\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n-
#141626 and #141615\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Stratoula Kalafateli
<stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0"],"number":146471,"url":"https://github.com/elastic/kibana/pull/146471","mergeCommit":{"message":"Adds
the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6
for the following:\r\n\r\n- #140878, #143946 and
#142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n-
#142936, #142561, #143820, and
#142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n-
#138732\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n-
#141626 and #141615\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Stratoula Kalafateli
<stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146471","number":146471,"mergeCommit":{"message":"Adds
the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6
for the following:\r\n\r\n- #140878, #143946 and
#142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n-
#142936, #142561, #143820, and
#142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n-
#138732\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n-
#141626 and #141615\r\n
\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Stratoula Kalafateli
<stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}}]}]
BACKPORT-->

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Lens Feature:Vis Editor Visualization editor issues impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants