frontend-app-api: remove experimental createExtensionTree API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -27,12 +27,7 @@ import {
|
||||
RELATION_PROVIDES_API,
|
||||
} from '@backstage/catalog-model';
|
||||
import { createApp } from '@backstage/app-defaults';
|
||||
import {
|
||||
AppRouter,
|
||||
ConfigReader,
|
||||
defaultConfigLoader,
|
||||
FlatRoutes,
|
||||
} from '@backstage/core-app-api';
|
||||
import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
|
||||
import {
|
||||
AlertDisplay,
|
||||
OAuthRequestDialog,
|
||||
@@ -112,10 +107,6 @@ import { PuppetDbPage } from '@backstage/plugin-puppetdb';
|
||||
import { DevToolsPage } from '@backstage/plugin-devtools';
|
||||
import { customDevToolsPage } from './components/devtools/CustomDevToolsPage';
|
||||
import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unprocessed-entities';
|
||||
import {
|
||||
createExtensionTree,
|
||||
ExtensionTree,
|
||||
} from '@backstage/frontend-app-api';
|
||||
|
||||
const app = createApp({
|
||||
apis,
|
||||
@@ -162,14 +153,6 @@ const app = createApp({
|
||||
},
|
||||
});
|
||||
|
||||
/* HIGHLY EXPERIMENTAL. DO NOT USE THIS IN YOUR APP */
|
||||
let extensionTree: ExtensionTree | undefined;
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
extensionTree = createExtensionTree({
|
||||
config: ConfigReader.fromConfigs(await defaultConfigLoader()),
|
||||
});
|
||||
}
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Route path="/" element={<Navigate to="catalog" />} />
|
||||
@@ -258,10 +241,6 @@ const routes = (
|
||||
path="/tech-radar"
|
||||
element={<TechRadarPage width={1500} height={800} />}
|
||||
/>
|
||||
{
|
||||
/* HIGHLY EXPERIMENTAL. DO NOT USE THIS IN YOUR APP */ extensionTree?.getRootRoutes() ??
|
||||
null
|
||||
}
|
||||
<Route path="/lighthouse" element={<LighthousePage />} />
|
||||
<Route path="/api-docs" element={<ApiExplorerPage />} />
|
||||
<Route path="/gcp-projects" element={<GcpProjectsPage />} />
|
||||
@@ -302,7 +281,7 @@ export default app.createRoot(
|
||||
<OAuthRequestDialog />
|
||||
<AppRouter>
|
||||
<VisitListener />
|
||||
<Root extensionTree={extensionTree}>{routes}</Root>
|
||||
<Root>{routes}</Root>
|
||||
</AppRouter>
|
||||
</>,
|
||||
);
|
||||
|
||||
@@ -84,7 +84,6 @@ const SidebarLogo = () => {
|
||||
|
||||
export const Root = ({
|
||||
children,
|
||||
extensionTree,
|
||||
}: PropsWithChildren<{ extensionTree?: ExtensionTree }>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
@@ -166,10 +165,6 @@ export const Root = ({
|
||||
to="cost-insights"
|
||||
text="Cost Insights"
|
||||
/>
|
||||
{
|
||||
/* HIGHLY EXPERIMENTAL. DO NOT USE THIS IN YOUR APP */ extensionTree?.getSidebarItems() ??
|
||||
null
|
||||
}
|
||||
<SidebarItem icon={Score} to="score-board" text="Score board" />
|
||||
</SidebarScrollWrapper>
|
||||
<SidebarDivider />
|
||||
|
||||
Reference in New Issue
Block a user