diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx
index 8ddf53783d..8482bc9a8a 100644
--- a/packages/app/src/App.tsx
+++ b/packages/app/src/App.tsx
@@ -28,6 +28,7 @@ import { hot } from 'react-hot-loader/root';
import { providers } from './identityProviders';
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
import { Router as DocsRouter } from '@backstage/plugin-techdocs';
+import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
import { Route, Routes, Navigate } from 'react-router';
import { EntityPage } from './components/catalog/EntityPage';
@@ -60,6 +61,10 @@ const AppRoutes = () => (
element={}
/>
} />
+ }
+ />
{...deprecatedAppRoutes}
diff --git a/packages/app/src/apis.ts b/packages/app/src/apis.ts
index b391e95d62..b79a6850bd 100644
--- a/packages/app/src/apis.ts
+++ b/packages/app/src/apis.ts
@@ -51,8 +51,6 @@ import {
LighthouseRestApi,
} from '@backstage/plugin-lighthouse';
-import { techRadarApiRef, TechRadar } from '@backstage/plugin-tech-radar';
-
import { CircleCIApi, circleCIApiRef } from '@backstage/plugin-circleci';
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
@@ -182,14 +180,6 @@ export const apis = (config: ConfigApi) => {
}),
);
- builder.add(
- techRadarApiRef,
- new TechRadar({
- width: 1500,
- height: 800,
- }),
- );
-
builder.add(catalogApiRef, new CatalogClient({ discoveryApi }));
builder.add(scaffolderApiRef, new ScaffolderApi({ discoveryApi }));
diff --git a/packages/create-app/templates/default-app/packages/app/src/App.tsx b/packages/create-app/templates/default-app/packages/app/src/App.tsx
index 3e6a0ef00e..06ef257931 100644
--- a/packages/create-app/templates/default-app/packages/app/src/App.tsx
+++ b/packages/create-app/templates/default-app/packages/app/src/App.tsx
@@ -11,6 +11,7 @@ import { AppSidebar } from './sidebar';
import { Route, Routes, Navigate } from 'react-router';
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
import { Router as DocsRouter } from '@backstage/plugin-techdocs';
+import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
import { EntityPage } from './components/catalog/EntityPage';
const app = createApp({
@@ -35,6 +36,10 @@ const App: FC<{}> = () => (
element={}
/>
} />
+ }
+ />
{deprecatedAppRoutes}
diff --git a/packages/create-app/templates/default-app/packages/app/src/apis.ts b/packages/create-app/templates/default-app/packages/app/src/apis.ts
index 14351eaba7..ba4343801f 100644
--- a/packages/create-app/templates/default-app/packages/app/src/apis.ts
+++ b/packages/create-app/templates/default-app/packages/app/src/apis.ts
@@ -29,8 +29,6 @@ import {
TechDocsStorageApi,
} from '@backstage/plugin-techdocs';
-import { techRadarApiRef, TechRadar } from '@backstage/plugin-tech-radar';
-
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
import { CircleCIApi, circleCIApiRef } from '@backstage/plugin-circleci';
@@ -72,14 +70,6 @@ export const apis = (config: ConfigApi) => {
builder.add(scaffolderApiRef, new ScaffolderApi({ discoveryApi }));
- builder.add(
- techRadarApiRef,
- new TechRadar({
- width: 1500,
- height: 800,
- }),
- );
-
builder.add(
techdocsStorageApiRef,
new TechDocsStorageApi({ apiOrigin: techdocsStorageUrl }),
diff --git a/plugins/tech-radar/README.md b/plugins/tech-radar/README.md
index fb9d220b8c..cbe4dd22eb 100644
--- a/plugins/tech-radar/README.md
+++ b/plugins/tech-radar/README.md
@@ -29,71 +29,34 @@ For either simple or advanced installations, you'll need to add the dependency u
yarn add @backstage/plugin-tech-radar
```
-### Simple Configuration
+### Configuration
-In your `apis.ts` set up the simple "out of the box" implementation for Tech Radar:
-
-```ts
-import { ApiHolder, ApiRegistry } from '@backstage/core';
-import {
- techRadarApiRef,
- TechRadar,
-} from '@backstage/plugin-tech-radar';
-
-const builder = ApiRegistry.builder();
-
-builder.add(techRadarApiRef, new TechRadar({
- width: 1400,
- height: 800
-));
-
-export default builder.build() as ApiHolder;
-```
-
-Congrats, you're done! We'll just load it with [example data](src/sampleData.ts) to get you started. Just go to to see it live in action.
-
-And if you'd like to configure it more, such as providing it with your own data, see the `TechRadarApi` TypeScript interface below for the options:
-
-```ts
-export interface TechRadarComponentProps {
- width: number;
- height: number;
- getData?: () => Promise;
- svgProps?: object;
-}
-
-export interface TechRadarApi extends TechRadarComponentProps {
- title?: string;
- subtitle?: string;
-}
-```
-
-You can see the API directly over at [src/api.ts](./src/api.ts).
-
-### Advanced Configuration
-
-This way won't expose an `/tech-radar` path. Instead, you'll need to create your own Backstage plugin and use the Tech Radar as any other React UI component.
-
-In your Backstage app, run the following command:
-
-```sh
-yarn create-plugin
-```
-
-In your plugin, in any React component you'd like to import the Tech Radar, do the following:
+Modify your app routes to include the Router component exported from the tech radar, for example:
```tsx
-import { TechRadarComponent } from '@backstage/plugin-tech-radar';
+import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
-function MyCustomRadar() {
- return ;
-}
+// Inside App component
+
+ {/* other routes ... */}
+ }
+ />
+ {/* other routes ... */}
+;
```
-If you'd like to configure it more, see the `TechRadarComponentProps` TypeScript interface for options:
+If you'd like to configure it more, see the `TechRadarPageProps` and `TechRadarComponentProps` types for options:
```ts
-export interface TechRadarComponentProps {
+export type TechRadarPageProps = TechRadarComponentProps & {
+ title?: string;
+ subtitle?: string;
+ pageTitle?: string;
+};
+
+export interface TechRadarPageProps {
width: number;
height: number;
getData?: () => Promise;
@@ -101,8 +64,6 @@ export interface TechRadarComponentProps {
}
```
-You can see the API directly over at [src/api.ts](./src/api.ts).
-
## Frequently Asked Questions
### Who created the Tech Radar?
@@ -111,7 +72,7 @@ You can see the API directly over at [src/api.ts](./src/api.ts).
### How do I load in my own data?
-It's simple. In both the Simple (Backstage plugin) and Advanced (React component) configurations, you can pass through a `getData` prop which expects a `Promise` signature. See more in [src/api.ts](./src/api.ts).
+It's simple, you can pass through a `getData` prop which expects a `Promise` signature.
Here's an example:
@@ -133,42 +94,21 @@ const getHardCodedData = () =>
],
});
-// Simple
-builder.add(techRadarApiRef, new TechRadar({
- width: 1400,
- height: 800,
- getData: getHardCodedData
-));
-
-// Advanced
-
+;
```
### How do I write tests?
You can use the `svgProps` option to pass custom React props to the `