-
Notifications
You must be signed in to change notification settings - Fork 86
fix(scorecard): Scorecard aggregated metrics UI integration #2035
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
fix(scorecard): Scorecard aggregated metrics UI integration #2035
Conversation
Changed Packages
|
9d3db55 to
e18a77f
Compare
109e64e to
01b7ba1
Compare
workspaces/scorecard/plugins/scorecard/src/components/Common/PermissionRequiredState.tsx
Outdated
Show resolved
Hide resolved
...scorecard/plugins/scorecard/src/components/Common/__tests__/PermissionRequiredState.test.tsx
Outdated
Show resolved
Hide resolved
01b7ba1 to
e12e897
Compare
|
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 |
There was a problem hiding this 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:

Translations worked fine for me.


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:

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".
...s/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/ResponsivePieChart.tsx
Show resolved
Hide resolved
|
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. |
My understanding is that the interface should dynamically hide the card for any user who lacks authorized access to the related catalog entities. |
Co-authored-by: HusneShabbir <husneshabbir447@gmail.com>
e12e897 to
c0f32eb
Compare
|
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 |
Hi @ShiranHi, the homepage doesn't support this. We have a feature for the homepage to add RBAC checks to it. We will have that with the next release. |
…log links) Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
christoph-jerolimov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Eswaraiahsapram. This looks good to me 👍
| Component: ScorecardHomepageCard as ComponentType, | ||
| config: { | ||
| layouts: { | ||
| xl: { w: 12, h: 6 }, | ||
| lg: { w: 12, h: 6 }, | ||
| md: { w: 12, h: 7 }, | ||
| sm: { w: 12, h: 8 }, | ||
| xs: { w: 12, h: 9 }, | ||
| xxs: { w: 12, h: 10 }, | ||
| id: 'scorecard-jira-homepage-section', | ||
| props: { | ||
| metricId: 'jira.open_issues', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better 👍 😄
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
|




Hey, I just made a Pull Request!
Fixes:
Description
rechartspie chartScreen Recording
Screen.Recording.2026-01-12.at.4.41.35.PM.mov
✔️ Checklist