-
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
[Infra UI] Adding links from Infra UI to Uptime #35993
Conversation
Pinging @elastic/infrastructure-ui |
💔 Build Failed |
@dov0211 Looks like |
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
Linking with
I know we have already discussed this, but maybe we should explicitly track this in a separate issue to make sure it is documented somewhere. @dov0211, what do you think? |
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 job, and really nice to see more tests.
Just one comment inline about how the IP addresses come back, but I'm not sure how likely this is to be a problem.
): string | null => { | ||
const ip = get(bucket, `ip.hits.hits[0]._source.${IP_FIELDS[options.nodeType]}`); | ||
// Use the first ip since it's the IPv4 IP address | ||
return Array.isArray(ip) ? first(ip) : ip; |
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.
Can we be sure that the IPv4 ip is always the first entry?
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.
That's a good point, I think I will make a filter that matches the format to make sure it's the right one.
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 changed this so it only returns the first IPv4 address it finds. I also added a unit test to make sure it works correctly 👍
💚 Build Succeeded |
@simianhacker Thank you for the changes and the additional tests 👍 There's one more issue though: heartbeat data shouldn't have the |
@dov0211 @justinkambic After some discussion it was agreed upon that we should only show the link for |
💚 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.
👍
* [Infra UI] Adding from Infra UI to Uptime * Removed unused variable * Adding tests for link generation * Sometimes the IP address will be an array with [IPv4, IPv6] * Ensuring only IPv4 addresses are returned; adding tests; * only showing uptime link for host's with ip addresses
* [Infra UI] Adding from Infra UI to Uptime * Removed unused variable * Adding tests for link generation * Sometimes the IP address will be an array with [IPv4, IPv6] * Ensuring only IPv4 addresses are returned; adding tests; * only showing uptime link for host's with ip addresses
Summary
This PR closes #35294 by adding the a link to the node context menu. In support of the URL, this PR also adds the available IP address to the node path to be used in uptime monitoring.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Documentation was added for features that require explanation or tutorialsFor maintainers
his was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately