docs: fix docs for catalog module "unprocessed"

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
This commit is contained in:
Patrick Jungermann
2023-06-24 01:54:26 +02:00
parent 2a1caca3d6
commit a8fa79ccc1
3 changed files with 22 additions and 7 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-backend-module-unprocessed': patch
'@backstage/plugin-catalog-unprocessed-entities': patch
---
Fix and improve documentation for the unprocessed entities modules.
@@ -1,4 +1,4 @@
# @backstage/plugin-catalog-backend-module-unprocessed-node
# @backstage/plugin-catalog-backend-module-unprocessed
This catalog-backend module adds support for viewing unprocessed entities. An unprocessed entity is one that doesn't show up in the catalog.
@@ -10,11 +10,15 @@ A `pending` entity has not been processed yet.
## Installation
```shell
yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-unprocessed
```
### backend
In `packages/backend/src/plugins/catalog.ts` import the module and initialize it after invoking `CatalogBuilder.build()`:
```ts
```ts title="packages/backend/src/plugins/catalog.ts"
import { UnprocessedEntitesModule } from '@backstage/plugin-catalog-backend-module-unprocessed';
//...
@@ -22,7 +26,6 @@ import { UnprocessedEntitesModule } from '@backstage/plugin-catalog-backend-modu
const unprocessed = new UnprocessedEntitesModule(
await env.database.getClient(),
router,
env.logger,
);
unprocessed.registerRoutes();
```
@@ -31,7 +34,7 @@ unprocessed.registerRoutes();
In `packages/backend-next/src/index.ts` add the module:
```ts
```ts title="packages/backend-next/src/index.ts"
backend.add(catalogModuleUnprocessedEntities());
```
@@ -8,9 +8,13 @@ Requires the `@backstage/plugin-catalog-backend-module-unprocessed` module to be
## Installation
Import into your App.tsx and include into the `<FlatRoutes>` component:
```shell
yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-unprocessed
```
```tsx
Import into your `App.tsx` and include into the `<FlatRoutes>` component:
```tsx title="packages/app/src/App.tsx"
import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unprocessed-entities';
//...
@@ -22,7 +26,9 @@ import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unproc
## Getting started
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/catalog-unprocessed-entities](http://localhost:3000/catalog-unprocessed-entities).
Your plugin has been added to the example app in this repository,
meaning you'll be able to access it by running `yarn start` in the root directory,
and then navigating to [/catalog-unprocessed-entities](http://localhost:3000/catalog-unprocessed-entities).
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.