Rename view/edit annotations
This commit is contained in:
@@ -135,7 +135,7 @@ describe('<AboutCard /> 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',
|
||||
},
|
||||
|
||||
@@ -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' },
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user