diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index 3c8f836aed..8ec4813799 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -70,14 +70,14 @@ The value of this annotation is a location reference string (see above). If this annotation is specified, it is expected to point to a repository that the TechDocs system can read and generate docs from. -### backstage.io/browser-view-url, backstage.io/browser-edit-url +### backstage.io/view-url, backstage.io/edit-url ```yaml # Example: metadata: annotations: - backstage.io/browser-view-url: https://some.website/catalog-info.yaml - backstage.io/browser-edit-url: https://github.com/my-org/catalog/edit/master/my-service.jsonnet + backstage.io/view-url: https://some.website/catalog-info.yaml + backstage.io/edit-url: https://github.com/my-org/catalog/edit/master/my-service.jsonnet ``` These annotations allow customising links from the catalog pages. The view URL diff --git a/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx b/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx index e99ec056d2..393f3f2576 100644 --- a/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx @@ -135,7 +135,7 @@ describe(' custom links', () => { annotations: { 'backstage.io/managed-by-location': 'bitbucket:https://bitbucket.org/backstage/backstage/src/master/software.yaml', - 'backstage.io/browser-edit-url': 'https://another.place', + 'backstage.io/edit-url': 'https://another.place', [SOURCE_LOCATION_ANNOTATION]: 'url:https://another.place/backstage.git', }, diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx index 5cb776746d..b77dd2b8a0 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx @@ -86,7 +86,7 @@ describe('CatalogTable component', () => { kind: 'Component', metadata: { name: 'component1', - annotations: { 'backstage.io/browser-edit-url': 'https://other.place' }, + annotations: { 'backstage.io/edit-url': 'https://other.place' }, }, }; @@ -115,7 +115,7 @@ describe('CatalogTable component', () => { kind: 'Component', metadata: { name: 'component1', - annotations: { 'backstage.io/browser-view-url': 'https://other.place' }, + annotations: { 'backstage.io/view-url': 'https://other.place' }, }, }; diff --git a/plugins/catalog/src/components/actions.ts b/plugins/catalog/src/components/actions.ts index 10ee9f38a4..c7fbfac8e2 100644 --- a/plugins/catalog/src/components/actions.ts +++ b/plugins/catalog/src/components/actions.ts @@ -82,7 +82,7 @@ export const findEditUrl = ( ): string | undefined => { const annotations = metadata.annotations || {}; - const editUrl = annotations['backstage.io/browser-edit-url']; + const editUrl = annotations['backstage.io/edit-url']; if (editUrl) return editUrl; @@ -95,5 +95,5 @@ export const findViewUrl = ( ): string | undefined => { const annotations = metadata.annotations || {}; - return annotations['backstage.io/browser-view-url'] || location?.target; + return annotations['backstage.io/view-url'] || location?.target; };