Merge branch 'master' into merge_upstream

Signed-off-by: Christian Marker <cfmarker@gmail.com>
This commit is contained in:
Christian Marker
2022-09-21 16:47:15 +02:00
committed by GitHub
802 changed files with 29108 additions and 10432 deletions
+61
View File
@@ -1,5 +1,66 @@
# example-app
## 0.2.75
### Patch Changes
- Updated dependencies
- @backstage/cli@0.19.0
- @backstage/app-defaults@1.0.6
- @backstage/core-app-api@1.1.0
- @backstage/core-components@0.11.1
- @backstage/core-plugin-api@1.0.6
- @backstage/plugin-airbrake@0.3.9
- @backstage/plugin-api-docs@0.8.9
- @backstage/plugin-azure-devops@0.2.0
- @backstage/plugin-badges@0.2.33
- @backstage/plugin-catalog-graph@0.2.21
- @backstage/plugin-catalog-import@0.8.12
- @backstage/plugin-catalog-react@1.1.4
- @backstage/plugin-circleci@0.3.9
- @backstage/plugin-cloudbuild@0.3.9
- @backstage/plugin-code-coverage@0.2.2
- @backstage/plugin-cost-insights@0.11.31
- @backstage/plugin-explore@0.3.40
- @backstage/plugin-gcp-projects@0.3.28
- @backstage/plugin-github-actions@0.5.9
- @backstage/plugin-graphiql@0.2.41
- @backstage/plugin-home@0.4.25
- @backstage/plugin-jenkins@0.7.8
- @backstage/plugin-kafka@0.3.9
- @backstage/plugin-kubernetes@0.7.2
- @backstage/plugin-lighthouse@0.3.9
- @backstage/plugin-org@0.5.9
- @backstage/plugin-pagerduty@0.5.2
- @backstage/plugin-permission-react@0.4.5
- @backstage/plugin-rollbar@0.4.9
- @backstage/plugin-scaffolder@1.6.0
- @backstage/plugin-search-react@1.1.0
- @backstage/plugin-search@1.0.2
- @backstage/plugin-sentry@0.4.2
- @backstage/plugin-shortcuts@0.3.1
- @backstage/plugin-tech-insights@0.3.0
- @backstage/plugin-techdocs-react@1.0.4
- @backstage/plugin-techdocs@1.3.2
- @backstage/plugin-todo@0.2.11
- @backstage/plugin-user-settings@0.4.8
- @backstage/plugin-techdocs-module-addons-contrib@1.0.4
- @backstage/plugin-newrelic-dashboard@0.2.2
- @backstage/plugin-dynatrace@0.2.0
- @backstage/catalog-model@1.1.1
- @backstage/config@1.0.2
- @backstage/integration-react@1.1.4
- @backstage/plugin-apache-airflow@0.2.2
- @backstage/plugin-gcalendar@0.3.5
- @backstage/plugin-gocd@0.1.15
- @backstage/plugin-newrelic@0.3.27
- @backstage/plugin-stack-overflow@0.1.5
- @backstage/plugin-tech-radar@0.5.16
- @backstage/plugin-playlist@0.1.0
- @backstage/plugin-catalog-common@1.0.6
- @internal/plugin-catalog-customized@0.0.2
- @backstage/plugin-search-common@1.0.1
## 0.2.75-next.3
### Patch Changes
+58 -57
View File
@@ -1,67 +1,68 @@
{
"name": "example-app",
"version": "0.2.75-next.3",
"version": "0.2.75",
"private": true,
"backstage": {
"role": "frontend"
},
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^1.0.6-next.2",
"@backstage/catalog-model": "^1.1.1-next.0",
"@backstage/cli": "^0.19.0-next.3",
"@backstage/config": "^1.0.2-next.0",
"@backstage/core-app-api": "^1.1.0-next.3",
"@backstage/core-components": "^0.11.1-next.3",
"@backstage/core-plugin-api": "^1.0.6-next.3",
"@backstage/integration-react": "^1.1.4-next.2",
"@backstage/plugin-airbrake": "^0.3.9-next.3",
"@backstage/plugin-apache-airflow": "^0.2.2-next.3",
"@backstage/plugin-api-docs": "^0.8.9-next.3",
"@backstage/plugin-azure-devops": "^0.2.0-next.3",
"@backstage/plugin-badges": "^0.2.33-next.3",
"@backstage/plugin-catalog-common": "^1.0.6-next.0",
"@backstage/plugin-catalog-graph": "^0.2.21-next.2",
"@backstage/plugin-catalog-import": "^0.8.12-next.3",
"@backstage/plugin-catalog-react": "^1.1.4-next.2",
"@backstage/plugin-circleci": "^0.3.9-next.3",
"@backstage/plugin-cloudbuild": "^0.3.9-next.3",
"@backstage/plugin-code-coverage": "^0.2.2-next.3",
"@backstage/plugin-cost-insights": "^0.11.31-next.3",
"@backstage/plugin-dynatrace": "^0.2.0-next.3",
"@backstage/plugin-explore": "^0.3.40-next.3",
"@backstage/plugin-gcalendar": "^0.3.5-next.3",
"@backstage/plugin-gcp-projects": "^0.3.28-next.3",
"@backstage/plugin-github-actions": "^0.5.9-next.3",
"@backstage/plugin-gocd": "^0.1.15-next.2",
"@backstage/plugin-graphiql": "^0.2.41-next.3",
"@backstage/plugin-home": "^0.4.25-next.3",
"@backstage/plugin-jenkins": "^0.7.8-next.3",
"@backstage/plugin-kafka": "^0.3.9-next.3",
"@backstage/plugin-kubernetes": "^0.7.2-next.3",
"@backstage/plugin-lighthouse": "^0.3.9-next.3",
"@backstage/plugin-newrelic": "^0.3.27-next.3",
"@backstage/plugin-newrelic-dashboard": "^0.2.2-next.2",
"@backstage/plugin-org": "^0.5.9-next.3",
"@backstage/plugin-pagerduty": "0.5.2-next.3",
"@backstage/plugin-permission-react": "^0.4.5-next.2",
"@backstage/plugin-rollbar": "^0.4.9-next.3",
"@backstage/plugin-scaffolder": "^1.6.0-next.3",
"@backstage/plugin-search": "^1.0.2-next.3",
"@backstage/plugin-search-common": "^1.0.1-next.0",
"@backstage/plugin-search-react": "^1.1.0-next.2",
"@backstage/plugin-sentry": "^0.4.2-next.3",
"@backstage/plugin-shortcuts": "^0.3.1-next.3",
"@backstage/plugin-stack-overflow": "^0.1.5-next.3",
"@backstage/plugin-tech-insights": "^0.3.0-next.3",
"@backstage/plugin-tech-radar": "^0.5.16-next.3",
"@backstage/plugin-techdocs": "^1.3.2-next.3",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.4-next.2",
"@backstage/plugin-techdocs-react": "^1.0.4-next.2",
"@backstage/plugin-todo": "^0.2.11-next.3",
"@backstage/plugin-user-settings": "^0.4.8-next.3",
"@backstage/theme": "^0.2.16",
"@internal/plugin-catalog-customized": "0.0.2-next.0",
"@backstage/app-defaults": "workspace:^",
"@backstage/catalog-model": "workspace:^",
"@backstage/cli": "workspace:^",
"@backstage/config": "workspace:^",
"@backstage/core-app-api": "workspace:^",
"@backstage/core-components": "workspace:^",
"@backstage/core-plugin-api": "workspace:^",
"@backstage/integration-react": "workspace:^",
"@backstage/plugin-airbrake": "workspace:^",
"@backstage/plugin-apache-airflow": "workspace:^",
"@backstage/plugin-api-docs": "workspace:^",
"@backstage/plugin-azure-devops": "workspace:^",
"@backstage/plugin-badges": "workspace:^",
"@backstage/plugin-catalog-common": "workspace:^",
"@backstage/plugin-catalog-graph": "workspace:^",
"@backstage/plugin-catalog-import": "workspace:^",
"@backstage/plugin-catalog-react": "workspace:^",
"@backstage/plugin-circleci": "workspace:^",
"@backstage/plugin-cloudbuild": "workspace:^",
"@backstage/plugin-code-coverage": "workspace:^",
"@backstage/plugin-cost-insights": "workspace:^",
"@backstage/plugin-dynatrace": "workspace:^",
"@backstage/plugin-explore": "workspace:^",
"@backstage/plugin-gcalendar": "workspace:^",
"@backstage/plugin-gcp-projects": "workspace:^",
"@backstage/plugin-github-actions": "workspace:^",
"@backstage/plugin-gocd": "workspace:^",
"@backstage/plugin-graphiql": "workspace:^",
"@backstage/plugin-home": "workspace:^",
"@backstage/plugin-jenkins": "workspace:^",
"@backstage/plugin-kafka": "workspace:^",
"@backstage/plugin-kubernetes": "workspace:^",
"@backstage/plugin-lighthouse": "workspace:^",
"@backstage/plugin-newrelic": "workspace:^",
"@backstage/plugin-newrelic-dashboard": "workspace:^",
"@backstage/plugin-org": "workspace:^",
"@backstage/plugin-pagerduty": "workspace:^",
"@backstage/plugin-permission-react": "workspace:^",
"@backstage/plugin-playlist": "workspace:^",
"@backstage/plugin-rollbar": "workspace:^",
"@backstage/plugin-scaffolder": "workspace:^",
"@backstage/plugin-search": "workspace:^",
"@backstage/plugin-search-common": "workspace:^",
"@backstage/plugin-search-react": "workspace:^",
"@backstage/plugin-sentry": "workspace:^",
"@backstage/plugin-shortcuts": "workspace:^",
"@backstage/plugin-stack-overflow": "workspace:^",
"@backstage/plugin-tech-insights": "workspace:^",
"@backstage/plugin-tech-radar": "workspace:^",
"@backstage/plugin-techdocs": "workspace:^",
"@backstage/plugin-techdocs-module-addons-contrib": "workspace:^",
"@backstage/plugin-techdocs-react": "workspace:^",
"@backstage/plugin-todo": "workspace:^",
"@backstage/plugin-user-settings": "workspace:^",
"@backstage/theme": "workspace:^",
"@internal/plugin-catalog-customized": "workspace:^",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
@@ -80,7 +81,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/test-utils": "^1.2.0-next.3",
"@backstage/test-utils": "workspace:^",
"@rjsf/core": "^3.2.1",
"@testing-library/cypress": "^8.0.2",
"@testing-library/jest-dom": "^5.10.1",
+7
View File
@@ -64,6 +64,7 @@ import {
ScaffolderPage,
NextScaffolderPage,
scaffolderPlugin,
ScaffolderLayouts,
} from '@backstage/plugin-scaffolder';
import { SearchPage } from '@backstage/plugin-search';
import { TechRadarPage } from '@backstage/plugin-tech-radar';
@@ -103,6 +104,8 @@ 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';
import { PlaylistIndexPage } from '@backstage/plugin-playlist';
import { TwoColumnLayout } from './components/scaffolder/customScaffolderLayouts';
const app = createApp({
apis,
@@ -218,6 +221,9 @@ const routes = (
<ScaffolderFieldExtensions>
<LowerCaseValuePickerFieldExtension />
</ScaffolderFieldExtensions>
<ScaffolderLayouts>
<TwoColumnLayout />
</ScaffolderLayouts>
</Route>
<Route
path="/create/next"
@@ -266,6 +272,7 @@ const routes = (
</Route>
<Route path="/azure-pull-requests" element={<AzurePullRequestsPage />} />
<Route path="/apache-airflow" element={<ApacheAirflowPage />} />
<Route path="/playlist" element={<PlaylistIndexPage />} />
</FlatRoutes>
);
@@ -22,6 +22,7 @@ import RuleIcon from '@material-ui/icons/AssignmentTurnedIn';
import MapIcon from '@material-ui/icons/MyLocation';
import LayersIcon from '@material-ui/icons/Layers';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import SearchIcon from '@material-ui/icons/Search';
import MenuIcon from '@material-ui/icons/Menu';
@@ -105,6 +106,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
/>
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
<SidebarItem icon={PlaylistPlayIcon} to="playlist" text="Playlists" />
<SidebarItem icon={LayersIcon} to="explore" text="Explore" />
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />
{/* End global nav */}
@@ -104,6 +104,7 @@ import {
EntityPagerDutyCard,
isPagerDutyAvailable,
} from '@backstage/plugin-pagerduty';
import { EntityPlaylistDialog } from '@backstage/plugin-playlist';
import {
EntityRollbarContent,
isRollbarAvailable,
@@ -114,6 +115,7 @@ 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,
@@ -155,6 +157,7 @@ const customEntityFilterKind = ['Component', 'API', 'System'];
const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);
const [playlistDialogOpen, setPlaylistDialogOpen] = useState(false);
const extraMenuItems = useMemo(() => {
return [
@@ -163,6 +166,11 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
Icon: BadgeIcon,
onClick: () => setBadgesDialogOpen(true),
},
{
title: 'Add to playlist',
Icon: PlaylistAddIcon,
onClick: () => setPlaylistDialogOpen(true),
},
];
}, []);
@@ -180,6 +188,10 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
open={badgesDialogOpen}
onClose={() => setBadgesDialogOpen(false)}
/>
<EntityPlaylistDialog
open={playlistDialogOpen}
onClose={() => setPlaylistDialogOpen(false)}
/>
</>
);
};
@@ -0,0 +1,54 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import {
createScaffolderLayout,
LayoutTemplate,
scaffolderPlugin,
} from '@backstage/plugin-scaffolder';
import { Grid } from '@material-ui/core';
const TwoColumn: LayoutTemplate = ({ properties, description, title }) => {
const mid = Math.ceil(properties.length / 2);
const left = properties.slice(0, mid);
const right = properties.slice(mid);
return (
<>
<h1>{title}</h1>
<h2>In two column layout!!</h2>
<Grid container justifyContent="flex-end">
{left.map(prop => (
<Grid item xs={6} key={prop.content.key}>
{prop.content}
</Grid>
))}
{right.map(prop => (
<Grid item xs={6} key={prop.content.key}>
{prop.content}
</Grid>
))}
</Grid>
{description}
</>
);
};
export const TwoColumnLayout = scaffolderPlugin.provide(
createScaffolderLayout({
name: 'TwoColumn',
component: TwoColumn,
}),
);
@@ -17,6 +17,7 @@
export const defaultPreviewTemplate = `# Edit the template parameters below to see how they will render in the scaffolder form UI
parameters:
- title: Fill in some steps
ui:ObjectFieldTemplate: TwoColumn
required:
- name
properties: