Merge pull request #6124 from backstage/rugvip/noroutes
plugins,dev-utils: remove usage of deprecated route registrations
This commit is contained in:
@@ -14,7 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { newRelicPlugin } from '../src/plugin';
|
||||
import { newRelicPlugin, NewRelicPage } from '../src/plugin';
|
||||
|
||||
createDevApp().registerPlugin(newRelicPlugin).render();
|
||||
createDevApp()
|
||||
.registerPlugin(newRelicPlugin)
|
||||
.addPage({
|
||||
title: 'New Relic',
|
||||
element: <NewRelicPage />,
|
||||
})
|
||||
.render();
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core';
|
||||
import { NewRelicClient, newRelicApiRef } from './api';
|
||||
import NewRelicComponent from './components/NewRelicComponent';
|
||||
|
||||
export const rootRouteRef = createRouteRef({
|
||||
path: '/newrelic',
|
||||
@@ -38,9 +37,6 @@ export const newRelicPlugin = createPlugin({
|
||||
factory: ({ discoveryApi }) => new NewRelicClient({ discoveryApi }),
|
||||
}),
|
||||
],
|
||||
register({ router }) {
|
||||
router.addRoute(rootRouteRef, NewRelicComponent);
|
||||
},
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user