[] = [
),
},
+ {
+ title: 'Owner',
+ field: 'spec.owner',
+ },
+ {
+ title: 'Lifecycle',
+ field: 'spec.lifecycle',
+ },
+ {
+ title: 'Type', // TODO: Resolve the type display name using the API from https://github.com/spotify/backstage/pull/2451
+ field: 'spec.type',
+ },
{
title: 'Description',
field: 'metadata.description',
},
+ {
+ title: 'Tags',
+ field: 'metadata.tags',
+ cellStyle: {
+ padding: '0px 16px 0px 20px',
+ },
+ render: (entity: Entity) => (
+ <>
+ {entity.metadata.tags &&
+ entity.metadata.tags.map(t => (
+
+ ))}
+ >
+ ),
+ },
];
-type CatalogTableProps = {
+type ExplorerTableProps = {
entities: Entity[];
titlePreamble: string;
loading: boolean;
error?: any;
};
-export const ApiCatalogTable = ({
+export const ApiExplorerTable = ({
entities,
loading,
error,
titlePreamble,
-}: CatalogTableProps) => {
+}: ExplorerTableProps) => {
if (error) {
return (
diff --git a/plugins/api-docs/src/components/ApiCatalogPage/index.ts b/plugins/api-docs/src/components/ApiExplorerTable/index.ts
similarity index 91%
rename from plugins/api-docs/src/components/ApiCatalogPage/index.ts
rename to plugins/api-docs/src/components/ApiExplorerTable/index.ts
index bec9de705a..a9c79861e8 100644
--- a/plugins/api-docs/src/components/ApiCatalogPage/index.ts
+++ b/plugins/api-docs/src/components/ApiExplorerTable/index.ts
@@ -14,4 +14,4 @@
* limitations under the License.
*/
-export { ApiCatalogPage } from './ApiCatalogPage';
+export { ApiExplorerTable } from './ApiExplorerTable';
diff --git a/plugins/api-docs/src/plugin.ts b/plugins/api-docs/src/plugin.ts
index db58538b67..bd9c968d5b 100644
--- a/plugins/api-docs/src/plugin.ts
+++ b/plugins/api-docs/src/plugin.ts
@@ -15,14 +15,14 @@
*/
import { createPlugin } from '@backstage/core';
-import { ApiCatalogPage } from './components/ApiCatalogPage/ApiCatalogPage';
+import { ApiExplorerPage } from './components/ApiExplorerPage/ApiExplorerPage';
import { ApiEntityPage } from './components/ApiEntityPage/ApiEntityPage';
import { entityRoute, rootRoute } from './routes';
export const plugin = createPlugin({
id: 'api-docs',
register({ router }) {
- router.addRoute(rootRoute, ApiCatalogPage);
+ router.addRoute(rootRoute, ApiExplorerPage);
router.addRoute(entityRoute, ApiEntityPage);
},
});