feat(create-app): add missing plugins

This commit is contained in:
Rémi DOREAU
2020-08-23 00:32:20 +02:00
parent c44f0e75b9
commit 6b1e63c2fc
4 changed files with 57 additions and 2 deletions
@@ -11,6 +11,12 @@
"@backstage/plugin-register-component": "^{{version}}",
"@backstage/plugin-scaffolder": "^{{version}}",
"@backstage/plugin-techdocs": "^{{version}}",
"@backstage/plugin-circleci": "^{{version}}",
"@backstage/plugin-explore": "^{{version}}",
"@backstage/plugin-lighthouse": "^{{version}}",
"@backstage/plugin-tech-radar": "^{{version}}",
"@backstage/plugin-github-actions": "^{{version}}",
"@backstage/plugin-sentry": "^{{version}}",
"@backstage/test-utils": "^{{version}}",
"@backstage/theme": "^{{version}}",
"history": "^5.0.0",
@@ -14,15 +14,33 @@ import {
WebStorage,
} from '@backstage/core';
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
import {
lighthouseApiRef,
LighthouseRestApi,
} from '@backstage/plugin-lighthouse';
import { scaffolderApiRef, ScaffolderApi } from '@backstage/plugin-scaffolder';
import {
GithubActionsClient,
githubActionsApiRef,
} from '@backstage/plugin-github-actions';
import {
techdocsStorageApiRef,
TechDocsStorageApi,
techdocsStorageApiRef,
TechDocsStorageApi,
} from '@backstage/plugin-techdocs';
import { techRadarApiRef, TechRadar } from '@backstage/plugin-tech-radar';
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
import { CircleCIApi, circleCIApiRef } from '@backstage/plugin-circleci';
import { scaffolderApiRef, ScaffolderApi } from '@backstage/plugin-scaffolder';
export const apis = (config: ConfigApi) => {
// eslint-disable-next-line no-console
console.log(`Creating APIs for ${config.getString('app.title')}`);
@@ -46,9 +64,25 @@ export const apis = (config: ConfigApi) => {
builder.add(oauthRequestApiRef, new OAuthRequestManager());
builder.add(catalogApiRef, new CatalogClient({ discoveryApi }));
builder.add(githubActionsApiRef, new GithubActionsClient());
builder.add(lighthouseApiRef, new LighthouseRestApi('http://localhost:3003'));
builder.add(
circleCIApiRef,
new CircleCIApi(`${backendUrl}/proxy/circleci/api`),
);
builder.add(scaffolderApiRef, new ScaffolderApi({ discoveryApi }));
builder.add(
techRadarApiRef,
new TechRadar({
width: 1500,
height: 800,
}),
);
builder.add(
techdocsStorageApiRef,
new TechDocsStorageApi({ apiOrigin: techdocsStorageUrl }),
@@ -2,3 +2,9 @@ export { plugin as CatalogPlugin } from '@backstage/plugin-catalog';
export { plugin as RegisterComponent } from '@backstage/plugin-register-component';
export { plugin as ScaffolderPlugin } from '@backstage/plugin-scaffolder';
export { plugin as TechDocsPlugin } from '@backstage/plugin-techdocs';
export { plugin as Explore } from '@backstage/plugin-explore';
export { plugin as Circleci } from '@backstage/plugin-circleci';
export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse';
export { plugin as TechRadar } from '@backstage/plugin-tech-radar';
export { plugin as GithubActions } from '@backstage/plugin-github-actions';
export { plugin as Sentry } from '@backstage/plugin-sentry';
@@ -2,6 +2,10 @@ import React from 'react';
import HomeIcon from '@material-ui/icons/Home';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import ExploreIcon from '@material-ui/icons/Explore';
import BuildIcon from '@material-ui/icons/BuildRounded';
import RuleIcon from '@material-ui/icons/AssignmentTurnedIn';
import MapIcon from '@material-ui/icons/MyLocation';
import {
Sidebar,
SidebarItem,
@@ -20,6 +24,11 @@ export const AppSidebar = () => (
<SidebarItem icon={HomeIcon} to="./" text="Home" />
<SidebarItem icon={LibraryBooks} to="/docs" text="Docs" />
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />
<SidebarItem icon={ExploreIcon} to="explore" text="Explore" />
<SidebarDivider />
<SidebarItem icon={MapIcon} to="tech-radar" text="Tech Radar" />
<SidebarItem icon={RuleIcon} to="lighthouse" text="Lighthouse" />
<SidebarItem icon={BuildIcon} to="circleci" text="CircleCI" />
{/* End global nav */}
<SidebarDivider />
<SidebarSpace />