Skip to content

Conversation

@Eswaraiahsapram
Copy link
Member

@Eswaraiahsapram Eswaraiahsapram commented Jan 12, 2026

Hey, I just made a Pull Request!

Fixes:

  1. https://issues.redhat.com/browse/RHIDP-11157
  2. https://issues.redhat.com/browse/RHIDP-10985

Description

  • Integrated Backend Aggregated metrics API with Frontend
  • In the existing entity scorecard component, we started using recharts pie chart
  • Added Missing permission for Aggregated metrics

Screen Recording

Screen.Recording.2026-01-12.at.4.41.35.PM.mov

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Jan 12, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/scorecard/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard workspaces/scorecard/plugins/scorecard patch v2.2.0

@Eswaraiahsapram Eswaraiahsapram force-pushed the scorecard-aggregated-metrics-ui-integration branch from 9d3db55 to e18a77f Compare January 12, 2026 11:02
@Eswaraiahsapram Eswaraiahsapram force-pushed the scorecard-aggregated-metrics-ui-integration branch 2 times, most recently from 109e64e to 01b7ba1 Compare January 13, 2026 06:07
@Eswaraiahsapram Eswaraiahsapram force-pushed the scorecard-aggregated-metrics-ui-integration branch from 01b7ba1 to e12e897 Compare January 13, 2026 13:22
@dzemanov
Copy link
Member

Hmm, I noticed it just now when viewing the frontend code, why are we returning array from aggregations if it is always just 1 element in it with that concrete metric? cc @imykhno :D

Copy link
Member

@dzemanov dzemanov left a comment

Choose a reason for hiding this comment

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

I tested the PR with postgres and sqlite.

Screen.Recording.2026-01-14.at.15.14.22.mov

I was able to get Missing permission when all permissions missing or only for some scorecards with conditional permission, like here:
Screenshot 2026-01-14 at 15 25 10

Translations worked fine for me.
Screenshot 2026-01-14 at 14 59 12
Screenshot 2026-01-14 at 14 52 59

When there is error in thresholds or in fetching metric, backend doesn't return the entity's result in response, this could be confusing to users if they own more entities but we return smaller total with no information that other entities had problems. When all entities have errors, backend returns [] and it leaves these empty spaces:
Screenshot 2026-01-14 at 15 18 07

When there are no entities owned by user, backend also returns []. Maybe it would be good to return response also for 0 entities from backend, at least with metric metadata so it can be shown with 0 entities? If all entities have errors, it could help frontend if we return response with "status": "error".

@imykhno
Copy link
Contributor

imykhno commented Jan 15, 2026

I’ve tested the same scenarios locally as Dominika and observed the same results. However, when a user does not have access to the catalogue, the error shown in the screenshot below is displayed. Is this the expected behavior?

Screenshot 2026-01-14 at 16 53 17

@imykhno
Copy link
Contributor

imykhno commented Jan 15, 2026

One more point regarding SonarQube. I think it would be great if we could resolve or at least minimize the issues highlighted in the report.

@ShiranHi
Copy link

I’ve tested the same scenarios locally as Dominika and observed the same results. However, when a user does not have access to the catalogue, the error shown in the screenshot below is displayed. Is this the expected behavior?

My understanding is that the interface should dynamically hide the card for any user who lacks authorized access to the related catalog entities.

@Eswaraiahsapram Eswaraiahsapram force-pushed the scorecard-aggregated-metrics-ui-integration branch from e12e897 to c0f32eb Compare January 16, 2026 01:02
@Eswaraiahsapram
Copy link
Member Author

Thanks @christoph-jerolimov , @dzemanov , @imykhno for reviewing the PR. I addressed the review comments. PTAL

Screen.Recording.2026-01-16.at.6.33.54.AM.mov

@sonarqubecloud
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants