diff --git a/.changeset/red-baboons-rhyme.md b/.changeset/red-baboons-rhyme.md new file mode 100644 index 0000000000..dcf924e912 --- /dev/null +++ b/.changeset/red-baboons-rhyme.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Enable catalog table actions for all location types. + +The edit button has had support for other providers for a while and there is +no specific reason the View in GitHub cannot work for all locations. This +change also replaces the GitHub icon with the OpenInNew icon. diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 15a220e839..684e0e3916 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -17,7 +17,7 @@ import { Entity } from '@backstage/catalog-model'; import { Table, TableColumn, TableProps } from '@backstage/core'; import { Chip, Link } from '@material-ui/core'; import Edit from '@material-ui/icons/Edit'; -import GitHub from '@material-ui/icons/GitHub'; +import OpenInNew from '@material-ui/icons/OpenInNew'; import { Alert } from '@material-ui/lab'; import React from 'react'; import { generatePath, Link as RouterLink } from 'react-router-dom'; @@ -111,13 +111,12 @@ export const CatalogTable = ({ (rowData: Entity) => { const location = findLocationForEntityMeta(rowData.metadata); return { - icon: () => , - tooltip: 'View on GitHub', + icon: () => , + tooltip: 'View', onClick: () => { if (!location) return; window.open(location.target, '_blank'); }, - hidden: location?.type !== 'github', }; }, (rowData: Entity) => { @@ -129,7 +128,6 @@ export const CatalogTable = ({ if (!location) return; window.open(createEditLink(location), '_blank'); }, - hidden: location?.type !== 'github', }; }, (rowData: Entity) => {