feat: create viewTechDocRouteRef in scaffolder plugin
Signed-off-by: Christian Marker / Intility AS <christian.marker@intility.no>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -367,6 +367,14 @@ export const scaffolderPlugin: BackstagePlugin<
|
||||
},
|
||||
{
|
||||
registerComponent: ExternalRouteRef<undefined, true>;
|
||||
viewTechDoc: ExternalRouteRef<
|
||||
{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
},
|
||||
{}
|
||||
>;
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user