plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -13,12 +13,13 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { TranslationRef } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
@@ -63,7 +64,7 @@ const _default: OverridableFrontendPlugin<
|
||||
root: RouteRef<undefined>;
|
||||
},
|
||||
{
|
||||
registerApi: ExternalRouteRef<undefined>;
|
||||
registerApi: ExternalRouteRef<undefined, true>;
|
||||
},
|
||||
{
|
||||
'api:api-docs/config': OverridableExtensionDefinition<{
|
||||
@@ -346,7 +347,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -383,7 +384,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -406,7 +407,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -443,7 +444,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -456,7 +457,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -465,7 +466,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:api-docs': OverridableExtensionDefinition<{
|
||||
@@ -483,7 +484,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -504,7 +505,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import {
|
||||
createFrontendPlugin,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
|
||||
import {
|
||||
ApiEntity,
|
||||
parseEntityRef,
|
||||
@@ -44,7 +42,7 @@ import {
|
||||
const apiDocsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'APIs',
|
||||
routeRef: convertLegacyRouteRef(rootRoute),
|
||||
routeRef: rootRoute,
|
||||
icon: () => <AppIcon id="kind:api" />,
|
||||
},
|
||||
});
|
||||
@@ -77,7 +75,7 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { config }) {
|
||||
return originalFactory({
|
||||
path: '/api-docs',
|
||||
routeRef: convertLegacyRouteRef(rootRoute),
|
||||
routeRef: rootRoute,
|
||||
loader: () =>
|
||||
import('./components/ApiExplorerPage').then(m => (
|
||||
<m.ApiExplorerIndexPage
|
||||
@@ -212,10 +210,10 @@ export default createFrontendPlugin({
|
||||
pluginId: 'api-docs',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
routes: {
|
||||
root: convertLegacyRouteRef(rootRoute),
|
||||
root: rootRoute,
|
||||
},
|
||||
externalRoutes: {
|
||||
registerApi: convertLegacyRouteRef(registerComponentRouteRef),
|
||||
registerApi: registerComponentRouteRef,
|
||||
},
|
||||
extensions: [
|
||||
apiDocsNavItem,
|
||||
|
||||
@@ -12,11 +12,12 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { TranslationRef } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
@@ -53,11 +54,14 @@ const _default: OverridableFrontendPlugin<
|
||||
catalogGraph: RouteRef<undefined>;
|
||||
},
|
||||
{
|
||||
catalogEntity: ExternalRouteRef<{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
}>;
|
||||
catalogEntity: ExternalRouteRef<
|
||||
{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
},
|
||||
{
|
||||
'api:catalog-graph': OverridableExtensionDefinition<{
|
||||
@@ -187,7 +191,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -208,7 +212,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import {
|
||||
createFrontendPlugin,
|
||||
PageBlueprint,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { catalogGraphRouteRef, catalogEntityRouteRef } from './routes';
|
||||
import {
|
||||
@@ -78,7 +77,7 @@ const CatalogGraphPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { config }) {
|
||||
return originalFactory({
|
||||
path: '/catalog-graph',
|
||||
routeRef: convertLegacyRouteRef(catalogGraphRouteRef),
|
||||
routeRef: catalogGraphRouteRef,
|
||||
loader: () =>
|
||||
import('./components/CatalogGraphPage').then(m => (
|
||||
<m.CatalogGraphPage {...config} />
|
||||
@@ -100,10 +99,10 @@ export default createFrontendPlugin({
|
||||
pluginId: 'catalog-graph',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
routes: {
|
||||
catalogGraph: convertLegacyRouteRef(catalogGraphRouteRef),
|
||||
catalogGraph: catalogGraphRouteRef,
|
||||
},
|
||||
externalRoutes: {
|
||||
catalogEntity: convertLegacyRouteRef(catalogEntityRouteRef),
|
||||
catalogEntity: catalogEntityRouteRef,
|
||||
},
|
||||
extensions: [CatalogGraphPage, CatalogGraphEntityCard, CatalogGraphApi],
|
||||
});
|
||||
|
||||
@@ -11,7 +11,8 @@ import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @alpha (undocumented)
|
||||
@@ -122,7 +123,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -133,7 +134,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import {
|
||||
discoveryApiRef,
|
||||
fetchApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import {
|
||||
createFrontendPlugin,
|
||||
PageBlueprint,
|
||||
@@ -42,7 +41,7 @@ export * from './translation';
|
||||
const catalogImportPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/catalog-import',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('./components/ImportPage').then(m => (
|
||||
<RequirePermission permission={catalogEntityCreatePermission}>
|
||||
@@ -89,7 +88,7 @@ export default createFrontendPlugin({
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [catalogImportApi, catalogImportPage],
|
||||
routes: {
|
||||
importPage: convertLegacyRouteRef(rootRouteRef),
|
||||
importPage: rootRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
@@ -45,7 +46,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -54,7 +55,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:catalog-unprocessed-entities': OverridableExtensionDefinition<{
|
||||
@@ -70,7 +71,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -81,7 +82,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import {
|
||||
catalogUnprocessedEntitiesApiRef,
|
||||
CatalogUnprocessedEntitiesClient,
|
||||
} from '../api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import QueueIcon from '@material-ui/icons/Queue';
|
||||
import { rootRouteRef } from '../routes';
|
||||
|
||||
@@ -49,7 +48,7 @@ export const catalogUnprocessedEntitiesApi = ApiBlueprint.make({
|
||||
export const catalogUnprocessedEntitiesPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/catalog-unprocessed-entities',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('../components/UnprocessedEntities').then(m => (
|
||||
<m.UnprocessedEntities />
|
||||
@@ -61,7 +60,7 @@ export const catalogUnprocessedEntitiesPage = PageBlueprint.make({
|
||||
export const catalogUnprocessedEntitiesNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'Unprocessed Entities',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
icon: QueueIcon,
|
||||
},
|
||||
});
|
||||
@@ -71,7 +70,7 @@ export default createFrontendPlugin({
|
||||
pluginId: 'catalog-unprocessed-entities',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: convertLegacyRouteRef(rootRouteRef),
|
||||
root: rootRouteRef,
|
||||
},
|
||||
extensions: [
|
||||
catalogUnprocessedEntitiesApi,
|
||||
|
||||
@@ -16,13 +16,14 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { IconLinkVerticalProps } from '@backstage/core-components';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { SearchResultItemExtensionComponent } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultItemExtensionPredicate } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultListItemBlueprintParams } from '@backstage/plugin-search-react/alpha';
|
||||
@@ -124,17 +125,23 @@ const _default: OverridableFrontendPlugin<
|
||||
}>;
|
||||
},
|
||||
{
|
||||
viewTechDoc: ExternalRouteRef<{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
}>;
|
||||
createComponent: ExternalRouteRef<undefined>;
|
||||
createFromTemplate: ExternalRouteRef<{
|
||||
namespace: string;
|
||||
templateName: string;
|
||||
}>;
|
||||
unregisterRedirect: ExternalRouteRef<undefined>;
|
||||
viewTechDoc: ExternalRouteRef<
|
||||
{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
createComponent: ExternalRouteRef<undefined, true>;
|
||||
createFromTemplate: ExternalRouteRef<
|
||||
{
|
||||
namespace: string;
|
||||
templateName: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
unregisterRedirect: ExternalRouteRef<undefined, true>;
|
||||
},
|
||||
{
|
||||
'api:catalog': OverridableExtensionDefinition<{
|
||||
@@ -759,7 +766,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -852,7 +859,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -967,7 +974,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -976,7 +983,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:catalog': OverridableExtensionDefinition<{
|
||||
@@ -1007,7 +1014,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -1028,7 +1035,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'page:catalog/entity': OverridableExtensionDefinition<{
|
||||
@@ -1060,7 +1067,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -1091,7 +1098,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ConfigurableExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -1149,7 +1156,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'search-result-list-item:catalog': OverridableExtensionDefinition<{
|
||||
|
||||
@@ -15,13 +15,12 @@
|
||||
*/
|
||||
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import { NavItemBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { rootRouteRef } from '../routes';
|
||||
|
||||
export const catalogNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
title: 'Catalog',
|
||||
icon: HomeIcon,
|
||||
},
|
||||
|
||||
@@ -56,7 +56,7 @@ export const catalogPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { inputs, config }) {
|
||||
return originalFactory({
|
||||
path: '/catalog',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: async () => {
|
||||
const { BaseCatalogPage } = await import('../components/CatalogPage');
|
||||
const filters = inputs.filters.map(filter =>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
|
||||
import { entityRouteRef } from '@backstage/plugin-catalog-react';
|
||||
@@ -41,16 +40,16 @@ import contextMenuItems from './contextMenuItems';
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'catalog',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
catalogIndex: rootRouteRef,
|
||||
catalogEntity: entityRouteRef,
|
||||
}),
|
||||
externalRoutes: convertLegacyRouteRefs({
|
||||
},
|
||||
externalRoutes: {
|
||||
viewTechDoc: viewTechDocRouteRef,
|
||||
createComponent: createComponentRouteRef,
|
||||
createFromTemplate: createFromTemplateRouteRef,
|
||||
unregisterRedirect: unregisterRedirectRouteRef,
|
||||
}),
|
||||
},
|
||||
extensions: [
|
||||
...apis,
|
||||
...pages,
|
||||
|
||||
@@ -12,7 +12,8 @@ import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
@@ -45,7 +46,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -54,7 +55,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:devtools': OverridableExtensionDefinition<{
|
||||
@@ -70,7 +71,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -81,7 +82,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import {
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
import { devToolsApiRef, DevToolsClient } from '../api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import BuildIcon from '@material-ui/icons/Build';
|
||||
import { rootRouteRef } from '../routes';
|
||||
|
||||
@@ -46,7 +45,7 @@ export const devToolsApi = ApiBlueprint.make({
|
||||
export const devToolsPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/devtools',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('../components/DevToolsPage').then(m => <m.DevToolsPage />),
|
||||
},
|
||||
@@ -56,7 +55,7 @@ export const devToolsPage = PageBlueprint.make({
|
||||
export const devToolsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'DevTools',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
icon: BuildIcon,
|
||||
},
|
||||
});
|
||||
@@ -66,7 +65,7 @@ export default createFrontendPlugin({
|
||||
pluginId: 'devtools',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: convertLegacyRouteRef(rootRouteRef),
|
||||
root: rootRouteRef,
|
||||
},
|
||||
extensions: [devToolsApi, devToolsPage, devToolsNavItem],
|
||||
});
|
||||
|
||||
@@ -14,7 +14,8 @@ import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @public (undocumented)
|
||||
@@ -103,7 +104,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -140,7 +141,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -157,7 +158,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -168,7 +169,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -15,16 +15,12 @@
|
||||
*/
|
||||
|
||||
import { PageBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import { rootCatalogKubernetesRouteRef } from '../plugin';
|
||||
|
||||
export const kubernetesPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/kubernetes',
|
||||
// you can reuse the existing routeRef
|
||||
// by wrapping into the convertLegacyRouteRef.
|
||||
routeRef: convertLegacyRouteRef(rootCatalogKubernetesRouteRef),
|
||||
// these inputs usually match the props required by the component.
|
||||
routeRef: rootCatalogKubernetesRouteRef,
|
||||
loader: () => import('../Router').then(m => <m.Router />),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { kubernetesPage } from './pages';
|
||||
import { entityKubernetesContent } from './entityContents';
|
||||
@@ -37,5 +36,5 @@ export default createFrontendPlugin({
|
||||
kubernetesAuthProvidersApi,
|
||||
kubernetesClusterLinkFormatterApi,
|
||||
],
|
||||
routes: convertLegacyRouteRefs({ kubernetes: rootCatalogKubernetesRouteRef }),
|
||||
routes: { kubernetes: rootCatalogKubernetesRouteRef },
|
||||
});
|
||||
|
||||
@@ -10,8 +10,8 @@ import { JSX as JSX_2 } from 'react';
|
||||
import { JSX as JSX_3 } from 'react/jsx-runtime';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/core-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @public (undocumented)
|
||||
export const BuiThemerPage: () => JSX_3.Element;
|
||||
@@ -19,7 +19,7 @@ export const BuiThemerPage: () => JSX_3.Element;
|
||||
// @public (undocumented)
|
||||
export const buiThemerPlugin: BackstagePlugin<
|
||||
{
|
||||
root: RouteRef_2<undefined>;
|
||||
root: RouteRef<undefined>;
|
||||
},
|
||||
{}
|
||||
>;
|
||||
@@ -44,7 +44,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -55,7 +55,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
import {
|
||||
createPlugin,
|
||||
createRoutableExtension,
|
||||
@@ -57,11 +53,11 @@ export default createFrontendPlugin({
|
||||
path: '/mui-to-bui',
|
||||
loader: () =>
|
||||
import('./components/BuiThemerPage').then(m => <m.BuiThemerPage />),
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
},
|
||||
}),
|
||||
],
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -11,7 +11,8 @@ import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
@@ -48,7 +49,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -59,7 +60,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -22,16 +22,12 @@ import {
|
||||
fetchApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { rootRouteRef } from './routes';
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
import { NotificationsClient, notificationsApiRef } from './api';
|
||||
|
||||
const page = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/notifications',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('./components/NotificationsPage').then(m => (
|
||||
<m.NotificationsPage />
|
||||
@@ -53,9 +49,9 @@ const api = ApiBlueprint.make({
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'notifications',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
}),
|
||||
},
|
||||
// TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually
|
||||
extensions: [page, api],
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -18,7 +18,7 @@ import { TranslationRef } from '@backstage/frontend-plugin-api';
|
||||
const _default: OverridableFrontendPlugin<
|
||||
{},
|
||||
{
|
||||
catalogIndex: ExternalRouteRef<undefined>;
|
||||
catalogIndex: ExternalRouteRef<undefined, true>;
|
||||
},
|
||||
{
|
||||
'entity-card:org/group-profile': OverridableExtensionDefinition<{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { catalogIndexRouteRef } from './routes';
|
||||
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
||||
@@ -122,9 +121,9 @@ export default createFrontendPlugin({
|
||||
EntityOwnershipCard,
|
||||
EntityUserProfileCard,
|
||||
],
|
||||
externalRoutes: convertLegacyRouteRefs({
|
||||
externalRoutes: {
|
||||
catalogIndex: catalogIndexRouteRef,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export { orgTranslationRef } from './translation';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { FieldExtensionOptions } from '@backstage/plugin-scaffolder-react';
|
||||
import { FormField } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
@@ -28,10 +28,11 @@ import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { PathParams } from '@backstage/core-plugin-api';
|
||||
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { ScaffolderFormFieldsApi } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { SubRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { SubRouteRef } from '@backstage/core-plugin-api';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
@@ -50,12 +51,15 @@ const _default: OverridableFrontendPlugin<
|
||||
templatingExtensions: SubRouteRef<undefined>;
|
||||
},
|
||||
{
|
||||
registerComponent: ExternalRouteRef<undefined>;
|
||||
viewTechDoc: ExternalRouteRef<{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
}>;
|
||||
registerComponent: ExternalRouteRef<undefined, true>;
|
||||
viewTechDoc: ExternalRouteRef<
|
||||
{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
},
|
||||
{
|
||||
'api:scaffolder': OverridableExtensionDefinition<{
|
||||
@@ -175,7 +179,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -184,7 +188,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:scaffolder': OverridableExtensionDefinition<{
|
||||
@@ -198,7 +202,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -223,7 +227,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'scaffolder-form-field:scaffolder/entity-name-picker': OverridableExtensionDefinition<{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createExtensionInput,
|
||||
@@ -42,7 +41,7 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({
|
||||
i.get(FormFieldBlueprint.dataRefs.formFieldLoader),
|
||||
);
|
||||
return originalFactory({
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
path: '/create',
|
||||
loader: () =>
|
||||
import('../components/Router/Router').then(m => (
|
||||
@@ -54,7 +53,7 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({
|
||||
|
||||
export const scaffolderNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
title: 'Create...',
|
||||
icon: CreateComponentIcon,
|
||||
},
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
actionsRouteRef,
|
||||
@@ -60,7 +59,7 @@ const scaffolderEntityIconLink = EntityIconLinkBlueprint.make({
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'scaffolder',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
selectedTemplate: selectedTemplateRouteRef,
|
||||
ongoingTask: scaffolderTaskRouteRef,
|
||||
@@ -68,11 +67,11 @@ export default createFrontendPlugin({
|
||||
listTasks: scaffolderListTaskRouteRef,
|
||||
edit: editRouteRef,
|
||||
templatingExtensions: templatingExtensionsRouteRef,
|
||||
}),
|
||||
externalRoutes: convertLegacyRouteRefs({
|
||||
},
|
||||
externalRoutes: {
|
||||
registerComponent: registerComponentRouteRef,
|
||||
viewTechDoc: viewTechDocRouteRef,
|
||||
}),
|
||||
},
|
||||
extensions: [
|
||||
scaffolderApi,
|
||||
scaffolderPage,
|
||||
|
||||
@@ -15,6 +15,7 @@ import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/core-plugin-api';
|
||||
import { SearchFilterExtensionComponent } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultItemExtensionComponent } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultItemExtensionPredicate } from '@backstage/plugin-search-react/alpha';
|
||||
@@ -23,7 +24,7 @@ import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
root: RouteRef<undefined>;
|
||||
root: RouteRef_2<undefined>;
|
||||
},
|
||||
{},
|
||||
{
|
||||
|
||||
@@ -68,10 +68,6 @@ import { rootRouteRef } from './plugin';
|
||||
import { SearchClient } from './apis';
|
||||
import { SearchType } from './components/SearchType';
|
||||
import { UrlUpdater } from './components/SearchPage/SearchPage';
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
|
||||
/** @alpha */
|
||||
export const searchApi = ApiBlueprint.make({
|
||||
@@ -115,7 +111,7 @@ export const searchPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { config, inputs }) {
|
||||
return originalFactory({
|
||||
path: '/search',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: async () => {
|
||||
const getResultItemComponent = (result: SearchResult) => {
|
||||
const value = inputs.items.find(item =>
|
||||
@@ -267,7 +263,7 @@ export const searchPage = PageBlueprint.makeWithOverrides({
|
||||
/** @alpha */
|
||||
export const searchNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
title: 'Search',
|
||||
icon: SearchIcon,
|
||||
},
|
||||
@@ -278,9 +274,9 @@ export default createFrontendPlugin({
|
||||
pluginId: 'search',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [searchApi, searchPage, searchNavItem],
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
|
||||
@@ -18,7 +18,8 @@ import { IconLinkVerticalProps } from '@backstage/core-components';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { SearchResultItemExtensionComponent } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultItemExtensionPredicate } from '@backstage/plugin-search-react/alpha';
|
||||
import { SearchResultListItemBlueprintParams } from '@backstage/plugin-search-react/alpha';
|
||||
@@ -107,7 +108,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -171,7 +172,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -223,7 +224,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -232,7 +233,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:techdocs': OverridableExtensionDefinition<{
|
||||
@@ -248,7 +249,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -259,7 +260,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'page:techdocs/reader': OverridableExtensionDefinition<{
|
||||
@@ -273,7 +274,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -298,7 +299,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'search-result-list-item:techdocs': OverridableExtensionDefinition<{
|
||||
|
||||
@@ -29,10 +29,6 @@ import {
|
||||
discoveryApiRef,
|
||||
fetchApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
import {
|
||||
EntityContentBlueprint,
|
||||
EntityIconLinkBlueprint,
|
||||
@@ -138,7 +134,7 @@ export const techDocsSearchResultListItemExtension =
|
||||
const techDocsPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/docs',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('../home/components/TechDocsIndexPage').then(m => (
|
||||
<m.TechDocsIndexPage />
|
||||
@@ -166,7 +162,7 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
|
||||
|
||||
return originalFactory({
|
||||
path: '/docs/:namespace/:kind/:name',
|
||||
routeRef: convertLegacyRouteRef(rootDocsRouteRef),
|
||||
routeRef: rootDocsRouteRef,
|
||||
loader: async () =>
|
||||
await import('../Router').then(({ TechDocsReaderRouter }) => (
|
||||
<TechDocsReaderRouter>
|
||||
@@ -199,7 +195,7 @@ const techDocsEntityContent = EntityContentBlueprint.makeWithOverrides({
|
||||
{
|
||||
path: 'docs',
|
||||
title: 'TechDocs',
|
||||
routeRef: convertLegacyRouteRef(rootCatalogDocsRouteRef),
|
||||
routeRef: rootCatalogDocsRouteRef,
|
||||
loader: () =>
|
||||
import('../Router').then(({ EmbeddedDocsRouter }) => {
|
||||
const addons = context.inputs.addons.map(output => {
|
||||
@@ -237,7 +233,7 @@ const techDocsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
icon: LibraryBooks,
|
||||
title: 'Docs',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -256,9 +252,9 @@ export default createFrontendPlugin({
|
||||
techDocsEntityContentEmptyState,
|
||||
techDocsSearchResultListItemExtension,
|
||||
],
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
docRoot: rootDocsRouteRef,
|
||||
entityContent: rootCatalogDocsRouteRef,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -12,12 +12,13 @@ import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/core-plugin-api';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
root: RouteRef<undefined>;
|
||||
root: RouteRef_2<undefined>;
|
||||
},
|
||||
{},
|
||||
{
|
||||
|
||||
@@ -20,10 +20,6 @@ import {
|
||||
PageBlueprint,
|
||||
NavItemBlueprint,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from '@backstage/core-compat-api';
|
||||
import SettingsIcon from '@material-ui/icons/Settings';
|
||||
import { settingsRouteRef } from './plugin';
|
||||
|
||||
@@ -39,7 +35,7 @@ const userSettingsPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { inputs }) {
|
||||
return originalFactory({
|
||||
path: '/settings',
|
||||
routeRef: convertLegacyRouteRef(settingsRouteRef),
|
||||
routeRef: settingsRouteRef,
|
||||
loader: () =>
|
||||
import('./components/SettingsPage').then(m => (
|
||||
<m.SettingsPage
|
||||
@@ -55,7 +51,7 @@ const userSettingsPage = PageBlueprint.makeWithOverrides({
|
||||
/** @alpha */
|
||||
export const settingsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
routeRef: convertLegacyRouteRef(settingsRouteRef),
|
||||
routeRef: settingsRouteRef,
|
||||
title: 'Settings',
|
||||
icon: SettingsIcon,
|
||||
},
|
||||
@@ -68,7 +64,7 @@ export default createFrontendPlugin({
|
||||
pluginId: 'user-settings',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [userSettingsPage, settingsNavItem],
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: settingsRouteRef,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user