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

Add labels to cloud cost view table rows #2371

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

Sean-Holcomb
Copy link
Contributor

What does this PR change?

  • Adds labels to the cloudcost.ViewTableRow struct so that they can be displayed in pills on the CloudCost page.

  • Update the response from QueryViewTotals on the cloudcost.ViewQuerier interface to a match the type it is converted to for response

Does this PR relate to any other PRs?

How will this PR impact users?

  • Users will be able to see labels in CloudCost in the Cloud Cost view table

Does this PR address any GitHub or Zendesk issues?

  • Closes ...

How was this PR tested?

  • Tested in local deploys

Does this PR require changes to documentation?

Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?

Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opencost ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2023 7:23pm

QueryViewTotals(ViewQueryRequest, context.Context) (*ViewTableRow, int, error)
QueryViewTotals(ViewQueryRequest, context.Context) (*ViewTotals, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

Comment on lines +175 to +177
if cloudCost.Properties != nil {
labels = cloudCost.Properties.Labels
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should cloudCost.Properties.Labels be full copied here instead of just pointer copied?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is being pulled for binary for this purpose only so a full copy just seemed like an unnecessary memory bump

@Sean-Holcomb Sean-Holcomb merged commit 5aa8317 into develop Dec 8, 2023
5 checks passed
Copy link

sonarcloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants