catalog: update extension names and IDs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Internal naming updates for `/alpha` exports.
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { DefaultStarredEntitiesApi } from '../apis';
|
||||
|
||||
export const CatalogApi = createApiExtension({
|
||||
export const catalogApi = createApiExtension({
|
||||
factory: createApiFactory({
|
||||
api: catalogApiRef,
|
||||
deps: {
|
||||
@@ -40,7 +40,7 @@ export const CatalogApi = createApiExtension({
|
||||
}),
|
||||
});
|
||||
|
||||
export const StarredEntitiesApi = createApiExtension({
|
||||
export const catalogStarredEntitiesApi = createApiExtension({
|
||||
factory: createApiFactory({
|
||||
api: starredEntitiesApiRef,
|
||||
deps: { storageApi: storageApiRef },
|
||||
@@ -48,4 +48,4 @@ export const StarredEntitiesApi = createApiExtension({
|
||||
}),
|
||||
});
|
||||
|
||||
export default [CatalogApi, StarredEntitiesApi];
|
||||
export default [catalogApi, catalogStarredEntitiesApi];
|
||||
|
||||
@@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { compatWrapper } from '@backstage/core-compat-api';
|
||||
|
||||
export const EntityAboutCard = createEntityCardExtension({
|
||||
export const catalogAboutEntityCard = createEntityCardExtension({
|
||||
name: 'about',
|
||||
loader: async () =>
|
||||
import('../components/AboutCard').then(m =>
|
||||
@@ -26,7 +26,7 @@ export const EntityAboutCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityLinksCard = createEntityCardExtension({
|
||||
export const catalogLinksEntityCard = createEntityCardExtension({
|
||||
name: 'links',
|
||||
filter: 'has:links',
|
||||
loader: async () =>
|
||||
@@ -35,7 +35,7 @@ export const EntityLinksCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityLabelsCard = createEntityCardExtension({
|
||||
export const catalogLabelsEntityCard = createEntityCardExtension({
|
||||
name: 'labels',
|
||||
filter: 'has:labels',
|
||||
loader: async () =>
|
||||
@@ -44,7 +44,7 @@ export const EntityLabelsCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityDependsOnComponentsCard = createEntityCardExtension({
|
||||
export const catalogDependsOnComponentsEntityCard = createEntityCardExtension({
|
||||
name: 'depends-on-components',
|
||||
loader: async () =>
|
||||
import('../components/DependsOnComponentsCard').then(m =>
|
||||
@@ -52,7 +52,7 @@ export const EntityDependsOnComponentsCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityDependsOnResourcesCard = createEntityCardExtension({
|
||||
export const catalogDependsOnResourcesEntityCard = createEntityCardExtension({
|
||||
name: 'depends-on-resources',
|
||||
loader: async () =>
|
||||
import('../components/DependsOnResourcesCard').then(m =>
|
||||
@@ -60,7 +60,7 @@ export const EntityDependsOnResourcesCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityHasComponentsCard = createEntityCardExtension({
|
||||
export const catalogHasComponentsEntityCard = createEntityCardExtension({
|
||||
name: 'has-components',
|
||||
loader: async () =>
|
||||
import('../components/HasComponentsCard').then(m =>
|
||||
@@ -68,7 +68,7 @@ export const EntityHasComponentsCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityHasResourcesCard = createEntityCardExtension({
|
||||
export const catalogHasResourcesEntityCard = createEntityCardExtension({
|
||||
name: 'has-resources',
|
||||
loader: async () =>
|
||||
import('../components/HasResourcesCard').then(m =>
|
||||
@@ -76,7 +76,7 @@ export const EntityHasResourcesCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityHasSubcomponentsCard = createEntityCardExtension({
|
||||
export const catalogHasSubcomponentsEntityCard = createEntityCardExtension({
|
||||
name: 'has-subcomponents',
|
||||
loader: async () =>
|
||||
import('../components/HasSubcomponentsCard').then(m =>
|
||||
@@ -84,7 +84,7 @@ export const EntityHasSubcomponentsCard = createEntityCardExtension({
|
||||
),
|
||||
});
|
||||
|
||||
export const EntityHasSystemsCard = createEntityCardExtension({
|
||||
export const catalogHasSystemsEntityCard = createEntityCardExtension({
|
||||
name: 'has-systems',
|
||||
loader: async () =>
|
||||
import('../components/HasSystemsCard').then(m =>
|
||||
@@ -93,13 +93,13 @@ export const EntityHasSystemsCard = createEntityCardExtension({
|
||||
});
|
||||
|
||||
export default [
|
||||
EntityAboutCard,
|
||||
EntityLinksCard,
|
||||
EntityLabelsCard,
|
||||
EntityDependsOnComponentsCard,
|
||||
EntityDependsOnResourcesCard,
|
||||
EntityHasComponentsCard,
|
||||
EntityHasResourcesCard,
|
||||
EntityHasSubcomponentsCard,
|
||||
EntityHasSystemsCard,
|
||||
catalogAboutEntityCard,
|
||||
catalogLinksEntityCard,
|
||||
catalogLabelsEntityCard,
|
||||
catalogDependsOnComponentsEntityCard,
|
||||
catalogDependsOnResourcesEntityCard,
|
||||
catalogHasComponentsEntityCard,
|
||||
catalogHasResourcesEntityCard,
|
||||
catalogHasSubcomponentsEntityCard,
|
||||
catalogHasSystemsEntityCard,
|
||||
];
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
catalogExtensionData,
|
||||
} from '@backstage/plugin-catalog-react/alpha';
|
||||
|
||||
export const OverviewEntityContent = createEntityContentExtension({
|
||||
export const catalogOverviewEntityContent = createEntityContentExtension({
|
||||
name: 'overview',
|
||||
defaultPath: '/',
|
||||
defaultTitle: 'Overview',
|
||||
@@ -42,4 +42,4 @@ export const OverviewEntityContent = createEntityContentExtension({
|
||||
)),
|
||||
});
|
||||
|
||||
export default [OverviewEntityContent];
|
||||
export default [catalogOverviewEntityContent];
|
||||
|
||||
@@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { createCatalogFilterExtension } from './createCatalogFilterExtension';
|
||||
import { createSchemaFromZod } from '@backstage/frontend-plugin-api';
|
||||
|
||||
const CatalogEntityTagFilter = createCatalogFilterExtension({
|
||||
const catalogTagCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'tag',
|
||||
loader: async () => {
|
||||
const { EntityTagPicker } = await import('@backstage/plugin-catalog-react');
|
||||
@@ -26,7 +26,7 @@ const CatalogEntityTagFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityKindFilter = createCatalogFilterExtension({
|
||||
const catalogKindCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'kind',
|
||||
configSchema: createSchemaFromZod(z =>
|
||||
z.object({
|
||||
@@ -41,7 +41,7 @@ const CatalogEntityKindFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityTypeFilter = createCatalogFilterExtension({
|
||||
const catalogTypeCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'type',
|
||||
loader: async () => {
|
||||
const { EntityTypePicker } = await import(
|
||||
@@ -51,7 +51,7 @@ const CatalogEntityTypeFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityOwnerFilter = createCatalogFilterExtension({
|
||||
const catalogModeCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'mode',
|
||||
configSchema: createSchemaFromZod(z =>
|
||||
z.object({
|
||||
@@ -66,7 +66,7 @@ const CatalogEntityOwnerFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityNamespaceFilter = createCatalogFilterExtension({
|
||||
const catalogNamespaceCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'namespace',
|
||||
loader: async () => {
|
||||
const { EntityNamespacePicker } = await import(
|
||||
@@ -76,7 +76,7 @@ const CatalogEntityNamespaceFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityLifecycleFilter = createCatalogFilterExtension({
|
||||
const catalogLifecycleCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'lifecycle',
|
||||
loader: async () => {
|
||||
const { EntityLifecyclePicker } = await import(
|
||||
@@ -86,8 +86,8 @@ const CatalogEntityLifecycleFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogEntityProcessingStatusFilter = createCatalogFilterExtension({
|
||||
name: 'processing.status',
|
||||
const catalogProcessingStatusCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'processing-status',
|
||||
loader: async () => {
|
||||
const { EntityProcessingStatusPicker } = await import(
|
||||
'@backstage/plugin-catalog-react'
|
||||
@@ -96,7 +96,7 @@ const CatalogEntityProcessingStatusFilter = createCatalogFilterExtension({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogUserListFilter = createCatalogFilterExtension({
|
||||
const catalogListCatalogFilter = createCatalogFilterExtension({
|
||||
name: 'list',
|
||||
configSchema: createSchemaFromZod(z =>
|
||||
z.object({
|
||||
@@ -110,12 +110,12 @@ const CatalogUserListFilter = createCatalogFilterExtension({
|
||||
});
|
||||
|
||||
export default [
|
||||
CatalogEntityTagFilter,
|
||||
CatalogEntityKindFilter,
|
||||
CatalogEntityTypeFilter,
|
||||
CatalogEntityOwnerFilter,
|
||||
CatalogEntityNamespaceFilter,
|
||||
CatalogEntityLifecycleFilter,
|
||||
CatalogEntityProcessingStatusFilter,
|
||||
CatalogUserListFilter,
|
||||
catalogTagCatalogFilter,
|
||||
catalogKindCatalogFilter,
|
||||
catalogTypeCatalogFilter,
|
||||
catalogModeCatalogFilter,
|
||||
catalogNamespaceCatalogFilter,
|
||||
catalogLifecycleCatalogFilter,
|
||||
catalogProcessingStatusCatalogFilter,
|
||||
catalogListCatalogFilter,
|
||||
];
|
||||
|
||||
@@ -19,10 +19,10 @@ import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import { createNavItemExtension } from '@backstage/frontend-plugin-api';
|
||||
import { rootRouteRef } from '../routes';
|
||||
|
||||
export const CatalogIndexNavItem = createNavItemExtension({
|
||||
export const catalogNavItem = createNavItemExtension({
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
title: 'Catalog',
|
||||
icon: HomeIcon,
|
||||
});
|
||||
|
||||
export default [CatalogIndexNavItem];
|
||||
export default [catalogNavItem];
|
||||
|
||||
@@ -32,7 +32,7 @@ import { catalogExtensionData } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { rootRouteRef } from '../routes';
|
||||
import { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';
|
||||
|
||||
export const CatalogIndexPage = createPageExtension({
|
||||
export const catalogPage = createPageExtension({
|
||||
defaultPath: '/catalog',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
inputs: {
|
||||
@@ -47,7 +47,7 @@ export const CatalogIndexPage = createPageExtension({
|
||||
},
|
||||
});
|
||||
|
||||
export const CatalogEntityPage = createPageExtension({
|
||||
export const catalogEntityPage = createPageExtension({
|
||||
name: 'entity',
|
||||
defaultPath: '/catalog/:namespace/:kind/:name',
|
||||
routeRef: convertLegacyRouteRef(entityRouteRef),
|
||||
@@ -82,4 +82,4 @@ export const CatalogEntityPage = createPageExtension({
|
||||
},
|
||||
});
|
||||
|
||||
export default [CatalogIndexPage, CatalogEntityPage];
|
||||
export default [catalogPage, catalogEntityPage];
|
||||
|
||||
@@ -16,13 +16,12 @@
|
||||
|
||||
import { createSearchResultListItemExtension } from '@backstage/plugin-search-react/alpha';
|
||||
|
||||
export const CatalogSearchResultListItemExtension =
|
||||
createSearchResultListItemExtension({
|
||||
predicate: result => result.type === 'software-catalog',
|
||||
component: () =>
|
||||
import('../components/CatalogSearchResultListItem').then(
|
||||
m => m.CatalogSearchResultListItem,
|
||||
),
|
||||
});
|
||||
export const catalogSearchResultListItem = createSearchResultListItemExtension({
|
||||
predicate: result => result.type === 'software-catalog',
|
||||
component: () =>
|
||||
import('../components/CatalogSearchResultListItem').then(
|
||||
m => m.CatalogSearchResultListItem,
|
||||
),
|
||||
});
|
||||
|
||||
export default [CatalogSearchResultListItemExtension];
|
||||
export default [catalogSearchResultListItem];
|
||||
|
||||
Reference in New Issue
Block a user