-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TSVB] Multi-field group by #126015
[TSVB] Multi-field group by #126015
Conversation
87eb678
to
6fcdbbf
Compare
6fcdbbf
to
84c871c
Compare
06475a0
to
1dc35d9
Compare
1dc35d9
to
4d3d47c
Compare
fecf7f7
to
11c223f
Compare
11c223f
to
0c3e618
Compare
@elasticmachine merge upstream |
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
@@ -83,7 +83,7 @@ export class KibanaMetricsAdapter implements InfraMetricsAdapter { | |||
series: panel.series.map((series) => { | |||
return { | |||
id: series.id, | |||
label: series.label, | |||
label: [series.label].flat()[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional?
As far as I can understand this will have no effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is by design to avoid type errors on your end. When using splitting by one field, everything will continue to work as before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, if you're making other changes it would be great if you could include that context in a code comment!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alex thanx a lot for working on this, it loos great!
- Can we also remove this question from our TSVB docs?
https://www.elastic.co/guide/en/kibana/current/tsvb.html (it suggests runtime fields but now we can support it natively so no need for this)
- I navigate to Lens with two fields but the break down label is misleading
If you re-create it in Lens the label is "Top values of + 1 other". Can we align the behaviors? consider it as a nit though.
-
Creating filters with clicking on the timeseries chart doesn't work for multi fields terms
-
It is a bit confusing to understand what this plus button does. Can we add it a bit closer to the terms dropdown?
- Can we respect the plural here? (2 others). Lens also does it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -24,7 +24,8 @@ export const dateHistogram: TableRequestProcessorsFunction = | |||
|
|||
const meta: TableSearchRequestMeta = { | |||
timeField, | |||
index: panel.use_kibana_indexes ? seriesIndex.indexPattern?.id : undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: In src/plugins/vis_types/timeseries/server/lib/vis_data/request_processors/annotations/query.test.ts
and src/plugins/vis_types/timeseries/server/lib/vis_data/request_processors/table/query.test.ts
there are a few leftovers of the index
property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flash1293 these indexes related to filter object. It's not related to that PR
@elasticmachine merge upstream |
I see that feature is working well for limited cases. Reported issue for that here #126671 . |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @alexwizp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works great Alex, thank you a lot! Let's fix all the filter events bugs on a separate PR. I am fine with that! LGTM!
* fieldSelect * activate multifield support for table * update table>pivot request_processor * fix some tests * apply some changes * fix JEST * push initial logic for series request_processor * fix some broken cases for Table tab * update convert_series_to_datatable / convert_series_to_vars * add some logic * fix table/terms * do some logic * fix some issues * push some logic * navigation to Lens * fix CI * add excludedFieldFormatsIds param into excludedFieldFormatsIds * fix ci * fix translations * fix some comments * fix series_agg label * update labels in lens Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* fieldSelect * activate multifield support for table * update table>pivot request_processor * fix some tests * apply some changes * fix JEST * push initial logic for series request_processor * fix some broken cases for Table tab * update convert_series_to_datatable / convert_series_to_vars * add some logic * fix table/terms * do some logic * fix some issues * push some logic * navigation to Lens * fix CI * add excludedFieldFormatsIds param into excludedFieldFormatsIds * fix ci * fix translations * fix some comments * fix series_agg label * update labels in lens Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes: #125063
Summary
The "group by" terms should allow multiple fields using multi field terms under the hood.
Screen
Screen.Recording.2022-02-28.at.12.31.19.PM.mov
Screen.Recording.2022-02-28.at.12.50.23.PM.mov
Todo list:
FieldSelect
component to work with multi fieldspanel_model.ts
.terms_field
andpivot_id
should supportArray<string | null>
Table -> Group By
andTerms -> By
Table -> Group By
Terms -> By
backendconvert_series_to_datatable
Navigate to Lens