From 832eef72485bf971cab75b9f9141829fdf079ba8 Mon Sep 17 00:00:00 2001 From: tperehinets Date: Tue, 15 Aug 2023 18:01:47 +0300 Subject: [PATCH 1/4] Added title to props for HasCards. Signed-off-by: tperehinets --- .changeset/chilly-parrots-yell.md | 5 +++++ .../components/HasComponentsCard/HasComponentsCard.tsx | 4 ++-- .../src/components/HasResourcesCard/HasResourcesCard.tsx | 4 ++-- .../HasSubcomponentsCard/HasSubcomponentsCard.tsx | 8 ++++++-- .../src/components/HasSystemsCard/HasSystemsCard.tsx | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 .changeset/chilly-parrots-yell.md diff --git a/.changeset/chilly-parrots-yell.md b/.changeset/chilly-parrots-yell.md new file mode 100644 index 0000000000..fe4c760923 --- /dev/null +++ b/.changeset/chilly-parrots-yell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Added title to props for `HasCards`. diff --git a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx index 9654152a5c..e1f25b6835 100644 --- a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx +++ b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx @@ -30,11 +30,11 @@ export interface HasComponentsCardProps { } export function HasComponentsCard(props: HasComponentsCardProps) { - const { variant = 'gridItem' } = props; + const { variant = 'gridItem', title = 'Has components' } = props; return ( Date: Tue, 15 Aug 2023 18:12:59 +0300 Subject: [PATCH 2/4] added props Signed-off-by: tperehinets --- .../src/components/HasComponentsCard/HasComponentsCard.tsx | 1 + .../catalog/src/components/HasResourcesCard/HasResourcesCard.tsx | 1 + .../src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx | 1 + plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx | 1 + 4 files changed, 4 insertions(+) diff --git a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx index e1f25b6835..9071dac030 100644 --- a/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx +++ b/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx @@ -27,6 +27,7 @@ import { /** @public */ export interface HasComponentsCardProps { variant?: InfoCardVariants; + title?: string; } export function HasComponentsCard(props: HasComponentsCardProps) { diff --git a/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx b/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx index 9cbcec9719..5af7eec258 100644 --- a/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx +++ b/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx @@ -27,6 +27,7 @@ import { /** @public */ export interface HasResourcesCardProps { variant?: InfoCardVariants; + title?: string; } export function HasResourcesCard(props: HasResourcesCardProps) { diff --git a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx index 588cb153ab..ac40c82435 100644 --- a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx +++ b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx @@ -27,6 +27,7 @@ import { export interface HasSubcomponentsCardProps { variant?: InfoCardVariants; tableOptions?: TableOptions; + title?: string; } export function HasSubcomponentsCard(props: HasSubcomponentsCardProps) { diff --git a/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx b/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx index e8d4f4b210..d6da465ffa 100644 --- a/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx +++ b/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx @@ -27,6 +27,7 @@ import { /** @public */ export interface HasSystemsCardProps { variant?: InfoCardVariants; + title?: string; } export function HasSystemsCard(props: HasSystemsCardProps) { From 986ff20cc81fe9c90f91473426e352264ac92a05 Mon Sep 17 00:00:00 2001 From: tperehinets Date: Wed, 16 Aug 2023 14:54:11 +0300 Subject: [PATCH 3/4] Updated documentation Signed-off-by: tperehinets --- plugins/catalog/api-report.md | 8 ++++++++ plugins/scaffolder-backend-module-gitlab/api-report.md | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 3e33b16d8b..4fd49e147a 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -445,6 +445,8 @@ export function hasCatalogProcessingErrors( // @public (undocumented) export interface HasComponentsCardProps { + // (undocumented) + title?: string; // (undocumented) variant?: InfoCardVariants; } @@ -462,6 +464,8 @@ export function hasRelationWarnings( // @public (undocumented) export interface HasResourcesCardProps { + // (undocumented) + title?: string; // (undocumented) variant?: InfoCardVariants; } @@ -471,11 +475,15 @@ export interface HasSubcomponentsCardProps { // (undocumented) tableOptions?: TableOptions; // (undocumented) + title?: string; + // (undocumented) variant?: InfoCardVariants; } // @public (undocumented) export interface HasSystemsCardProps { + // (undocumented) + title?: string; // (undocumented) variant?: InfoCardVariants; } diff --git a/plugins/scaffolder-backend-module-gitlab/api-report.md b/plugins/scaffolder-backend-module-gitlab/api-report.md index eccada5d51..f7cf6024ec 100644 --- a/plugins/scaffolder-backend-module-gitlab/api-report.md +++ b/plugins/scaffolder-backend-module-gitlab/api-report.md @@ -26,8 +26,8 @@ export const createGitlabProjectAccessTokenAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction< { - repoUrl: string; projectId: string | number; + repoUrl: string; token?: string | undefined; name?: string | undefined; accessLevel?: number | undefined; @@ -44,8 +44,8 @@ export const createGitlabProjectDeployTokenAction: (options: { }) => TemplateAction< { name: string; - repoUrl: string; projectId: string | number; + repoUrl: string; token?: string | undefined; username?: string | undefined; scopes?: string[] | undefined; @@ -63,8 +63,8 @@ export const createGitlabProjectVariableAction: (options: { { key: string; value: string; - repoUrl: string; projectId: string | number; + repoUrl: string; variableType: string; token?: string | undefined; variableProtected?: boolean | undefined; From 0778a40940ff529f73d9e6ca74dbf83001ebba97 Mon Sep 17 00:00:00 2001 From: tperehinets Date: Wed, 16 Aug 2023 15:15:33 +0300 Subject: [PATCH 4/4] Updated more documentation. Signed-off-by: tperehinets --- plugins/scaffolder-backend-module-gitlab/api-report.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/api-report.md b/plugins/scaffolder-backend-module-gitlab/api-report.md index f7cf6024ec..eccada5d51 100644 --- a/plugins/scaffolder-backend-module-gitlab/api-report.md +++ b/plugins/scaffolder-backend-module-gitlab/api-report.md @@ -26,8 +26,8 @@ export const createGitlabProjectAccessTokenAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction< { - projectId: string | number; repoUrl: string; + projectId: string | number; token?: string | undefined; name?: string | undefined; accessLevel?: number | undefined; @@ -44,8 +44,8 @@ export const createGitlabProjectDeployTokenAction: (options: { }) => TemplateAction< { name: string; - projectId: string | number; repoUrl: string; + projectId: string | number; token?: string | undefined; username?: string | undefined; scopes?: string[] | undefined; @@ -63,8 +63,8 @@ export const createGitlabProjectVariableAction: (options: { { key: string; value: string; - projectId: string | number; repoUrl: string; + projectId: string | number; variableType: string; token?: string | undefined; variableProtected?: boolean | undefined;