Merge pull request #20325 from backstage/vinzscam/user-settings-new-backend

User settings: new backend system
This commit is contained in:
Vincenzo Scamporlino
2023-10-11 13:09:37 +02:00
committed by GitHub
11 changed files with 132 additions and 20 deletions
+23 -1
View File
@@ -14,10 +14,17 @@
* limitations under the License.
*/
import React from 'react';
import { createApp } from '@backstage/frontend-app-api';
import { pagesPlugin } from './examples/pagesPlugin';
import graphiqlPlugin from '@backstage/plugin-graphiql/alpha';
import techRadarPlugin from '@backstage/plugin-tech-radar/alpha';
import userSettingsPlugin from '@backstage/plugin-user-settings/alpha';
import {
createExtensionOverrides,
createPageExtension,
} from '@backstage/frontend-plugin-api';
import { entityRouteRef } from '@backstage/plugin-catalog-react';
/*
@@ -48,8 +55,23 @@ TODO:
/* app.tsx */
const entityPageExtension = createPageExtension({
id: 'catalog:entity',
defaultPath: '/catalog/:namespace/:kind/:name',
routeRef: entityRouteRef,
loader: async () => <div>Just a temporary mocked entity page</div>,
});
const app = createApp({
features: [graphiqlPlugin, pagesPlugin, techRadarPlugin],
features: [
graphiqlPlugin,
pagesPlugin,
techRadarPlugin,
userSettingsPlugin,
createExtensionOverrides({
extensions: [entityPageExtension],
}),
],
// bindRoutes({ bind }) {
// bind(catalogPlugin.externalRoutes, {
// createComponent: scaffolderPlugin.routes.root,
@@ -50,6 +50,9 @@ const IndexPage = createPageExtension({
<div>
<Link to="/search">Search</Link>
</div>
<div>
<Link to="/settings">Settings</Link>
</div>
</div>
);
};