Skip to content

Commit 99aa8ff

Browse files
rohitratannagarHusneShabbir
andauthored
feat(scorecard): add support for the New Frontend System (NFS) (#2487)
* Adding NFS support in scorecard Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * updating yarn.lock Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * fixing for prettier Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * adding changeset and fixing the bug Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * fixing yarn.lock Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * updating readme.md documentation and naming of the apps Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> Made-with: Cursor * chore(scorecard): update yarn.lock to fix CI immutable install Made-with: Cursor * chore(scorecard-common): align API report with CI Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * fixing report Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * Passing allowedKinds from app-config Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * chore(scorecard): regenerate API reports for scorecard-common and scorecard Made-with: Cursor * refactoring dev workspace Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> Made-with: Cursor * Adding config for NFS Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> * fix(scorecard): e2e testDir and add missing localeSkip util - Point playwright testDir to packages/app-legacy/e2e-tests (tests live there) - Add utils/localeSkip.ts for skipIfLocales used by scorecard.test.ts Fixes 'No tests found' and 'Cannot find module ./utils/localeSkip' when running yarn playwright test on top of pr/rohitratannagar/2487. Made-with: Cursor --------- Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com> Co-authored-by: HusneShabbir <husneshabbir447@gmail.com>
1 parent 3a17273 commit 99aa8ff

57 files changed

Lines changed: 3418 additions & 1727 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-scorecard': minor
3+
---
4+
5+
Added support for the New Frontend System (NFS), including an alpha export for NFS apps and a new `app-next` package.

workspaces/scorecard/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ dist-types
33
coverage
44
.vscode
55
.eslintrc.js
6+
report-alpha.api.md
7+
report.api.md

workspaces/scorecard/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# [Backstage](https://backstage.io)
1+
# [Backstage](https://backstage.io) — Scorecard
22

3-
This is your newly scaffolded Backstage App, Good Luck!
3+
This workspace contains the Scorecard plugin and a Backstage example app. The frontend is available in two packages: **app** (New Frontend System / NFS) and **app-legacy** (legacy frontend).
44

5-
To start the app, run:
5+
## Getting started
66

77
```sh
88
yarn install
9-
yarn start
109
```
1110

12-
> Notice: The guest user has admin permissions in this application for quick setup. For better control, specify more users and groups in app-config.local.yaml and define a separate admin/admins permission instead of using the guest user. Using the guest user as an admin is not recommended for permission management.
11+
- **app (NFS, default):** Run `yarn start` to start the NFS app and backend. Open [http://localhost:3000](http://localhost:3000), then go to Catalog and open an entity to use the Scorecard tab.
12+
- **app-legacy:** Run `yarn start:legacy` to start the legacy frontend with the backend. Use the Scorecard tab on entity pages or the scorecard homepage card.
13+
14+
> **Notice:** The guest user has admin permissions in this application for quick setup. For better control, specify more users and groups in `app-config.local.yaml` and define a separate admin/admins permission instead of using the guest user. Using the guest user as admin is not recommended for permission management.

workspaces/scorecard/app-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
app:
22
title: Scaffolded Backstage App
33
baseUrl: http://localhost:3000
4+
packages: all
5+
extensions:
6+
- api:app/app-language:
7+
config:
8+
availableLanguages: ['en', 'de', 'fr']
9+
defaultLanguage: 'en'
410

11+
# Scorecard tab: entity shows tab if it matches any filter below.
12+
- entity-content:catalog/entity-content-scorecard:
13+
config:
14+
allowedFilters:
15+
- kind: component # e.g. Component with spec.type: website
16+
type: website
17+
- kind: api # e.g. any API entity
18+
- type: service # e.g. Component or System with spec.type: service
519
organization:
620
name: My Company
721

workspaces/scorecard/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"scripts": {
99
"start": "backstage-cli repo start",
10+
"start:legacy": "backstage-cli repo start packages/app-legacy packages/backend",
1011
"start-backend": "yarn workspace backend start",
1112
"tsc": "tsc",
1213
"tsc:full": "tsc --skipLibCheck true --incremental false",
@@ -65,5 +66,8 @@
6566
"*.{json,md}": [
6667
"prettier --write"
6768
]
69+
},
70+
"dependencies": {
71+
"changeset": "^0.2.6"
6872
}
6973
}
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);

workspaces/scorecard/packages/app/e2e-tests/pages/CatalogPage.ts renamed to workspaces/scorecard/packages/app-legacy/e2e-tests/pages/CatalogPage.ts

File renamed without changes.

workspaces/scorecard/packages/app/e2e-tests/pages/HomePage.ts renamed to workspaces/scorecard/packages/app-legacy/e2e-tests/pages/HomePage.ts

File renamed without changes.

workspaces/scorecard/packages/app/e2e-tests/pages/ScorecardPage.ts renamed to workspaces/scorecard/packages/app-legacy/e2e-tests/pages/ScorecardPage.ts

File renamed without changes.

0 commit comments

Comments
 (0)