-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ensure extra columns are not shown in table vis when showPartialRows:true #25690
Conversation
* @param {boolean} respOpts.metricsAtAllLevels - reflects the value of vis.params.showMetricsAtAllLevels | ||
* @param {boolean} respOpts.partialRows - reflects the value of vis.params.showPartialRows | ||
* @param {Object} respOpts.timeRange - time range object, if provided | ||
*/ |
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.
Since params are being thrown around willy-nilly and hard to track, I added this to reduce confusion for people working on Tabify in the future. (A TypeScript rewrite would be very helpful here).
@@ -133,7 +134,8 @@ const CourierRequestHandlerProvider = function () { | |||
|
|||
const parsedTimeRange = timeRange ? getTime(aggs.indexPattern, timeRange) : null; | |||
const tabifyParams = { | |||
metricsAtAllLevels: isHierarchical, | |||
isHierarchical, | |||
metricsAtAllLevels, |
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.
These are split into separate params, because within table vis there is a distinction between the two. For example, the following is possible:
vis.params.showMetricsAtAllLevels === false;
vis.params.showPartialRows === true;
vis.isHierarchical(); // still returns true
This is due to how we configure the table vis:
https://github.com/elastic/kibana/blob/9b08fc719a9fb4c0c1dce55be73d395e7cd6b54a/src/core_plugins/table_vis/public/table_vis.js#L114-L116
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 is actually wrong i think ....
hierarchical === metricsAtAllLevels
(unless someone knows of any reasons it should be ? )
in courier request handler vis.isHierarchical() is used to figure out if we need to build a request with metrics on every level. (or it was, and its now refactored to look at metricsAtAllLevels parameter). we should use this same parameter in tabify (to figure out the same thing) ...
and partialRows should be completely independent ... as its just removing rows where we don't have value for every column.
Pinging @elastic/kibana-app |
💔 Build Failed |
^^ seems to be a legit failure, looking into it
in |
Next build should be green 🤞 |
💚 Build Succeeded |
I tested this and it looks good. |
Thanks for reviewing @trevan! Much appreciated |
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.
i think this introduces some more confusion with metricsAtAllLevels and isHierarchical ...
hierarchical === metricsAtAllLevels
(unless someone knows of any reasons it should be ? )
in courier request handler vis.isHierarchical() is used to figure out if we need to build a request with metrics on every level. (or it was, and its now refactored to look at metricsAtAllLevels parameter). we should use this same parameter in tabify (to figure out the same thing) ...
and partialRows should be completely independent ... as its just removing rows where we don't have value for every column.
d032949
to
ab544ed
Compare
💚 Build Succeeded |
@ppisljar I renamed some of the params that are being passed around to reduce confusion. Rather than using the I moved the logic for checking the existence of The overall effect is the same, but hopefully this makes its purpose clearer so it doesn't get mixed up with EDIT: We also used to have a |
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
440d4f2
to
b999e66
Compare
retest |
💔 Build Failed |
💚 Build Succeeded |
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.
Don't know why we got pinged on this one. Normally it's if the Pr has Sass files. In any case, nothing looks off by me.
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.
LGTM, left some minor suggestions. @trevan if you want to give this a final review if it satisfies your needs too, please feel free
@timroes, it looks good |
💚 Build Succeeded |
Closes #22168
Summary
Resolves a regression where clicking
show partial rows
on the data table vis would automatically render columns with metrics at all levels -- even if you didn't checkmetrics at all levels
.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibility