Skip to content
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

[Fleet] Fix display of local_metadata #65260

Merged
merged 2 commits into from
May 5, 2020

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented May 5, 2020

Summary

Resolve #65238

fix display of local_metadata, I added some type guard also to be sure to not break the page if we have invalid metadata.

With the latest agent:
Screen Shot 2020-05-05 at 9 06 14 AM
Screen Shot 2020-05-05 at 9 06 18 AM

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.8.0 Team:Fleet Team label for Observability Data Collection Fleet team labels May 5, 2020
@nchaulet nchaulet requested a review from a team May 5, 2020 13:23
@nchaulet nchaulet self-assigned this May 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@@ -505,7 +511,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
loading={isLoading && agentsRequest.isInitialRequest}
hasActions={true}
noItemsMessage={
isLoading ? (
isLoading && agentsRequest.isInitialRequest ? (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to avoid a blink effect, every 30 seconds.

@@ -30,7 +30,11 @@ export const AgentDetailsContent: React.FunctionComponent<{
title: i18n.translate('xpack.ingestManager.agentDetails.hostNameLabel', {
defaultMessage: 'Host name',
}),
description: agent.local_metadata['host.hostname'],
description:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL i was expecting some black magic

@ruflin
Copy link
Member

ruflin commented May 5, 2020

elastic/beats#18234 got merged. Did you test this with an older or newer agent? I tried this on my end and got mixed results :-)

@nchaulet
Copy link
Member Author

nchaulet commented May 5, 2020

I did not tested it with this change, going to test it, I probably need to update the version too

@nchaulet
Copy link
Member Author

nchaulet commented May 5, 2020

I pushed a change that is working with the latest agent

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally with the most recent agent and everything seems to be there.

@skh
Copy link
Contributor

skh commented May 5, 2020

image

This is with agent built from beats master 3df5db4f6360a88930d5569451f10e57caa35d59 , on linux/amd64.

It also fixes the React error on the agents list for me.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nchaulet nchaulet merged commit f5d6466 into elastic:master May 5, 2020
@nchaulet nchaulet deleted the feature-fleet-fix-metadata branch May 5, 2020 16:06
nchaulet added a commit to nchaulet/kibana that referenced this pull request May 5, 2020
@nchaulet
Copy link
Member Author

nchaulet commented May 5, 2020

@paul-tavares Maybe it could interest you not sure how you use agent metadata in endpoint but the host is now, ECS compliant and under local_metadata.host.hostname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Agent list not displaying correctly
6 participants