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

ref(insights): Refactor Resources page charts #81976

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

gggritso
Copy link
Member

Makes two important changes:

  • Extract DurationChart, ThroughputChart, and AssetSizeChart components. These are re-used on the landing page and the asset details page. This also brings this module more in-line with how other insights are structured
  • use useSpanMetricsSeries instead of useSpansQuery. This is a better way to load data, since it returns meta and other good information. Again, better consistency with other Insights modules

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 11, 2024
@gggritso gggritso marked this pull request as ready for review December 11, 2024 20:20
@gggritso gggritso requested a review from a team as a code owner December 11, 2024 20:20
Copy link
Contributor

@DominikB2014 DominikB2014 left a comment

Choose a reason for hiding this comment

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

Nice refactor! couple small things

filters={appliedFilters}
extraQuery={extraQuery}
/>
<ThroughputChart series={data['spm()']} isLoading={isPending} error={error} />
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be an inconsistency with the rest of insights, but I think isPending would be a better prop name for the ThroughputChart if that's what we expect to pass into it from useSpanMetricsSeries

Copy link
Member Author

Choose a reason for hiding this comment

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

Noted, that's fair! I'll consider this when I start updating these charts soon (going to integrate new Dashboard widget components)

Copy link

codecov bot commented Dec 11, 2024

Bundle Report

Changes will increase total bundle size by 98.94kB (0.31%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 32.12MB 98.94kB (0.31%) ⬆️

@gggritso gggritso merged commit a5ca1be into master Dec 11, 2024
43 checks passed
@gggritso gggritso deleted the ref/insights/resource-landing-charts-data-loading branch December 11, 2024 21:23
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants