diff --git a/.changeset/unprocessed-entities-devtools.md b/.changeset/unprocessed-entities-devtools.md new file mode 100644 index 0000000000..4a34c16938 --- /dev/null +++ b/.changeset/unprocessed-entities-devtools.md @@ -0,0 +1,11 @@ +--- +'@backstage/plugin-catalog-unprocessed-entities': patch +--- + +The unprocessed entities view is now primarily intended for use as a tab within the DevTools plugin. The standalone page is still available but disabled by default. To re-enable it, add the following to your `app-config.yaml`: + +```yaml +app: + extensions: + - page:catalog-unprocessed-entities +``` diff --git a/.patches/pr-33443.txt b/.patches/pr-33443.txt new file mode 100644 index 0000000000..4a7945c2fa --- /dev/null +++ b/.patches/pr-33443.txt @@ -0,0 +1 @@ +Integrate unprocessed entities as a DevTools tab by default \ No newline at end of file diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 160579a3a3..6a6814ae4a 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -50,8 +50,6 @@ import { convertLegacyPageExtension } from '@backstage/core-compat-api'; import { convertLegacyEntityContentExtension } from '@backstage/plugin-catalog-react/alpha'; import { pluginInfoResolver } from './pluginInfoResolver'; import { appModuleNav } from './modules/appModuleNav'; -import devtoolsPlugin from '@backstage/plugin-devtools/alpha'; -import { unprocessedEntitiesDevToolsContent } from '@backstage/plugin-catalog-unprocessed-entities/alpha'; import catalogPlugin from '@backstage/plugin-catalog/alpha'; import InfoIcon from '@material-ui/icons/Info'; @@ -125,11 +123,6 @@ const notFoundErrorPageModule = createFrontendModule({ extensions: [notFoundErrorPage], }); -const devtoolsPluginUnprocessed = createFrontendModule({ - pluginId: 'catalog-unprocessed-entities', - extensions: [unprocessedEntitiesDevToolsContent], -}); - const collectedLegacyPlugins = convertLegacyAppRoot( } /> @@ -148,8 +141,6 @@ const app = createApp({ notFoundErrorPageModule, appModuleNav, customHomePageModule, - devtoolsPlugin, - devtoolsPluginUnprocessed, ...collectedLegacyPlugins, ], advanced: { diff --git a/plugins/catalog-unprocessed-entities/report-alpha.api.md b/plugins/catalog-unprocessed-entities/report-alpha.api.md index c4a2b529bf..03e60c0675 100644 --- a/plugins/catalog-unprocessed-entities/report-alpha.api.md +++ b/plugins/catalog-unprocessed-entities/report-alpha.api.md @@ -137,49 +137,47 @@ const _default: OverridableFrontendPlugin< noHeader?: boolean; }; }>; + 'sub-page:catalog-unprocessed-entities': OverridableExtensionDefinition<{ + kind: 'sub-page'; + name: undefined; + config: { + path: string | undefined; + title: string | undefined; + }; + configInput: { + title?: string | undefined; + path?: string | undefined; + }; + output: + | ExtensionDataRef + | ExtensionDataRef< + RouteRef_2, + 'core.routing.ref', + { + optional: true; + } + > + | ExtensionDataRef + | ExtensionDataRef + | ExtensionDataRef< + IconElement, + 'core.icon', + { + optional: true; + } + >; + inputs: {}; + params: { + path: string; + title: string; + icon?: IconElement; + loader: () => Promise; + routeRef?: RouteRef_2; + }; + }>; } >; export default _default; -// @alpha -export const unprocessedEntitiesDevToolsContent: OverridableExtensionDefinition<{ - kind: 'sub-page'; - name: 'unprocessed-entities'; - config: { - path: string | undefined; - title: string | undefined; - }; - configInput: { - title?: string | undefined; - path?: string | undefined; - }; - output: - | ExtensionDataRef - | ExtensionDataRef< - RouteRef_2, - 'core.routing.ref', - { - optional: true; - } - > - | ExtensionDataRef - | ExtensionDataRef - | ExtensionDataRef< - IconElement, - 'core.icon', - { - optional: true; - } - >; - inputs: {}; - params: { - path: string; - title: string; - icon?: IconElement; - loader: () => Promise; - routeRef?: RouteRef_2; - }; -}>; - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-unprocessed-entities/src/alpha/devToolsContent.tsx b/plugins/catalog-unprocessed-entities/src/alpha/devToolsContent.tsx deleted file mode 100644 index 3d88c5299d..0000000000 --- a/plugins/catalog-unprocessed-entities/src/alpha/devToolsContent.tsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2024 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { SubPageBlueprint } from '@backstage/frontend-plugin-api'; -import { Content } from '@backstage/core-components'; - -/** - * DevTools content for catalog unprocessed entities. - * - * @alpha - */ -export const unprocessedEntitiesDevToolsContent = SubPageBlueprint.make({ - attachTo: { id: 'page:devtools', input: 'pages' }, - name: 'unprocessed-entities', - params: { - path: 'unprocessed-entities', - title: 'Unprocessed Entities', - loader: () => - import('../components/UnprocessedEntities').then(m => ( - - - - )), - }, -}); diff --git a/plugins/catalog-unprocessed-entities/src/alpha/index.ts b/plugins/catalog-unprocessed-entities/src/alpha/index.ts index 001fa77643..2f137f09ee 100644 --- a/plugins/catalog-unprocessed-entities/src/alpha/index.ts +++ b/plugins/catalog-unprocessed-entities/src/alpha/index.ts @@ -15,4 +15,3 @@ */ export { default } from './plugin'; -export { unprocessedEntitiesDevToolsContent } from './devToolsContent'; diff --git a/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx b/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx index beeb19b153..1bf2bc2bc4 100644 --- a/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx +++ b/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx @@ -21,6 +21,7 @@ import { ApiBlueprint, PageBlueprint, NavItemBlueprint, + SubPageBlueprint, } from '@backstage/frontend-plugin-api'; import { @@ -29,6 +30,7 @@ import { } from '../api'; import QueueIcon from '@material-ui/icons/Queue'; import { rootRouteRef } from '../routes'; +import { Container } from '@backstage/ui'; /** @alpha */ export const catalogUnprocessedEntitiesApi = ApiBlueprint.make({ @@ -46,6 +48,7 @@ export const catalogUnprocessedEntitiesApi = ApiBlueprint.make({ /** @alpha */ export const catalogUnprocessedEntitiesPage = PageBlueprint.make({ + disabled: true, params: { path: '/catalog-unprocessed-entities', routeRef: rootRouteRef, @@ -65,6 +68,25 @@ export const catalogUnprocessedEntitiesNavItem = NavItemBlueprint.make({ }, }); +/** + * DevTools content for catalog unprocessed entities. + * + * @alpha + */ +export const unprocessedEntitiesDevToolsContent = SubPageBlueprint.make({ + attachTo: { id: 'page:devtools', input: 'pages' }, + params: { + path: 'unprocessed-entities', + title: 'Unprocessed Entities', + loader: () => + import('../components/UnprocessedEntities').then(m => ( + + + + )), + }, +}); + /** @alpha */ export default createFrontendPlugin({ pluginId: 'catalog-unprocessed-entities', @@ -78,5 +100,6 @@ export default createFrontendPlugin({ catalogUnprocessedEntitiesApi, catalogUnprocessedEntitiesPage, catalogUnprocessedEntitiesNavItem, + unprocessedEntitiesDevToolsContent, ], });