From 21f409d7768714ce4e09e218b1a393482f68d8b3 Mon Sep 17 00:00:00 2001 From: Rbillon59 Date: Mon, 18 Sep 2023 14:37:51 +0200 Subject: [PATCH 1/2] feat: Export ScorecardInfo and ScorecardsList Components to be able to use manually queried CheckResults directly. Signed-off-by: Rbillon59 --- .changeset/twenty-bags-sin.md | 5 +++++ plugins/tech-insights/api-report.md | 12 ++++++++++++ plugins/tech-insights/src/index.ts | 2 ++ plugins/tech-insights/src/plugin.ts | 24 ++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 .changeset/twenty-bags-sin.md diff --git a/.changeset/twenty-bags-sin.md b/.changeset/twenty-bags-sin.md new file mode 100644 index 0000000000..5eb455f20e --- /dev/null +++ b/.changeset/twenty-bags-sin.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights': patch +--- + +Export ScorecardInfo and ScorecardsList Components to be able to use manually queried CheckResults directly. diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index 14fe512ba0..b641ae728e 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -68,6 +68,18 @@ export interface InsightFacts { // @public export const jsonRulesEngineCheckResultRenderer: CheckResultRenderer; +// @public (undocumented) +export const ScorecardInfo: (props: { + checkResults: CheckResult[]; + title: string; + description?: string | undefined; +}) => JSX_2.Element; + +// @public (undocumented) +export const ScorecardsList: (props: { + checkResults: CheckResult[]; +}) => JSX_2.Element; + // @public export interface TechInsightsApi { // (undocumented) diff --git a/plugins/tech-insights/src/index.ts b/plugins/tech-insights/src/index.ts index 9e075df038..e7659e39d4 100644 --- a/plugins/tech-insights/src/index.ts +++ b/plugins/tech-insights/src/index.ts @@ -17,6 +17,8 @@ export { techInsightsPlugin, EntityTechInsightsScorecardContent, EntityTechInsightsScorecardCard, + ScorecardInfo, + ScorecardsList, } from './plugin'; export { techInsightsApiRef, TechInsightsClient } from './api'; diff --git a/plugins/tech-insights/src/plugin.ts b/plugins/tech-insights/src/plugin.ts index 961519cd97..412d2a0a1d 100644 --- a/plugins/tech-insights/src/plugin.ts +++ b/plugins/tech-insights/src/plugin.ts @@ -42,6 +42,30 @@ export const techInsightsPlugin = createPlugin({ }, }); +/** + * @public + */ +export const ScorecardInfo = techInsightsPlugin.provide( + createRoutableExtension({ + name: 'ScorecardInfo', + component: () => + import('./components/ScorecardsInfo').then(m => m.ScorecardInfo), + mountPoint: rootRouteRef, + }), +); + +/** + * @public + */ +export const ScorecardsList = techInsightsPlugin.provide( + createRoutableExtension({ + name: 'ScorecardsList', + component: () => + import('./components/ScorecardsList').then(m => m.ScorecardsList), + mountPoint: rootRouteRef, + }), +); + /** * @public */ From 10a0d818da44e8cdbb24da12a49301569b2b0432 Mon Sep 17 00:00:00 2001 From: Romain Billon Date: Tue, 26 Sep 2023 09:08:02 +0200 Subject: [PATCH 2/2] Update .changeset/twenty-bags-sin.md Co-authored-by: Vincenzo Scamporlino Signed-off-by: Romain Billon --- .changeset/twenty-bags-sin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/twenty-bags-sin.md b/.changeset/twenty-bags-sin.md index 5eb455f20e..797fd5bfef 100644 --- a/.changeset/twenty-bags-sin.md +++ b/.changeset/twenty-bags-sin.md @@ -2,4 +2,4 @@ '@backstage/plugin-tech-insights': patch --- -Export ScorecardInfo and ScorecardsList Components to be able to use manually queried CheckResults directly. +Export `ScorecardInfo` and `ScorecardsList` components to be able to use manually queried check results directly.