Merge branch 'master' into cost-insights-comparable-metrics

This commit is contained in:
Ryan Vazquez
2020-10-13 16:06:15 -04:00
141 changed files with 2729 additions and 1223 deletions
+30 -29
View File
@@ -1,40 +1,41 @@
{
"name": "example-app",
"version": "0.1.1-alpha.24",
"version": "0.1.1-alpha.25",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.1.1-alpha.24",
"@backstage/cli": "^0.1.1-alpha.24",
"@backstage/core": "^0.1.1-alpha.24",
"@backstage/plugin-api-docs": "^0.1.1-alpha.24",
"@backstage/plugin-catalog": "^0.1.1-alpha.24",
"@backstage/plugin-circleci": "^0.1.1-alpha.24",
"@backstage/plugin-cloudbuild": "^0.1.1-alpha.24",
"@backstage/plugin-cost-insights": "^0.1.1-alpha.24",
"@backstage/plugin-explore": "^0.1.1-alpha.24",
"@backstage/plugin-gcp-projects": "^0.1.1-alpha.24",
"@backstage/plugin-github-actions": "^0.1.1-alpha.24",
"@backstage/plugin-gitops-profiles": "^0.1.1-alpha.24",
"@backstage/plugin-graphiql": "^0.1.1-alpha.24",
"@backstage/plugin-jenkins": "^0.1.1-alpha.24",
"@backstage/plugin-kubernetes": "^0.1.1-alpha.24",
"@backstage/plugin-lighthouse": "^0.1.1-alpha.24",
"@backstage/plugin-newrelic": "^0.1.1-alpha.24",
"@backstage/plugin-register-component": "^0.1.1-alpha.24",
"@backstage/plugin-rollbar": "^0.1.1-alpha.24",
"@backstage/plugin-scaffolder": "^0.1.1-alpha.24",
"@backstage/plugin-sentry": "^0.1.1-alpha.24",
"@backstage/plugin-tech-radar": "^0.1.1-alpha.24",
"@backstage/plugin-techdocs": "^0.1.1-alpha.24",
"@backstage/plugin-user-settings": "^0.1.1-alpha.24",
"@backstage/plugin-welcome": "^0.1.1-alpha.24",
"@backstage/test-utils": "^0.1.1-alpha.24",
"@backstage/theme": "^0.1.1-alpha.24",
"@backstage/catalog-model": "^0.1.1-alpha.25",
"@backstage/cli": "^0.1.1-alpha.25",
"@backstage/core": "^0.1.1-alpha.25",
"@backstage/plugin-api-docs": "^0.1.1-alpha.25",
"@backstage/plugin-catalog": "^0.1.1-alpha.25",
"@backstage/plugin-circleci": "^0.1.1-alpha.25",
"@backstage/plugin-cloudbuild": "^0.1.1-alpha.25",
"@backstage/plugin-cost-insights": "^0.1.1-alpha.25",
"@backstage/plugin-explore": "^0.1.1-alpha.25",
"@backstage/plugin-gcp-projects": "^0.1.1-alpha.25",
"@backstage/plugin-github-actions": "^0.1.1-alpha.25",
"@backstage/plugin-gitops-profiles": "^0.1.1-alpha.25",
"@backstage/plugin-graphiql": "^0.1.1-alpha.25",
"@backstage/plugin-jenkins": "^0.1.1-alpha.25",
"@backstage/plugin-kubernetes": "^0.1.1-alpha.25",
"@backstage/plugin-lighthouse": "^0.1.1-alpha.25",
"@backstage/plugin-newrelic": "^0.1.1-alpha.25",
"@backstage/plugin-register-component": "^0.1.1-alpha.25",
"@backstage/plugin-rollbar": "^0.1.1-alpha.25",
"@backstage/plugin-scaffolder": "^0.1.1-alpha.25",
"@backstage/plugin-sentry": "^0.1.1-alpha.25",
"@backstage/plugin-tech-radar": "^0.1.1-alpha.25",
"@backstage/plugin-techdocs": "^0.1.1-alpha.25",
"@backstage/plugin-user-settings": "^0.1.1-alpha.25",
"@backstage/plugin-welcome": "^0.1.1-alpha.25",
"@backstage/test-utils": "^0.1.1-alpha.25",
"@backstage/theme": "^0.1.1-alpha.25",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@octokit/rest": "^18.0.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.4.3",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.5.1",
"@roadiehq/backstage-plugin-github-insights": "^0.2.2",
"@roadiehq/backstage-plugin-travis-ci": "^0.2.3",
"dayjs": "^1.9.1",
"history": "^5.0.0",
@@ -40,6 +40,13 @@ import { Router as ApiDocsRouter } from '@backstage/plugin-api-docs';
import { Router as SentryRouter } from '@backstage/plugin-sentry';
import { EmbeddedDocsRouter as DocsRouter } from '@backstage/plugin-techdocs';
import { Router as KubernetesRouter } from '@backstage/plugin-kubernetes';
import {
Router as GitHubInsightsRouter,
isPluginApplicableToEntity as isGitHubAvailable,
ReadMeCard,
LanguagesCard,
ReleasesCard,
} from '@roadiehq/backstage-plugin-github-insights';
import React, { ReactNode } from 'react';
import {
AboutCard,
@@ -54,6 +61,11 @@ import {
LastLighthouseAuditCard,
isPluginApplicableToEntity as isLighthouseAvailable,
} from '@backstage/plugin-lighthouse/';
import {
Router as PullRequestsRouter,
isPluginApplicableToEntity as isPullRequestsAvailable,
PullRequestsStatsCard,
} from '@roadiehq/backstage-plugin-github-pull-requests';
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
// This component is just an example of how you can implement your company's logic in entity page.
@@ -120,11 +132,27 @@ const OverviewContent = ({ entity }: { entity: Entity }) => (
<AboutCard entity={entity} />
</Grid>
<RecentCICDRunsSwitcher entity={entity} />
{isGitHubAvailable(entity) && (
<>
<Grid item md={6}>
<LanguagesCard entity={entity} />
<ReleasesCard entity={entity} />
</Grid>
<Grid item md={6}>
<ReadMeCard entity={entity} maxHeight={350} />
</Grid>
</>
)}
{isLighthouseAvailable(entity) && (
<Grid item sm={4}>
<LastLighthouseAuditCard />
</Grid>
)}
{isPullRequestsAvailable(entity) && (
<Grid item sm={4}>
<PullRequestsStatsCard entity={entity} />
</Grid>
)}
</Grid>
);
@@ -160,6 +188,16 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/pull-requests"
title="Pull Requests"
element={<PullRequestsRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/code-insights"
title="Code Insights"
element={<GitHubInsightsRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -195,6 +233,16 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/pull-requests"
title="Pull Requests"
element={<PullRequestsRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/code-insights"
title="Code Insights"
element={<GitHubInsightsRouter entity={entity} />}
/>
</EntityPageLayout>
);
const DefaultEntityPage = ({ entity }: { entity: Entity }) => (
+1
View File
@@ -36,4 +36,5 @@ export { plugin as GcpProjects } from '@backstage/plugin-gcp-projects';
export { plugin as Kubernetes } from '@backstage/plugin-kubernetes';
export { plugin as Cloudbuild } from '@backstage/plugin-cloudbuild';
export { plugin as CostInsights } from '@backstage/plugin-cost-insights';
export { plugin as GitHubInsights } from '@roadiehq/backstage-plugin-github-insights';
export { plugin as UserSettings } from '@backstage/plugin-user-settings';