-
Notifications
You must be signed in to change notification settings - Fork 96
feat(scorecard): add entities page for drilling down aggregated KPIs #2509
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
Merged
christoph-jerolimov
merged 14 commits into
redhat-developer:main
from
Eswaraiahsapram:feat/scorecard-entities-page-ui
Mar 26, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d6dcfce
feat(scorecard): add entities page for drilling down aggregated KPIs
Eswaraiahsapram 62fd659
fix(scorecard): improve e2e tests - ARIA snapshots, POM, translations…
HusneShabbir 9754489
add metric notfound screen
Eswaraiahsapram cc51acd
address review comment
Eswaraiahsapram 1d14240
add correct timestamp for last updated fields
Eswaraiahsapram 259e71f
fix api reports
Eswaraiahsapram c23162c
fix api reports
Eswaraiahsapram e17e9c8
fix: update scorecard plugin API report to match CI-generated output
Eswaraiahsapram f99efc6
fix api report
Eswaraiahsapram 3f884cd
fix api report
Eswaraiahsapram 6295e23
chore(scorecard): refresh API reports for plugin-scorecard (#6)
HusneShabbir b2e5211
fix dev legacy file
Eswaraiahsapram 42ebddf
Merge branch 'main' into feat/scorecard-entities-page-ui
Eswaraiahsapram 1a44446
Merge branch 'main' into feat/scorecard-entities-page-ui
Eswaraiahsapram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@red-hat-developer-hub/backstage-plugin-scorecard': minor | ||
| --- | ||
|
|
||
| Adds a Scorecard Entities page that allows users to drill down from aggregated scorecard KPIs to view the individual entities contributing to the overall score. The page displays entity-level metric values and status, enabling users to identify services impacting the metric and investigate issues more effectively. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
workspaces/scorecard/plugins/scorecard/__fixtures__/aggregatedScorecardEntitiesData.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { subMinutes, subHours, subDays } from 'date-fns'; | ||
|
|
||
| export const mockAggregatedScorecardEntitiesData = ( | ||
| metricId: string, | ||
| page: number, | ||
| pageSize: number, | ||
| ) => { | ||
| const now = new Date(); | ||
|
|
||
| return { | ||
| metricId, | ||
| metricMetadata: { | ||
| title: 'Example Metric', | ||
| description: 'Example Metric Description', | ||
| type: 'number', | ||
| }, | ||
| entities: [ | ||
| // 1 minute ago | ||
| { | ||
| entityRef: 'component:default/service-one-minute', | ||
| entityName: 'service-one-minute', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 5, | ||
| timestamp: now.toISOString(), | ||
| status: 'success', | ||
| }, | ||
|
|
||
| // 15 minutes ago | ||
| { | ||
| entityRef: 'component:default/service-fifteen-minutes', | ||
| entityName: 'service-fifteen-minutes', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 10, | ||
| timestamp: subMinutes(now, 15).toISOString(), | ||
| status: 'success', | ||
| }, | ||
|
|
||
| // 1 hour ago | ||
| { | ||
| entityRef: 'component:default/service-one-hour', | ||
| entityName: 'service-one-hour', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 30, | ||
| timestamp: subHours(now, 1).toISOString(), | ||
| status: 'warning', | ||
| }, | ||
|
|
||
| // 5 hours ago | ||
| { | ||
| entityRef: 'component:default/service-five-hours', | ||
| entityName: 'service-five-hours', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 50, | ||
| timestamp: subHours(now, 5).toISOString(), | ||
| status: 'error', | ||
| }, | ||
|
|
||
| // Yesterday | ||
| { | ||
| entityRef: 'component:default/service-yesterday', | ||
| entityName: 'service-yesterday', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 30, | ||
| timestamp: subDays(now, 1).toISOString(), | ||
| status: 'error', | ||
| }, | ||
|
|
||
| // 3 days ago | ||
| { | ||
| entityRef: 'component:default/service-three-days', | ||
| entityName: 'service-three-days', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 40, | ||
| timestamp: subDays(now, 3).toISOString(), | ||
| status: 'success', | ||
| }, | ||
|
|
||
| // 7+ days ago → formatted date | ||
| { | ||
| entityRef: 'component:default/service-old', | ||
| entityName: 'service-old', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 50, | ||
| timestamp: subDays(now, 10).toISOString(), | ||
| status: 'error', | ||
| }, | ||
|
|
||
| // Invalid timestamp | ||
| { | ||
| entityRef: 'component:default/service-invalid', | ||
| entityName: 'service-invalid', | ||
| entityNamespace: 'default', | ||
| entityKind: 'Component', | ||
| owner: 'group:default/platform', | ||
| metricValue: 0, | ||
| timestamp: 'invalid-date', | ||
| status: 'error', | ||
| }, | ||
| ], | ||
| pagination: { | ||
| page, | ||
| pageSize, | ||
| total: 8, | ||
| totalPages: 1, | ||
| isCapped: false, | ||
| }, | ||
| }; | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What a11y issue is here ignored? @HusneShabbir
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.
@Eswaraiahsapram @christoph-jerolimov the axe check fails on button-name: two MUI IconButtons (likely under tooltips, data-mui-internal-clone-element) have no accessible name—no visible text, aria-label, title, etc. Fix: add aria-label (or aria-labelledby) on those icon buttons in the scorecard UI; tooltip text alone doesn’t satisfy the rule.