catalog: add default route targets
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': minor
|
||||
---
|
||||
|
||||
Added the following default targets for external routes:
|
||||
|
||||
- `createComponent` binds to the Scaffolder page.
|
||||
- `viewTechDoc` binds to the TechDocs entity documentation page.
|
||||
- `createFromTemplate` binds to the Scaffolder selected template page.
|
||||
@@ -22,18 +22,21 @@ import {
|
||||
export const createComponentRouteRef = createExternalRouteRef({
|
||||
id: 'create-component',
|
||||
optional: true,
|
||||
defaultTarget: 'scaffolder.createComponent',
|
||||
});
|
||||
|
||||
export const viewTechDocRouteRef = createExternalRouteRef({
|
||||
id: 'view-techdoc',
|
||||
optional: true,
|
||||
params: ['namespace', 'kind', 'name'],
|
||||
defaultTarget: 'techdocs.docRoot',
|
||||
});
|
||||
|
||||
export const createFromTemplateRouteRef = createExternalRouteRef({
|
||||
id: 'create-from-template',
|
||||
optional: true,
|
||||
params: ['namespace', 'templateName'],
|
||||
defaultTarget: 'scaffolder.selectedTemplate',
|
||||
});
|
||||
|
||||
export const unregisterRedirectRouteRef = createExternalRouteRef({
|
||||
|
||||
Reference in New Issue
Block a user