chore: fix typescript

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-04-19 18:35:20 +02:00
parent 8b50969764
commit f9f56ddaf7
44 changed files with 58 additions and 1309 deletions
+1
View File
@@ -52,6 +52,7 @@
"@backstage/plugin-catalog-import": "workspace:^",
"@backstage/plugin-catalog-react": "workspace:^",
"@backstage/plugin-catalog-unprocessed-entities": "workspace:^",
"@backstage/plugin-devtools": "workspace:^",
"@backstage/plugin-home": "workspace:^",
"@backstage/plugin-kubernetes": "workspace:^",
"@backstage/plugin-kubernetes-cluster": "workspace:^",
+4 -42
View File
@@ -34,8 +34,6 @@ import {
SignInPage,
} from '@backstage/core-components';
import { apiDocsPlugin, ApiExplorerPage } from '@backstage/plugin-api-docs';
import { AzurePullRequestsPage } from '@backstage/plugin-azure-devops';
import {
CatalogEntityPage,
CatalogIndexPage,
@@ -47,24 +45,15 @@ import {
CatalogImportPage,
catalogImportPlugin,
} from '@backstage/plugin-catalog-import';
import {
CostInsightsLabelDataflowInstructionsPage,
CostInsightsPage,
CostInsightsProjectGrowthInstructionsPage,
} from '@backstage/plugin-cost-insights';
import { orgPlugin } from '@backstage/plugin-org';
import { ExplorePage } from '@backstage/plugin-explore';
import { GcpProjectsPage } from '@backstage/plugin-gcp-projects';
import { HomepageCompositionRoot, VisitListener } from '@backstage/plugin-home';
import { LighthousePage } from '@backstage/plugin-lighthouse';
import { NewRelicPage } from '@backstage/plugin-newrelic';
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
import {
ScaffolderFieldExtensions,
ScaffolderLayouts,
} from '@backstage/plugin-scaffolder-react';
import { SearchPage } from '@backstage/plugin-search';
import { TechRadarPage } from '@backstage/plugin-tech-radar';
import {
TechDocsIndexPage,
techdocsPlugin,
@@ -96,16 +85,11 @@ import { providers } from './identityProviders';
import * as plugins from './plugins';
import { techDocsPage } from './components/techdocs/TechDocsPage';
import { ApacheAirflowPage } from '@backstage/plugin-apache-airflow';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import { PlaylistIndexPage, PlaylistPage } from '@backstage/plugin-playlist';
import { TwoColumnLayout } from './components/scaffolder/customScaffolderLayouts';
import { ScoreBoardPage } from '@oriflame/backstage-plugin-score-card';
import { StackstormPage } from '@backstage/plugin-stackstorm';
import { PuppetDbPage } from '@backstage/plugin-puppetdb';
import { DevToolsPage } from '@backstage/plugin-devtools';
import { customDevToolsPage } from './components/devtools/CustomDevToolsPage';
import { DevToolsPage } from '@backstage/plugin-devtools';
import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unprocessed-entities';
import { NotificationsPage } from '@backstage/plugin-notifications';
@@ -237,39 +221,17 @@ const routes = (
<TwoColumnLayout />
</ScaffolderLayouts>
</Route>
<Route path="/explore" element={<ExplorePage />} />
<Route
path="/tech-radar"
element={<TechRadarPage width={1500} height={800} />}
/>
<Route path="/lighthouse" element={<LighthousePage />} />
<Route path="/api-docs" element={<ApiExplorerPage />} />
<Route path="/gcp-projects" element={<GcpProjectsPage />} />
<Route path="/newrelic" element={<NewRelicPage />} />
<Route path="/search" element={<SearchPage />}>
{searchPage}
</Route>
<Route path="/cost-insights" element={<CostInsightsPage />} />
<Route
path="/cost-insights/investigating-growth"
element={<CostInsightsProjectGrowthInstructionsPage />}
/>
<Route
path="/cost-insights/labeling-jobs"
element={<CostInsightsLabelDataflowInstructionsPage />}
/>
<Route path="/settings" element={<UserSettingsPage />}>
<SettingsLayout.Route path="/advanced" title="Advanced">
<AdvancedSettings />
</SettingsLayout.Route>
</Route>
<Route path="/azure-pull-requests" element={<AzurePullRequestsPage />} />
<Route path="/apache-airflow" element={<ApacheAirflowPage />} />
<Route path="/playlist" element={<PlaylistIndexPage />} />
<Route path="/playlist/:playlistId" element={<PlaylistPage />} />
<Route path="/score-board" element={<ScoreBoardPage />} />
<Route path="/stackstorm" element={<StackstormPage />} />
<Route path="/puppetdb" element={<PuppetDbPage />} />
<Route path="/devtools" element={<DevToolsPage />}>
{customDevToolsPage}
</Route>
-38
View File
@@ -19,22 +19,11 @@ import {
scmIntegrationsApiRef,
ScmAuth,
} from '@backstage/integration-react';
import {
costInsightsApiRef,
ExampleCostInsightsClient,
} from '@backstage/plugin-cost-insights';
import {
graphQlBrowseApiRef,
GraphQLEndpoints,
} from '@backstage/plugin-graphiql';
import {
AnyApiFactory,
configApiRef,
createApiFactory,
discoveryApiRef,
errorApiRef,
fetchApiRef,
githubAuthApiRef,
} from '@backstage/core-plugin-api';
import { AuthProxyDiscoveryApi } from './AuthProxyDiscoveryApi';
@@ -51,31 +40,4 @@ export const apis: AnyApiFactory[] = [
}),
ScmAuth.createDefaultApiFactory(),
createApiFactory({
api: graphQlBrowseApiRef,
deps: {
errorApi: errorApiRef,
fetchApi: fetchApiRef,
githubAuthApi: githubAuthApiRef,
},
factory: ({ errorApi, fetchApi, githubAuthApi }) =>
GraphQLEndpoints.from([
GraphQLEndpoints.create({
id: 'gitlab',
title: 'GitLab',
url: 'https://gitlab.com/api/graphql',
fetchApi,
}),
GraphQLEndpoints.github({
id: 'github',
title: 'GitHub',
errorApi,
fetchApi,
githubAuthApi,
}),
]),
}),
createApiFactory(costInsightsApiRef, new ExampleCostInsightsClient()),
];
@@ -32,7 +32,6 @@ import {
UserSettingsSignInAvatar,
} from '@backstage/plugin-user-settings';
import { SidebarSearchModal } from '@backstage/plugin-search';
import { Shortcuts } from '@backstage/plugin-shortcuts';
import {
Link,
Sidebar,
@@ -166,7 +165,6 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarItem icon={Score} to="score-board" text="Score board" />
</SidebarScrollWrapper>
<SidebarDivider />
<Shortcuts allowExternalLinks />
<SidebarDivider />
<NotificationsSidebarItem />
</SidebarGroup>
@@ -20,7 +20,6 @@ import {
starredEntitiesApiRef,
MockStarredEntitiesApi,
} from '@backstage/plugin-catalog-react';
import { githubActionsApiRef } from '@backstage/plugin-github-actions';
import { permissionApiRef } from '@backstage/plugin-permission-react';
import {
MockPermissionApi,
@@ -47,9 +46,6 @@ describe('EntityPage Test', () => {
},
};
const mockedApi = {
listWorkflowRuns: jest.fn().mockResolvedValue([]),
};
const mockPermissionApi = new MockPermissionApi();
const rootRouteRef = catalogPlugin.routes.catalogIndex;
@@ -58,7 +54,6 @@ describe('EntityPage Test', () => {
const rendered = await renderInTestApp(
<TestApiProvider
apis={[
[githubActionsApiRef, mockedApi],
[starredEntitiesApiRef, new MockStarredEntitiesApi()],
[permissionApiRef, mockPermissionApi],
]}
@@ -15,7 +15,6 @@
*/
import {
Entity,
RELATION_API_CONSUMED_BY,
RELATION_API_PROVIDED_BY,
RELATION_CONSUMES_API,
@@ -25,8 +24,7 @@ import {
RELATION_PART_OF,
RELATION_PROVIDES_API,
} from '@backstage/catalog-model';
import { EmptyState, InfoCard } from '@backstage/core-components';
import { EntityAdrContent, isAdrAvailable } from '@backstage/plugin-adr';
import { EmptyState } from '@backstage/core-components';
import {
EntityApiDefinitionCard,
EntityConsumedApisCard,
@@ -35,19 +33,6 @@ import {
EntityProvidedApisCard,
EntityProvidingComponentsCard,
} from '@backstage/plugin-api-docs';
import {
EntityAzurePipelinesContent,
EntityAzureGitTagsContent,
EntityAzurePullRequestsContent,
isAzureDevOpsAvailable,
isAzurePipelinesAvailable,
EntityAzureReadmeCard,
} from '@backstage/plugin-azure-devops';
import {
isOctopusDeployAvailable,
EntityOctopusDeployContent,
} from '@backstage/plugin-octopus-deploy';
import { EntityBadgesDialog } from '@backstage/plugin-badges';
import {
EntityAboutCard,
EntityDependsOnComponentsCard,
@@ -74,158 +59,39 @@ import {
Direction,
EntityCatalogGraphCard,
} from '@backstage/plugin-catalog-graph';
import {
EntityCircleCIContent,
isCircleCIAvailable,
} from '@circleci/backstage-plugin';
import {
EntityCloudbuildContent,
isCloudbuildAvailable,
} from '@backstage/plugin-cloudbuild';
import { EntityCodeCoverageContent } from '@backstage/plugin-code-coverage';
import {
DynatraceTab,
isDynatraceAvailable,
} from '@backstage/plugin-dynatrace';
import {
EntityFeedbackResponseContent,
EntityLikeDislikeRatingsCard,
LikeDislikeButtons,
} from '@backstage/plugin-entity-feedback';
import {
EntityGithubActionsContent,
EntityRecentGithubActionsRunsCard,
isGithubActionsAvailable,
} from '@backstage/plugin-github-actions';
import {
EntityJenkinsContent,
EntityLatestJenkinsRunCard,
isJenkinsAvailable,
} from '@backstage/plugin-jenkins';
import { EntityKafkaContent } from '@backstage/plugin-kafka';
import { EntityKubernetesContent } from '@backstage/plugin-kubernetes';
import {
isKubernetesClusterAvailable,
EntityKubernetesClusterContent,
} from '@backstage/plugin-kubernetes-cluster';
import {
EntityLastLighthouseAuditCard,
EntityLighthouseContent,
isLighthouseAvailable,
} from '@backstage/plugin-lighthouse';
import {
EntityGroupProfileCard,
EntityMembersListCard,
EntityOwnershipCard,
EntityUserProfileCard,
} from '@backstage/plugin-org';
import {
EntityNomadAllocationListTable,
EntityNomadJobVersionListCard,
isNomadAllocationsAvailable,
isNomadJobIDAvailable,
} from '@backstage/plugin-nomad';
import {
EntityPagerDutyCard,
isPagerDutyAvailable,
} from '@backstage/plugin-pagerduty';
import { EntityPlaylistDialog } from '@backstage/plugin-playlist';
import {
EntityRollbarContent,
isRollbarAvailable,
} from '@backstage/plugin-rollbar';
import { PuppetDbPage, isPuppetDbAvailable } from '@backstage/plugin-puppetdb';
import { EntitySentryContent } from '@backstage/plugin-sentry';
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
import { EntityTechInsightsScorecardCard } from '@backstage/plugin-tech-insights';
import { EntityTodoContent } from '@backstage/plugin-todo';
import { Button, Grid } from '@material-ui/core';
import BadgeIcon from '@material-ui/icons/CallToAction';
import PlaylistAddIcon from '@material-ui/icons/PlaylistAdd';
import {
EntityGithubInsightsContent,
EntityGithubInsightsLanguagesCard,
EntityGithubInsightsReadmeCard,
EntityGithubInsightsReleasesCard,
isGithubInsightsAvailable,
} from '@roadiehq/backstage-plugin-github-insights';
import {
EntityGithubPullRequestsContent,
EntityGithubPullRequestsOverviewCard,
isGithubPullRequestsAvailable,
} from '@roadiehq/backstage-plugin-github-pull-requests';
import {
EntityTravisCIContent,
EntityTravisCIOverviewCard,
isTravisciAvailable,
} from '@roadiehq/backstage-plugin-travis-ci';
import {
EntityBuildkiteContent,
isBuildkiteAvailable,
} from '@roadiehq/backstage-plugin-buildkite';
import {
isNewRelicDashboardAvailable,
EntityNewRelicDashboardContent,
EntityNewRelicDashboardCard,
} from '@backstage/plugin-newrelic-dashboard';
import { EntityGoCdContent, isGoCdAvailable } from '@backstage/plugin-gocd';
import { EntityScoreCardContent } from '@oriflame/backstage-plugin-score-card';
import React, { ReactNode, useMemo, useState } from 'react';
import React, { ReactNode } from 'react';
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
import {
TextSize,
ReportIssue,
LightBox,
} from '@backstage/plugin-techdocs-module-addons-contrib';
import { EntityCostInsightsContent } from '@backstage/plugin-cost-insights';
import {
isLinguistAvailable,
EntityLinguistCard,
} from '@backstage/plugin-linguist';
import { EntityTeamPullRequestsContent } from '@backstage/plugin-github-pull-requests-board';
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
const customEntityFilterKind = ['Component', 'API', 'System'];
const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);
const [playlistDialogOpen, setPlaylistDialogOpen] = useState(false);
const extraMenuItems = useMemo(() => {
return [
{
title: 'Badges',
Icon: BadgeIcon,
onClick: () => setBadgesDialogOpen(true),
},
{
title: 'Add to playlist',
Icon: PlaylistAddIcon,
onClick: () => setPlaylistDialogOpen(true),
},
];
}, []);
return (
<>
<EntityLayout
UNSTABLE_extraContextMenuItems={extraMenuItems}
UNSTABLE_contextMenuOptions={{
disableUnregister: 'visible',
}}
>
{props.children}
</EntityLayout>
<EntityBadgesDialog
open={badgesDialogOpen}
onClose={() => setBadgesDialogOpen(false)}
/>
<EntityPlaylistDialog
open={playlistDialogOpen}
onClose={() => setPlaylistDialogOpen(false)}
/>
</>
);
};
@@ -249,42 +115,6 @@ const techdocsContent = (
export const cicdContent = (
<EntitySwitch>
<EntitySwitch.Case if={isJenkinsAvailable}>
<EntityJenkinsContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isBuildkiteAvailable}>
<EntityBuildkiteContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isCircleCIAvailable}>
<EntityCircleCIContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isCloudbuildAvailable}>
<EntityCloudbuildContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isTravisciAvailable}>
<EntityTravisCIContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isGoCdAvailable}>
<EntityGoCdContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isGithubActionsAvailable}>
<EntityGithubActionsContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isAzurePipelinesAvailable}>
<EntityAzurePipelinesContent defaultLimit={25} />
</EntitySwitch.Case>
<EntitySwitch.Case if={isOctopusDeployAvailable}>
<EntityOctopusDeployContent defaultLimit={25} />
</EntitySwitch.Case>
<EntitySwitch.Case>
<EmptyState
title="No CI/CD available for this entity"
@@ -304,28 +134,6 @@ export const cicdContent = (
</EntitySwitch>
);
const cicdCard = (
<EntitySwitch>
<EntitySwitch.Case if={isJenkinsAvailable}>
<Grid item sm={6}>
<EntityLatestJenkinsRunCard branch="master" variant="gridItem" />
</Grid>
</EntitySwitch.Case>
<EntitySwitch.Case if={isTravisciAvailable as (e: Entity) => boolean}>
<Grid item sm={6}>
<EntityTravisCIOverviewCard />
</Grid>
</EntitySwitch.Case>
<EntitySwitch.Case if={isGithubActionsAvailable}>
<Grid item sm={6}>
<EntityRecentGithubActionsRunsCard limit={4} variant="gridItem" />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
);
const entityWarningContent = (
<>
<EntitySwitch>
@@ -354,30 +162,6 @@ const entityWarningContent = (
</>
);
const errorsContent = (
<EntitySwitch>
<EntitySwitch.Case if={isRollbarAvailable}>
<EntityRollbarContent />
</EntitySwitch.Case>
<EntitySwitch.Case>
<EntitySentryContent />
</EntitySwitch.Case>
</EntitySwitch>
);
const pullRequestsContent = (
<EntitySwitch>
<EntitySwitch.Case if={isAzureDevOpsAvailable}>
<EntityAzurePullRequestsContent defaultLimit={25} />
</EntitySwitch.Case>
<EntitySwitch.Case>
<EntityGithubPullRequestsContent />
</EntitySwitch.Case>
</EntitySwitch>
);
const overviewContent = (
<Grid container spacing={3} alignItems="stretch">
{entityWarningContent}
@@ -389,22 +173,6 @@ const overviewContent = (
<EntityCatalogGraphCard variant="gridItem" height={400} />
</Grid>
<EntitySwitch>
<EntitySwitch.Case if={isPagerDutyAvailable}>
<Grid item md={6}>
<EntityPagerDutyCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isNewRelicDashboardAvailable}>
<Grid item md={6} xs={12}>
<EntityNewRelicDashboardCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<Grid item md={4} xs={12}>
<EntityLinksCard />
</Grid>
@@ -417,69 +185,9 @@ const overviewContent = (
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isAzureDevOpsAvailable}>
<Grid item md={6}>
<EntityAzureReadmeCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<Grid item md={2}>
<InfoCard title="Rate this entity">
<LikeDislikeButtons />
</InfoCard>
</Grid>
{cicdCard}
<EntitySwitch>
<EntitySwitch.Case if={isGithubInsightsAvailable}>
<Grid item md={6}>
<EntityGithubInsightsLanguagesCard />
<EntityGithubInsightsReleasesCard />
</Grid>
<Grid item md={6}>
<EntityGithubInsightsReadmeCard maxHeight={350} />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isLighthouseAvailable}>
<Grid item sm={4}>
<EntityLastLighthouseAuditCard variant="gridItem" />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isGithubPullRequestsAvailable}>
<Grid item sm={4}>
<EntityGithubPullRequestsOverviewCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isLinguistAvailable}>
<Grid item md={6}>
<EntityLinguistCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<Grid item md={8} xs={12}>
<EntityHasSubcomponentsCard variant="gridItem" />
</Grid>
<EntitySwitch>
<EntitySwitch.Case if={isNomadJobIDAvailable}>
<Grid item md={6} xs={12}>
<EntityNomadJobVersionListCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
</Grid>
);
@@ -493,10 +201,6 @@ const serviceEntityPage = (
{cicdContent}
</EntityLayout.Route>
<EntityLayout.Route path="/errors" title="Errors">
{errorsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/api" title="API">
<Grid container spacing={3} alignItems="stretch">
<Grid item xs={12} md={6}>
@@ -523,83 +227,9 @@ const serviceEntityPage = (
{techdocsContent}
</EntityLayout.Route>
<EntityLayout.Route if={isAdrAvailable} path="/adrs" title="ADRS">
<EntityAdrContent />
</EntityLayout.Route>
<EntityLayout.Route
if={isNewRelicDashboardAvailable}
path="/newrelic-dashboard"
title="New Relic Dashboard"
>
<EntityNewRelicDashboardContent />
</EntityLayout.Route>
<EntityLayout.Route path="/kubernetes" title="Kubernetes">
<EntityKubernetesContent />
</EntityLayout.Route>
<EntityLayout.Route
if={isNomadAllocationsAvailable}
path="/nomad"
title="Nomad"
>
<EntityNomadAllocationListTable />
</EntityLayout.Route>
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
{pullRequestsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/code-insights" title="Code Insights">
<EntityGithubInsightsContent />
</EntityLayout.Route>
<EntityLayout.Route path="/tech-insights" title="Scorecards">
<Grid container spacing={3} alignItems="stretch">
<Grid item xs={12} md={6}>
<EntityTechInsightsScorecardCard
title="Scorecard 1"
description="This is a sample scorecard no. 1"
checksId={['titleCheck']}
/>
</Grid>
<Grid item xs={12} md={6}>
<EntityTechInsightsScorecardCard
title="Scorecard 2"
checksId={['techDocsCheck']}
/>
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/code-coverage" title="Code Coverage">
<EntityCodeCoverageContent />
</EntityLayout.Route>
<EntityLayout.Route path="/kafka" title="Kafka">
<EntityKafkaContent />
</EntityLayout.Route>
<EntityLayout.Route path="/todos" title="TODOs">
<EntityTodoContent />
</EntityLayout.Route>
<EntityLayout.Route path="/costs" title="Costs">
<EntityCostInsightsContent />
</EntityLayout.Route>
<EntityLayout.Route
path="/dynatrace"
title="Dynatrace"
if={isDynatraceAvailable}
>
<DynatraceTab />
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -613,14 +243,6 @@ const websiteEntityPage = (
{cicdContent}
</EntityLayout.Route>
<EntityLayout.Route path="/lighthouse" title="Lighthouse">
<EntityLighthouseContent />
</EntityLayout.Route>
<EntityLayout.Route path="/errors" title="Errors">
{errorsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/dependencies" title="Dependencies">
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
@@ -636,53 +258,9 @@ const websiteEntityPage = (
{techdocsContent}
</EntityLayout.Route>
<EntityLayout.Route
if={isNewRelicDashboardAvailable}
path="/newrelic-dashboard"
title="New Relic Dashboard"
>
<EntityNewRelicDashboardContent />
</EntityLayout.Route>
<EntityLayout.Route path="/kubernetes" title="Kubernetes">
<EntityKubernetesContent />
</EntityLayout.Route>
<EntityLayout.Route
path="/dynatrace"
title="Dynatrace"
if={isDynatraceAvailable}
>
<DynatraceTab />
</EntityLayout.Route>
<EntityLayout.Route
if={isAzureDevOpsAvailable}
path="/git-tags"
title="Git Tags"
>
<EntityAzureGitTagsContent />
</EntityLayout.Route>
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
{pullRequestsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/code-insights" title="Code Insights">
<EntityGithubInsightsContent />
</EntityLayout.Route>
<EntityLayout.Route path="/code-coverage" title="Code Coverage">
<EntityCodeCoverageContent />
</EntityLayout.Route>
<EntityLayout.Route path="/todos" title="TODOs">
<EntityTodoContent />
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -695,14 +273,6 @@ const defaultEntityPage = (
<EntityLayout.Route path="/docs" title="Docs">
{techdocsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/todos" title="TODOs">
<EntityTodoContent />
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -739,11 +309,6 @@ const apiPage = (
<Grid item xs={12} md={6}>
<EntityConsumingComponentsCard />
</Grid>
<Grid item md={2}>
<InfoCard title="Rate this entity">
<LikeDislikeButtons />
</InfoCard>
</Grid>
</Grid>
</Grid>
</Grid>
@@ -756,10 +321,6 @@ const apiPage = (
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -777,9 +338,6 @@ const userPage = (
entityFilterKind={customEntityFilterKind}
/>
</Grid>
<Grid item xs={12}>
<EntityLikeDislikeRatingsCard />
</Grid>
</Grid>
</EntityLayout.Route>
</EntityLayoutWrapper>
@@ -805,14 +363,8 @@ const groupPage = (
<Grid item xs={12} md={6}>
<EntityLinksCard />
</Grid>
<Grid item xs={12}>
<EntityLikeDislikeRatingsCard />
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
<EntityTeamPullRequestsContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -836,18 +388,6 @@ const systemPage = (
<Grid item md={6}>
<EntityHasResourcesCard variant="gridItem" />
</Grid>
<Grid item md={2}>
<InfoCard title="Rate this entity">
<LikeDislikeButtons />
</InfoCard>
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/score" title="Score">
<Grid container spacing={3} alignItems="stretch">
<Grid item xs={12}>
<EntityScoreCardContent />
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/diagram" title="Diagram">
@@ -869,9 +409,6 @@ const systemPage = (
unidirectional={false}
/>
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -889,16 +426,8 @@ const domainPage = (
<Grid item md={6}>
<EntityHasSystemsCard variant="gridItem" />
</Grid>
<Grid item md={2}>
<InfoCard title="Rate this entity">
<LikeDislikeButtons />
</InfoCard>
</Grid>
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/feedback" title="Feedback">
<EntityFeedbackResponseContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -925,16 +454,6 @@ const resourcePage = (
>
<EntityKubernetesClusterContent />
</EntityLayout.Route>
<EntityLayout.Route
path="/puppetdb"
title="Puppet"
if={isPuppetDbAvailable}
>
<PuppetDbPage />
</EntityLayout.Route>
<EntityLayout.Route path="/todos" title="TODOs">
<EntityTodoContent />
</EntityLayout.Route>
</EntityLayoutWrapper>
);
@@ -28,11 +28,8 @@ import {
} from '@backstage/plugin-home';
import { Content, Header, Page } from '@backstage/core-components';
import { HomePageSearchBar } from '@backstage/plugin-search';
import { HomePageCalendar } from '@backstage/plugin-gcalendar';
import { MicrosoftCalendarCard } from '@backstage/plugin-microsoft-calendar';
import React from 'react';
import HomeIcon from '@material-ui/icons/Home';
import { HomePagePagerDutyCard } from '@backstage/plugin-pagerduty';
const clockConfigs: ClockConfig[] = [
{
@@ -98,9 +95,6 @@ export const homePage = (
<CustomHomepageGrid config={defaultConfig}>
<HomePageSearchBar />
<HomePageRandomJoke />
<HomePageCalendar />
<HomePagePagerDutyCard name="Rota" />
<MicrosoftCalendarCard />
<HomePageStarredEntities />
<HomePageCompanyLogo />
<WelcomeTitle />
@@ -30,8 +30,6 @@ import { configApiRef } from '@backstage/core-plugin-api';
import { ConfigReader } from '@backstage/config';
import { searchApiRef } from '@backstage/plugin-search-react';
import { HomePageSearchBar, searchPlugin } from '@backstage/plugin-search';
import { HomePageCalendar } from '@backstage/plugin-gcalendar';
import { MicrosoftCalendarCard } from '@backstage/plugin-microsoft-calendar';
import React, { ComponentType } from 'react';
const entities = [
@@ -145,8 +143,6 @@ export const CustomizableTemplate = () => {
// remove the widgets as they want.
<HomePageSearchBar />
<HomePageRandomJoke />
<HomePageCalendar />
<MicrosoftCalendarCard />
<HomePageStarredEntities />
</CustomHomepageGrid>
);
@@ -36,7 +36,6 @@ import {
searchApiRef,
SearchContextProvider,
} from '@backstage/plugin-search-react';
import { stackOverflowApiRef, HomePageStackOverflowQuestions } from '@backstage/plugin-stack-overflow';
import { Grid, makeStyles } from '@material-ui/core';
import React, { ComponentType, PropsWithChildren } from 'react';
@@ -79,25 +78,6 @@ const mockCatalogApi = {
getEntities: async () => ({ items: entities }),
};
const mockStackOverflowApi = {
listQuestions: async () => [
{
title: 'Customizing Spotify backstage UI',
link: 'stackoverflow.question/1',
answer_count: 0,
tags: ['backstage'],
owner: { 'some owner': 'name' },
},
{
title: 'Customizing Spotify backstage UI',
link: 'stackoverflow.question/1',
answer_count: 0,
tags: ['backstage'],
owner: { 'some owner': 'name' },
},
],
};
const starredEntitiesApi = new MockStarredEntitiesApi();
starredEntitiesApi.toggleStarred('component:default/example-starred-entity');
starredEntitiesApi.toggleStarred('component:default/example-starred-entity-2');
@@ -112,7 +92,6 @@ export default {
<>
<TestApiProvider
apis={[
[stackOverflowApiRef, mockStackOverflowApi],
[catalogApiRef, mockCatalogApi],
[starredEntitiesApiRef, starredEntitiesApi],
[searchApiRef, { query: () => Promise.resolve({ results: [] }) }],
@@ -203,15 +182,6 @@ export const DefaultTemplate = () => {
<div style={{ height: 370 }} />
</InfoCard>
</Grid>
<Grid item xs={12} md={6}>
<HomePageStackOverflowQuestions
requestParams={{
tagged: 'backstage',
site: 'stackoverflow',
pagesize: 5,
}}
/>
</Grid>
</Grid>
</Grid>
</Content>
@@ -19,7 +19,6 @@ import {
CATALOG_FILTER_EXISTS,
catalogApiRef,
} from '@backstage/plugin-catalog-react';
import { ToolSearchResultListItem } from '@backstage/plugin-explore';
import { searchPlugin, SearchType } from '@backstage/plugin-search';
import {
SearchBar,
@@ -41,7 +40,6 @@ import {
import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
import ArrowForwardIcon from '@material-ui/icons/ArrowForward';
import BuildIcon from '@material-ui/icons/Build';
import CloseIcon from '@material-ui/icons/Close';
import React, { useCallback, useEffect, useRef } from 'react';
import { useNavigate } from 'react-router-dom';
@@ -207,7 +205,6 @@ export const SearchModal = ({ toggleModal }: { toggleModal: () => void }) => {
<SearchResult>
<CatalogSearchResultListItem icon={<CatalogIcon />} />
<TechDocsSearchResultListItem icon={<DocsIcon />} />
<ToolSearchResultListItem icon={<BuildIcon />} />
</SearchResult>
</Grid>
</Grid>
@@ -28,7 +28,6 @@ import {
catalogApiRef,
CATALOG_FILTER_EXISTS,
} from '@backstage/plugin-catalog-react';
import { AdrSearchResultListItem } from '@backstage/plugin-adr';
import { SearchType } from '@backstage/plugin-search';
import {
SearchBar,
@@ -41,8 +40,6 @@ import {
import { TechDocsSearchResultListItem } from '@backstage/plugin-techdocs';
import { Grid, makeStyles, Paper, Theme } from '@material-ui/core';
import React from 'react';
import { ToolSearchResultListItem } from '@backstage/plugin-explore';
import BuildIcon from '@material-ui/icons/Build';
const useStyles = makeStyles((theme: Theme) => ({
filter: {
@@ -131,8 +128,6 @@ const SearchPage = () => {
<SearchResult>
<CatalogSearchResultListItem icon={<CatalogIcon />} />
<TechDocsSearchResultListItem icon={<DocsIcon />} />
<ToolSearchResultListItem icon={<BuildIcon />} />
<AdrSearchResultListItem icon={<DocsIcon />} />
</SearchResult>
<SearchResultPager />
</Grid>
-2
View File
@@ -16,7 +16,5 @@
// TODO(Rugvip): This plugin is currently not part of the app element tree,
// ideally we have an API for the context menu that permits that.
export { badgesPlugin } from '@backstage/plugin-badges';
export { shortcutsPlugin } from '@backstage/plugin-shortcuts';
export { homePlugin } from '@backstage/plugin-home';
export { signalsPlugin } from '@backstage/plugin-signals';