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

Show blank lines instead of N/A on service map popovers #57014

Merged
merged 2 commits into from
Feb 24, 2020
Merged

Conversation

smith
Copy link
Contributor

@smith smith commented Feb 6, 2020

Because RUM agents never show CPU or memory usage, we don't want to always show the metric with N/A. If a metric is null, just hide the lines.

Break up the display and fetching components and update the popover stories to show the list.

Update some types.

Fixes #54405

@smith smith added Team:APM - DEPRECATED Use Team:obs-ux-infra_services. release_note:skip Skip the PR/issue when compiling release notes v7.7.0 apm:service-maps Service Map feature in APM labels Feb 6, 2020
@smith smith requested a review from a team as a code owner February 6, 2020 17:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@smith smith mentioned this pull request Feb 6, 2020
6 tasks
@elasticmachine
Copy link
Contributor

💔 Build Failed

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

@smith smith force-pushed the nls/popover-data branch 2 times, most recently from 6cd6b75 to 77da10b Compare February 6, 2020 21:04
@elasticmachine
Copy link
Contributor

💔 Build Failed

History

  • 💔 Build #24992 failed 27fad36f74fabeb793ee5290e85e7cc7e32e7199

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

  • 💔 Build #25049 failed 6cd6b75f26c822a808db5aecfd6cb8638cfdcff3
  • 💔 Build #24992 failed 27fad36f74fabeb793ee5290e85e7cc7e32e7199

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

@smith
Copy link
Contributor Author

smith commented Feb 19, 2020

@elasticmachine merge upstream

end,
environment
}
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: what do you think about collapsing small objects like this?

{
  pathname: "/api/apm/service-map/service/{serviceName}",
  params: {
    path: { serviceName },
    query: { start, end, environment }
  }
};

(I wish there was a prettier setting for this...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I usually try to compress them but don't think too much about them.

);
const isLoading = status === 'loading';

return <ServiceMetricList {...data} isLoading={isLoading} />;
Copy link
Member

Choose a reason for hiding this comment

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

Interesting approach with a fetcher component. Reminds me of Redux' "smart" and "dumb" components.
It results in an extra component - makes testing the inner component a lot more straightforward. So I'm all for it 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to test out the scenarios in storybook without having to mock a bunch of requests. It makes that easier and I think it makes for a good pattern in some cases.

Because RUM agents never show CPU or memory usage, we don't want to always show the metric with N/A. If a metric is null, just hide the lines.

Break up the display and fetching components and update the popover stories to show the list.

Update some types.
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@smith smith merged commit 7bec52a into master Feb 24, 2020
@smith smith deleted the nls/popover-data branch February 24, 2020 19:24
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 25, 2020
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 57014 or prevent reminders by adding the backport:skip label.

smith added a commit to smith/kibana that referenced this pull request Feb 26, 2020
* Show blank lines instead of N/A on service map popovers

Because RUM agents never show CPU or memory usage, we don't want to always show the metric with N/A. If a metric is null, just hide the lines.

Break up the display and fetching components and update the popover stories to show the list.

Update some types.

* Fix metric typings
smith added a commit that referenced this pull request Feb 26, 2020
)

* Show blank lines instead of N/A on service map popovers

Because RUM agents never show CPU or memory usage, we don't want to always show the metric with N/A. If a metric is null, just hide the lines.

Break up the display and fetching components and update the popover stories to show the list.

Update some types.

* Fix metric typings
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:service-maps Service Map feature in APM release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] [Service map] Popover fixes
4 participants