add plugin title and icons
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-catalog-unprocessed-entities': patch
|
||||
'@backstage/plugin-devtools': patch
|
||||
'@backstage/plugin-home': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
'@backstage/plugin-search': patch
|
||||
'@backstage/plugin-techdocs': patch
|
||||
'@backstage/plugin-user-settings': patch
|
||||
---
|
||||
|
||||
Added `title` and `icon` to the plugin definition for the new frontend system.
|
||||
@@ -208,6 +208,8 @@ const apiDocsApisEntityContent = EntityContentBlueprint.make({
|
||||
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'api-docs',
|
||||
title: 'APIs',
|
||||
icon: <AppIcon id="kind:api" />,
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
routes: {
|
||||
root: rootRoute,
|
||||
|
||||
@@ -68,6 +68,8 @@ export const catalogUnprocessedEntitiesNavItem = NavItemBlueprint.make({
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'catalog-unprocessed-entities',
|
||||
title: 'Unprocessed Entities',
|
||||
icon: <QueueIcon />,
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
EntityHeaderBlueprint,
|
||||
EntityContentGroupDefinitions,
|
||||
} from '@backstage/plugin-catalog-react/alpha';
|
||||
import CategoryIcon from '@material-ui/icons/Category';
|
||||
import { rootRouteRef } from '../routes';
|
||||
import { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';
|
||||
import { buildFilterFn } from './filter/FilterWrapper';
|
||||
@@ -58,6 +59,8 @@ export const catalogPage = PageBlueprint.makeWithOverrides({
|
||||
return originalFactory({
|
||||
path: '/catalog',
|
||||
routeRef: rootRouteRef,
|
||||
icon: <CategoryIcon />,
|
||||
title: 'Catalog',
|
||||
loader: async () => {
|
||||
const { BaseCatalogPage } = await import('../components/CatalogPage');
|
||||
const filters = inputs.filters.map(filter =>
|
||||
@@ -116,6 +119,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { config, inputs }) {
|
||||
return originalFactory({
|
||||
path: '/catalog/:namespace/:kind/:name',
|
||||
title: 'Catalog Entity',
|
||||
// NOTE: The `convertLegacyRouteRef` call here ensures that this route ref
|
||||
// is mutated to support the new frontend system. Removing this conversion
|
||||
// is a potentially breaking change since this is a singleton and the
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { entityRouteRef } from '@backstage/plugin-catalog-react';
|
||||
import CategoryIcon from '@material-ui/icons/Category';
|
||||
|
||||
import {
|
||||
createComponentRouteRef,
|
||||
@@ -38,6 +39,8 @@ import contextMenuItems from './contextMenuItems';
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'catalog',
|
||||
title: 'Catalog',
|
||||
icon: <CategoryIcon />,
|
||||
info: {
|
||||
packageJson: () => import('../../package.json'),
|
||||
},
|
||||
|
||||
@@ -88,6 +88,8 @@ export const devToolsNavItem = NavItemBlueprint.make({
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'devtools',
|
||||
title: 'DevTools',
|
||||
icon: <BuildIcon />,
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
|
||||
@@ -208,6 +208,8 @@ const homePageRandomJokeWidget = HomePageWidgetBlueprint.make({
|
||||
*/
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'home',
|
||||
title: 'Home',
|
||||
icon: <HomeIcon />,
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [
|
||||
homePage,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
||||
import {
|
||||
actionsRouteRef,
|
||||
editRouteRef,
|
||||
@@ -59,6 +60,8 @@ const scaffolderEntityIconLink = EntityIconLinkBlueprint.make({
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'scaffolder',
|
||||
title: 'Create',
|
||||
icon: <CreateComponentIcon />,
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
|
||||
@@ -276,6 +276,8 @@ export const searchNavItem = NavItemBlueprint.make({
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'search',
|
||||
title: 'Search',
|
||||
icon: <SearchIcon />,
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [searchApi, searchPage, searchNavItem],
|
||||
routes: {
|
||||
|
||||
@@ -278,6 +278,8 @@ const techDocsNavItem = NavItemBlueprint.make({
|
||||
/** @alpha */
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'techdocs',
|
||||
title: 'Docs',
|
||||
icon: <LibraryBooks />,
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
extensions: [
|
||||
techDocsClientApi,
|
||||
|
||||
@@ -62,6 +62,8 @@ export const settingsNavItem = NavItemBlueprint.make({
|
||||
*/
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'user-settings',
|
||||
title: 'Settings',
|
||||
icon: <SettingsIcon />,
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
extensions: [userSettingsPage, settingsNavItem],
|
||||
routes: {
|
||||
|
||||
Reference in New Issue
Block a user