feat: create viewTechDocRouteRef in scaffolder plugin

Signed-off-by: Christian Marker / Intility AS <christian.marker@intility.no>
This commit is contained in:
Christian Marker / Intility AS
2022-09-20 20:44:09 +02:00
parent d8c87f10da
commit 6858329bfc
4 changed files with 17 additions and 0 deletions
+1
View File
@@ -133,6 +133,7 @@ const app = createApp({
});
bind(scaffolderPlugin.externalRoutes, {
registerComponent: catalogImportPlugin.routes.importPage,
viewTechDoc: techdocsPlugin.routes.docRoot,
});
bind(orgPlugin.externalRoutes, {
catalogIndex: catalogPlugin.routes.catalogIndex,
+8
View File
@@ -367,6 +367,14 @@ export const scaffolderPlugin: BackstagePlugin<
},
{
registerComponent: ExternalRouteRef<undefined, true>;
viewTechDoc: ExternalRouteRef<
{
name: string;
kind: string;
namespace: string;
},
true
>;
},
{}
>;
+2
View File
@@ -27,6 +27,7 @@ import {
nextRouteRef,
registerComponentRouteRef,
rootRouteRef,
viewTechDocRouteRef,
} from './routes';
import {
createApiFactory,
@@ -68,6 +69,7 @@ export const scaffolderPlugin = createPlugin({
},
externalRoutes: {
registerComponent: registerComponentRouteRef,
viewTechDoc: viewTechDocRouteRef,
},
});
+6
View File
@@ -24,6 +24,12 @@ export const registerComponentRouteRef = createExternalRouteRef({
optional: true,
});
export const viewTechDocRouteRef = createExternalRouteRef({
id: 'view-techdoc',
optional: true,
params: ['namespace', 'kind', 'name'],
});
export const rootRouteRef = createRouteRef({
id: 'scaffolder',
});