Skip to content

[8.19] [Discover] Fix formatting and sorting for custom ES|QL vars (#209360)#220069

Merged
jughosta merged 2 commits intoelastic:8.19from
jughosta:backport/8.19/pr-209360
May 5, 2025
Merged

[8.19] [Discover] Fix formatting and sorting for custom ES|QL vars (#209360)#220069
jughosta merged 2 commits intoelastic:8.19from
jughosta:backport/8.19/pr-209360

Conversation

@jughosta
Copy link
Contributor

@jughosta jughosta commented May 5, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…209360)

- Closes elastic#208020

## Summary

By default the data view (which is used in ES|QL mode) has only mapped
fields as per field caps for the current index pattern. This PR
dynamically extends with additional fields based on ES|QL meta
information.

This change helps to fix the formatting for ES|QL var values and fixes
sorting on them.

<img width="1673" alt="Screenshot 2025-02-03 at 18 42 14"
src="https://github.com/user-attachments/assets/3647a375-f0f5-43e6-815d-d5a4292c637a"
/>
<img width="643" alt="Screenshot 2025-02-03 at 18 42 50"
src="https://github.com/user-attachments/assets/9d84bc23-7665-43c1-8ac2-d67174b68c31"
/>

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
(cherry picked from commit 9635cfa)

# Conflicts:
#	src/platform/packages/shared/kbn-discover-utils/src/__mocks__/data_view.ts
#	src/platform/packages/shared/kbn-unified-data-table/tsconfig.json
#	src/platform/plugins/shared/unified_doc_viewer/tsconfig.json
@jughosta jughosta requested a review from kibanamachine as a code owner May 5, 2025 12:31
@jughosta jughosta added the backport This PR is a backport of another PR label May 5, 2025
@jughosta jughosta enabled auto-merge (squash) May 5, 2025 12:31
@jughosta jughosta requested a review from davismcphee May 5, 2025 14:28
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #12 / Description renders description correctly

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 585 586 +1
apm 1888 1889 +1
canvas 1321 1322 +1
cloudSecurityPosture 675 676 +1
dashboard 676 677 +1
data 538 539 +1
datasetQuality 308 309 +1
dataViewManagement 224 225 +1
dataVisualizer 745 746 +1
discover 1240 1241 +1
esql 206 207 +1
esqlDataGrid 416 417 +1
eventAnnotationListing 564 565 +1
infra 1736 1737 +1
investigateApp 576 577 +1
lens 1332 1333 +1
lists 437 438 +1
logsExplorer 457 458 +1
logsShared 361 362 +1
maps 1274 1275 +1
ml 2417 2418 +1
observability 1250 1251 +1
observabilityAIAssistantApp 425 426 +1
presentationUtil 130 131 +1
searchPlayground 309 310 +1
securitySolution 7265 7266 +1
slo 1122 1123 +1
stackAlerts 254 255 +1
streamsApp 481 482 +1
unifiedDocViewer 279 280 +1
unifiedHistogram 192 193 +1
unifiedSearch 367 368 +1
total +32

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
@kbn/data-view-utils 6 11 +5

Async chunks

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

id before after diff
cloudSecurityPosture 488.3KB 488.5KB +196.0B
discover 992.2KB 992.3KB +131.0B
esqlDataGrid 158.5KB 158.7KB +200.0B
securitySolution 9.2MB 9.2MB +203.0B
slo 925.9KB 926.1KB +192.0B
unifiedDocViewer 130.0KB 130.3KB +248.0B
total +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
cloudSecurityPosture 15.9KB 15.8KB -138.0B
dataViews 62.0KB 62.0KB +49.0B
esqlDataGrid 9.9KB 9.8KB -138.0B
total -227.0B
Unknown metric groups

API count

id before after diff
@kbn/data-view-utils 8 13 +5
dataViews 1237 1241 +4
total +9

History

@jughosta jughosta merged commit e3fd534 into elastic:8.19 May 5, 2025
8 checks passed
@jughosta jughosta deleted the backport/8.19/pr-209360 branch May 6, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants