Skip to content

Commit

Permalink
Improve extensibility (#122)
Browse files Browse the repository at this point in the history
* Add ability to replace the % sign in chips

* Add ability to specify reviewer entity ref

* Add title prop to ScoreCardTable for extensibility

* Add new prop scoreLabel to override chip labels on score tables

Add podcast system scores as an example

* Add changeset info

* Remove unused import

* Update plugins/score-card/src/components/ScoreCard/columns/areaColumn.tsx

Signed-off-by: T0RAT0RA <[email protected]>
  • Loading branch information
T0RAT0RA authored Dec 5, 2022
1 parent d0e7f45 commit 12cb1f1
Show file tree
Hide file tree
Showing 12 changed files with 757 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-seas-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@oriflame/backstage-plugin-score-card': patch
---

Improve extensibility by adding `scoreLabel`, to override `scorePercent` and adding a `title` prop to ScoreCardTable component
2 changes: 1 addition & 1 deletion packages/app/cypress/integration/scoreboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('score-card', () => {

cy.contains('System scores overview').should('be.visible');
cy.checkForErrors();
cy.get('span:contains("1-2 of 2")').should('be.visible'); // beware, there is also a hidden <P/> element
cy.get('span:contains("1-3 of 3")').should('be.visible'); // beware, there is also a hidden <P/> element
cy.contains('audio-playback').should('be.visible');
cy.contains('team-c').should('be.visible');
cy.contains('non-valid-system').should('be.visible');
Expand Down
316 changes: 316 additions & 0 deletions plugins/score-card/sample-data/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,5 +315,321 @@
]
}
]
},
{
"systemEntityName": "podcast",
"systemTier": "A",
"SystemDataConfidentiality": "Confidential",
"SystemDataSensitivity": ["PII", "Sensitive-PII"],
"generatedDateTimeUtc": "2021-07-22 10:00",
"scorePercent": 57,
"scoreLabel": "C",
"scoreSuccess": "partial",
"scoringReviewer": "Guest",
"scoringReviewDate": "2022-01-04T08:00:00Z",
"areaScores": [
{
"id": 2199,
"title": "Code",
"scorePercent": 90,
"scoreLabel": "A",
"scoreSuccess": "success",
"scoreEntries": [
{
"id": 2157,
"title": "GitFlow",
"scorePercent": 100,
"scoreLabel": "A",
"scoreSuccess": "success",
"scoreHints": "Gitflow: 100%",
"details": "..."
},
{
"id": 2159,
"title": "Identity Management",
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2163,
"title": "Swagger",
"scoreSuccess": "unknown",
"isOptional": true,
"details": "..."
},
{
"id": 2158,
"title": "Https",
"scoreSuccess": "unknown",
"isOptional": true,
"details": "..."
},
{
"id": 2153,
"title": "Application Insights",
"scorePercent": 80,
"scoreLabel": "B",
"scoreSuccess": ["AppInsights configured", "Dashboard present"],
"details": "Lorem ipsum for **AppInsights** sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. In laoreet, magna id viverra tincidunt, sem odio bibendum justo, vel imperdiet sapien wisi sed libero. Nullam at arcu a est sollicitudin euismod. Aliquam id dolor. Fusce nibh. Duis sapien nunc, commodo et, interdum suscipit, sollicitudin et, dolor. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris elementum mauris vitae tortor. Maecenas libero. Duis pulvinar. Pellentesque pretium lectus id turpis. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Etiam commodo dui eget wisi. Nunc dapibus tortor vel mi dapibus sollicitudin. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Duis risus."
}
]
},
{
"id": 3937,
"title": "Documentation",
"scorePercent": 75,
"scoreLabel": "B+",
"scoreSuccess": "almost-success",
"scoreEntries": [
{
"id": 3938,
"title": "Project introduction",
"scorePercent": 100,
"scoreSuccess": "success",
"scoreHints": "Well structured/documented/linked with the wiki: 100%",
"details": "Project home page is linked to **devops wiki**."
},
{
"id": 3940,
"title": "Project wiki",
"isOptional": false,
"scorePercent": 50,
"scoreSuccess": "partial",
"scoreHints": "Somewhat usefull: 50%",
"details": "Project wiki contains basic information however it is not well structured. It contains brief introduction and few pages about the technology used, but it is missing business context, processes description etc."
},
{
"id": 2207,
"title": "README",
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2170,
"title": "RFP",
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2164,
"title": "Architecture Diagrams",
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2205,
"title": "SLA",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2165,
"title": "Business Documentation",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2171,
"title": "Road Map",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
}
]
},
{
"id": 2208,
"title": "Operations",
"scorePercent": 50,
"scoreLabel": "D",
"scoreSuccess": "partial",
"scoreEntries": [
{
"id": 2210,
"title": "Health Checks",
"scorePercent": 0,
"scoreSuccess": "failure",
"details": "Completelly missing healthchecks."
},
{
"id": 2185,
"title": "Semantic Versioning",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2176,
"title": "CI Pipelines",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2175,
"title": "CD Pipelines",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2181,
"title": "Insights Dashboard",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2173,
"title": "Alerts",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2184,
"title": "Release-Notes",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2183,
"title": "Release-Annotations-to-App-Insights",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2178,
"title": "DNS Record",
"isOptional": true,
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2180,
"title": "GitOps",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2177,
"title": "Canary-Checks",
"isOptional": true,
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "...depends on tier/SLA..."
},
{
"id": 2172,
"title": "AB Testing",
"isOptional": true,
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 3941,
"title": "Disaster Recovery Plan",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2179,
"title": "Data Refresh For Testing Environments",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2174,
"title": "Basic Ops Handed Over to L2",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
}
]
},
{
"id": 4333,
"title": "Quality",
"scorePercent": 25,
"scoreLabel": "F",
"scoreSuccess": "almost-failure",
"scoreEntries": [
{
"id": 2187,
"title": "Code Reviews",
"scorePercent": 100,
"scoreSuccess": "success",
"scoreHints": [
"PR requires reviewer",
"No override possible",
"PRs are well described",
"PRs are small",
"PRs has comments"
],
"details": "Development policy is defined. Code review process is done during the pull request with minimum of 2 reviewers."
},
{
"id": 2191,
"title": "Unit Tests",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2189,
"title": "Integration Tests",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2190,
"title": "Performance Tests",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2186,
"title": "Automation Tests",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
},
{
"id": 2188,
"title": "Design Reviews",
"scorePercent": 0,
"scoreSuccess": "unknown",
"details": "..."
}
]
},
{
"id": 4328,
"title": "Security",
"scorePercent": 10,
"scoreLabel": "F",
"scoreSuccess": "failure",
"scoreEntries": [
{
"id": 2158,
"title": "Https",
"scorePercent": 0,
"scoreSuccess": "failure",
"details": "At least one endpoint accessible without SSL protection"
}
]
}
]
}
]
Loading

0 comments on commit 12cb1f1

Please sign in to comment.