[Discover] Breakdown support for fieldstats#199028
[Discover] Breakdown support for fieldstats#199028mohamedhamed-ahmed merged 26 commits intoelastic:mainfrom
Conversation
jughosta
left a comment
There was a problem hiding this comment.
Left some comments but overall looks good!
src/plugins/discover/public/application/main/components/layout/discover_layout.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/layout/discover_layout.tsx
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/layout/discover_layout.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/layout/discover_layout.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-unified-field-list/src/components/field_popover/field_popover_header.tsx
Outdated
Show resolved
Hide resolved
…ithub.com/mohamedhamed-ahmed/kibana into 192700-fieldstats-popover-breakdown-field
packages/kbn-data-view-utils/src/utils/convert_to_data_table_column.ts
Outdated
Show resolved
Hide resolved
packages/kbn-unified-field-list/src/components/field_popover/field_popover_header.tsx
Outdated
Show resolved
Hide resolved
…ithub.com/mohamedhamed-ahmed/kibana into 192700-fieldstats-popover-breakdown-field
…ithub.com/mohamedhamed-ahmed/kibana into 192700-fieldstats-popover-breakdown-field
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
|
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
|
@mohamedhamed-ahmed do we want to disable the icon if the breakdown is already applied?
Not so important, just asking |
Had same question in mind, and discussed it with @jughosta but then we agreed to keep it and not hide it |
stratoula
left a comment
There was a problem hiding this comment.
ES|QL changes LGTM, I also did a brief testing locally. I don't kow if we want to disable thye breakdown icon if the breakdown field has already been applied in the dropdown but I dont consider it a blocker. LGTM, thanx Mohamed, great job!
|
|
||
| return true; | ||
| export const isESQLFieldGroupable = (field: FieldSpec): boolean => { | ||
| if (field.timeSeriesMetric === 'counter') return false; |
There was a problem hiding this comment.
| if (field.timeSeriesMetric === 'counter') return false; | |
| if (field.timeSeriesMetric) return false; |
Other cases like histogram I guess also would not work.
There was a problem hiding this comment.
They are not supported by ESQL yet. What other options can this timeseriesMetric take? Let's evaluate first before doing the suggested change
There was a problem hiding this comment.
Here are possible values for data view mode
kibana/x-pack/plugins/lens/public/types.ts
Line 111 in a854ff8
It does not exactly apply to ES|QL at the moment but it might in the future.
There was a problem hiding this comment.
I see, thanx for sharing Julia.
In the columns function we check for counter related metrics as only these are partially supported by ESQL and only for these we know for sure that they are not groupable.
We have 2 options. Either keep it as it is (which aligns with the above function) or change both.
I personally prefer the first option. (Aligns with the existing column function too). When more tsdb metrics will be added we should test (and update if is the case the isGroupable functionality). But I dont have a strong opinion, mostly a preference
packages/kbn-unified-field-list/src/components/field_popover/field_popover_header.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item.tsx
Show resolved
Hide resolved
...ages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.tsx
Show resolved
Hide resolved
⏳ Build in-progress
History
|
|
Starting backport for target branches: 8.x |
closes elastic#192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 7369442)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Breakdown support for fieldstats (#199028)](#199028) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2024-11-12T12:26:36Z","message":"[Discover] Breakdown support for fieldstats (#199028)\n\ncloses https://github.com/elastic/kibana/issues/192700\r\n\r\n## 📝 Summary\r\n\r\nThis PR add a new `Add breakdown` button to the field stats popover for\r\nall applicable fields.\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"73694426f943f00f74556406dcb26c66eb4a772a","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs"],"title":"[Discover] Breakdown support for fieldstats","number":199028,"url":"https://github.com/elastic/kibana/pull/199028","mergeCommit":{"message":"[Discover] Breakdown support for fieldstats (#199028)\n\ncloses https://github.com/elastic/kibana/issues/192700\r\n\r\n## 📝 Summary\r\n\r\nThis PR add a new `Add breakdown` button to the field stats popover for\r\nall applicable fields.\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"73694426f943f00f74556406dcb26c66eb4a772a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199028","number":199028,"mergeCommit":{"message":"[Discover] Breakdown support for fieldstats (#199028)\n\ncloses https://github.com/elastic/kibana/issues/192700\r\n\r\n## 📝 Summary\r\n\r\nThis PR add a new `Add breakdown` button to the field stats popover for\r\nall applicable fields.\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"73694426f943f00f74556406dcb26c66eb4a772a"}}]}] BACKPORT--> Co-authored-by: mohamedhamed-ahmed <mohamed.ahmed@elastic.co>
closes elastic#192700 ## 📝 Summary This PR add a new `Add breakdown` button to the field stats popover for all applicable fields. ## 🎥 Demo https://github.com/user-attachments/assets/d647189c-9b04-4127-a4fd-f9764babe46e --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>

closes #192700
📝 Summary
This PR add a new
Add breakdownbutton to the field stats popover for all applicable fields.🎥 Demo
Screen.Recording.2024-11-07.at.14.07.50.mov