-
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
[Logs UI] View log details for anomaly log examples #75425
Conversation
Previously, when the user clicked a filter in the `LogEntryFlyout` two callbacks where fired: `setFilter` and `setTarget`. The purpose of the first was to add a filter based on the field where the user clicked. The second was to center the log stream in the line item that corresponded to the item shown in the flyout. Having these two callbacks gave too much knowledge to the `LogEntryFlyout` about what its consumer was doing. It also required the consumer to handle separatedly two events that happened at the same time. This commit removes `setTarget` and modifies `setFilter` to take as arguments the flyoutItemId and its timeKey. Consumers now only need to handle one callback instead of two. In the context of elastic#68433, it also enable the log analysis UI to link to the log stream with both a filter and a position, without needing to build the link from the result of calling the two callbacks.
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
@elasticmachine merge upstream |
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.
Functionality works well, good job 👍
I've left a couple of code comments.
x-pack/plugins/infra/public/components/logging/log_entry_flyout/log_entry_flyout.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/components/logging/log_entry_flyout/log_entry_flyout.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx
Show resolved
Hide resolved
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
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.
🙌🙌🙌
…75954) Co-authored-by: Elastic Machine <[email protected]>
Summary
Closes #68443.
Add a "View detail" link to the log line examples that opens a
LogEntryFlyout
.The interface for
LogEntryFlyout
was simplified a bit. We were using two callbacks when the user clicked in the filter icons, each one being responsible to set a different bit of state. I simplified it to only one callback to make it easy to link to the log stream from outside.