diff --git a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx index ef72f79c8a..4d78542e60 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx +++ b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx @@ -20,7 +20,15 @@ import { Chip, Typography } from '@material-ui/core'; import React from 'react'; import { catalogImportApiRef } from '../../api'; -export const ImportInfoCard = () => { +type Props = { + exampleLocationUrl?: string; + exampleRepositoryUrl?: string; +}; + +export const ImportInfoCard = ({ + exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', + exampleRepositoryUrl = 'https://github.com/backstage/backstage', +}: Props) => { const configApi = useApi(configApiRef); const appTitle = configApi.getOptional('app.title') || 'Backstage'; const catalogImportApi = useApi(catalogImportApiRef); @@ -45,10 +53,7 @@ export const ImportInfoCard = () => { Link to an existing entity file - Example:{' '} - - https://github.com/backstage/backstage/blob/master/catalog-info.yaml - + Example: {exampleLocationUrl} The wizard analyzes the file, previews the entities, and adds them to @@ -61,7 +66,7 @@ export const ImportInfoCard = () => { - Example: https://github.com/backstage/backstage + Example: {exampleRepositoryUrl} The wizard discovers all {catalogFilename} files in the diff --git a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx index 63f3c10fe3..83377d6b2f 100644 --- a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx +++ b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx @@ -36,6 +36,7 @@ type Props = { ) => void; disablePullRequest?: boolean; analysisUrl?: string; + exampleLocationUrl?: string; }; /** @@ -49,6 +50,7 @@ export const StepInitAnalyzeUrl = ({ onAnalysis, analysisUrl = '', disablePullRequest = false, + exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml', }: Props) => { const errorApi = useApi(errorApiRef); const catalogImportApi = useApi(catalogImportApiRef); @@ -138,7 +140,7 @@ export const StepInitAnalyzeUrl = ({ fullWidth id="url" label="Repository URL" - placeholder="https://github.com/backstage/backstage/blob/master/catalog-info.yaml" + placeholder={exampleLocationUrl} helperText="Enter the full path to your entity file to start tracking your component" margin="normal" variant="outlined"