Merge pull request #33443 from backstage/rugvip/unprocessed-entities-devtools
catalog-unprocessed-entities: integrate as DevTools tab by default
This commit is contained in:
@@ -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
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
Integrate unprocessed entities as a DevTools tab by default
|
||||
@@ -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(
|
||||
<FlatRoutes>
|
||||
<Route path="/catalog-import" element={<CatalogImportPage />} />
|
||||
@@ -148,8 +141,6 @@ const app = createApp({
|
||||
notFoundErrorPageModule,
|
||||
appModuleNav,
|
||||
customHomePageModule,
|
||||
devtoolsPlugin,
|
||||
devtoolsPluginUnprocessed,
|
||||
...collectedLegacyPlugins,
|
||||
],
|
||||
advanced: {
|
||||
|
||||
@@ -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<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.title', {}>
|
||||
| ExtensionDataRef<
|
||||
IconElement,
|
||||
'core.icon',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
path: string;
|
||||
title: string;
|
||||
icon?: IconElement;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
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<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<string, 'core.title', {}>
|
||||
| ExtensionDataRef<
|
||||
IconElement,
|
||||
'core.icon',
|
||||
{
|
||||
optional: true;
|
||||
}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
path: string;
|
||||
title: string;
|
||||
icon?: IconElement;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -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 => (
|
||||
<Content>
|
||||
<m.UnprocessedEntitiesContent />
|
||||
</Content>
|
||||
)),
|
||||
},
|
||||
});
|
||||
@@ -15,4 +15,3 @@
|
||||
*/
|
||||
|
||||
export { default } from './plugin';
|
||||
export { unprocessedEntitiesDevToolsContent } from './devToolsContent';
|
||||
|
||||
@@ -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 => (
|
||||
<Container>
|
||||
<m.UnprocessedEntitiesContent />
|
||||
</Container>
|
||||
)),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'catalog-unprocessed-entities',
|
||||
@@ -78,5 +100,6 @@ export default createFrontendPlugin({
|
||||
catalogUnprocessedEntitiesApi,
|
||||
catalogUnprocessedEntitiesPage,
|
||||
catalogUnprocessedEntitiesNavItem,
|
||||
unprocessedEntitiesDevToolsContent,
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user