-
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
[ML] Explain Log Rate Spikes: adds popover to analysis table for viewing other field values #154689
[ML] Explain Log Rate Spikes: adds popover to analysis table for viewing other field values #154689
Conversation
Pinging @elastic/ml-ui (:ml) |
x-pack/plugins/aiops/public/components/field_stats_popover/field_stats_popover.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/aiops/public/components/field_stats_popover/field_stats_popover.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/aiops/public/components/spike_analysis_table/spike_analysis_table.tsx
Show resolved
Hide resolved
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.
Great addition! Some things I noticed:
Layout nitpick: The popover icon has an influence on the upper padding of the field name cell so the text appears lower than in the field value cell.
With the icon after the field name, if you want to walk through the rows quickly and inspect the field statistics, it requires quite some targeting with the mouse. If the icon was before the field name it would be easier with vertically aligned icons. Not sure but maybe it's worth moving the icon to its own column, that would also solve the problem with vertical alignment?
One final thought: The field/value badges in the groups table themselves could be clickable and trigger the popover for that field.
button={trigger} | ||
renderHeader={() => <FieldPopoverHeader field={fieldForStats} closePopover={closePopover} />} | ||
renderContent={() => ( | ||
<> |
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: Only one element in there so we could remove the <>
wrapper.
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.
Removed in a44cade
@@ -284,13 +285,19 @@ export const ExplainLogRateSpikesAnalysis: FC<ExplainLogRateSpikesAnalysisProps> | |||
groupTableItems={groupTableItems} | |||
loading={isRunning} | |||
dataViewId={dataView.id} | |||
dataView={dataView} |
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.
If we need to pass in the full dataView
let's try to get rid of the dataViewId
prop and access the id
from dataView
within the component.
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.
Removed in a44cade
/> | ||
) : null} | ||
{showSpikeAnalysisTable && (!groupResults || !foundGroups) ? ( | ||
<SpikeAnalysisTable | ||
significantTerms={data.significantTerms} | ||
loading={isRunning} | ||
dataViewId={dataView.id} | ||
dataView={dataView} |
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.
If we need to pass in the full dataView
let's try to get rid of the dataViewId
prop and access the id
from dataView
within the component.
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.
Good catch - removed in a44cade
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.
Tested latest changes and LGTM
Code LGTM 🎉 |
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.
Overall LGTM - We should update the color of the highlighted field/value pair in the popover to match the highlight color in the mini histograms and overall histogram.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Related meta issue: #146065
Adds unified field list popover to show top values for fields in the Explain Log Rate Spikes analysis table.
Field pairs table:
Expanded row in grouped table:
Checklist
Delete any items that are not applicable to this PR.