Merge branch 'master' of github.com:backstage/backstage into mob/scaffolder-cra-fixes
* 'master' of github.com:backstage/backstage: (758 commits) add zalando to adpoters list Avoid passing undefined to values that are marked as optional Support profile of groups in LdapOrgReaderProcessor Import picture and display name by the GitHubOrgReaderProcessor Use the new group profile section in the group profile card Add support for the group profile element to Microsoft Graph processor Add profile section to group entity Implement readTree on BitBucketUrlReader - Add getBitbucketDefaultBranch Implement readTree on BitBucketUrlReader - Modify changeset Implement readTree on BitBucketUrlReader - Implement getBitbucketDownloadUrl and remove hash for Bitbucket Server Implement readTree on BitBucketUrlReader WIP: implement readTree for bitbucket updated scaffolder config.d to avoid config failure build(deps): bump swagger-ui-react from 3.37.2 to 3.38.0 included changeset Introduced config schema for plugins/scaffolder-backend Write relations directly as part of batch add / update of entities. Add codeowners for techdocs-common package techdocs-common: Add type dependencies Update nice-trains-punch.md ...
This commit is contained in:
@@ -1,5 +1,237 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b2a07d2dc]
|
||||
- Updated dependencies [075d3dc5a]
|
||||
- Updated dependencies [e3071a0d4]
|
||||
- Updated dependencies [d6e8099ed]
|
||||
- Updated dependencies [88ef11b45]
|
||||
- Updated dependencies [06dbe707b]
|
||||
- Updated dependencies [2527628e1]
|
||||
- Updated dependencies [011708102]
|
||||
- Updated dependencies [04efbbdd2]
|
||||
- Updated dependencies [90458fed6]
|
||||
- Updated dependencies [6011b7d3e]
|
||||
- Updated dependencies [79418ddb6]
|
||||
- Updated dependencies [d2938af4c]
|
||||
- Updated dependencies [61897fb2c]
|
||||
- Updated dependencies [e1f4e24ef]
|
||||
- Updated dependencies [6a0d7a9fb]
|
||||
- Updated dependencies [0f8877168]
|
||||
- Updated dependencies [1c69d4716]
|
||||
- Updated dependencies [246799c7f]
|
||||
- Updated dependencies [83b6e0c1f]
|
||||
- Updated dependencies [87a33d2fe]
|
||||
- Updated dependencies [1665ae8bb]
|
||||
- Updated dependencies [04f26f88d]
|
||||
- Updated dependencies [ff243ce96]
|
||||
- Updated dependencies [2b71db211]
|
||||
- @backstage/plugin-jenkins@0.3.3
|
||||
- @backstage/plugin-sentry@0.3.0
|
||||
- @backstage/plugin-cost-insights@0.5.0
|
||||
- @backstage/cli@0.4.1
|
||||
- @backstage/core@0.4.0
|
||||
- @backstage/plugin-circleci@0.2.4
|
||||
- @backstage/plugin-catalog@0.2.6
|
||||
- @backstage/plugin-pagerduty@0.2.2
|
||||
- @backstage/plugin-catalog-import@0.3.1
|
||||
- @backstage/test-utils@0.1.5
|
||||
- @backstage/plugin-search@0.2.3
|
||||
- @backstage/plugin-api-docs@0.4.0
|
||||
- @backstage/catalog-model@0.5.0
|
||||
- @backstage/plugin-techdocs@0.4.0
|
||||
- @backstage/theme@0.2.2
|
||||
- @backstage/plugin-org@0.3.1
|
||||
- @backstage/plugin-cloudbuild@0.2.4
|
||||
- @backstage/plugin-explore@0.2.2
|
||||
- @backstage/plugin-gcp-projects@0.2.2
|
||||
- @backstage/plugin-github-actions@0.2.4
|
||||
- @backstage/plugin-gitops-profiles@0.2.2
|
||||
- @backstage/plugin-graphiql@0.2.2
|
||||
- @backstage/plugin-kubernetes@0.3.2
|
||||
- @backstage/plugin-lighthouse@0.2.5
|
||||
- @backstage/plugin-newrelic@0.2.2
|
||||
- @backstage/plugin-register-component@0.2.4
|
||||
- @backstage/plugin-rollbar@0.2.6
|
||||
- @backstage/plugin-scaffolder@0.3.3
|
||||
- @backstage/plugin-tech-radar@0.3.1
|
||||
- @backstage/plugin-user-settings@0.2.3
|
||||
- @backstage/plugin-welcome@0.2.3
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7eb8bfe4a]
|
||||
- Updated dependencies [fe7257ff0]
|
||||
- Updated dependencies [a2cfa311a]
|
||||
- Updated dependencies [69f38457f]
|
||||
- Updated dependencies [bec334b33]
|
||||
- Updated dependencies [303c5ea17]
|
||||
- Updated dependencies [b4488ddb0]
|
||||
- Updated dependencies [4a655c89d]
|
||||
- Updated dependencies [08835a61d]
|
||||
- Updated dependencies [a9fd599f7]
|
||||
- Updated dependencies [8a16e8af8]
|
||||
- Updated dependencies [bcc211a08]
|
||||
- Updated dependencies [00670a96e]
|
||||
- Updated dependencies [da2ad65cb]
|
||||
- Updated dependencies [ebf37bbae]
|
||||
- @backstage/plugin-api-docs@0.3.1
|
||||
- @backstage/plugin-cost-insights@0.4.2
|
||||
- @backstage/plugin-sentry@0.2.4
|
||||
- @backstage/plugin-welcome@0.2.2
|
||||
- @backstage/cli@0.4.0
|
||||
- @backstage/catalog-model@0.4.0
|
||||
- @backstage/plugin-catalog-import@0.3.0
|
||||
- @backstage/plugin-scaffolder@0.3.2
|
||||
- @backstage/plugin-kubernetes@0.3.1
|
||||
- @backstage/plugin-techdocs@0.3.1
|
||||
- @backstage/plugin-catalog@0.2.5
|
||||
- @backstage/test-utils@0.1.4
|
||||
- @backstage/plugin-circleci@0.2.3
|
||||
- @backstage/plugin-cloudbuild@0.2.3
|
||||
- @backstage/plugin-github-actions@0.2.3
|
||||
- @backstage/plugin-jenkins@0.3.2
|
||||
- @backstage/plugin-lighthouse@0.2.4
|
||||
- @backstage/plugin-register-component@0.2.3
|
||||
- @backstage/plugin-rollbar@0.2.5
|
||||
- @backstage/plugin-search@0.2.2
|
||||
|
||||
## 0.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [294295453]
|
||||
- Updated dependencies [f3bb55ee3]
|
||||
- Updated dependencies [4b53294a6]
|
||||
- Updated dependencies [6f70ed7a9]
|
||||
- Updated dependencies [ab94c9542]
|
||||
- Updated dependencies [3a201c5d5]
|
||||
- Updated dependencies [f538e2c56]
|
||||
- Updated dependencies [2daf18e80]
|
||||
- Updated dependencies [069cda35f]
|
||||
- Updated dependencies [8697dea5b]
|
||||
- Updated dependencies [b623cc275]
|
||||
- @backstage/cli@0.3.2
|
||||
- @backstage/plugin-api-docs@0.3.0
|
||||
- @backstage/plugin-techdocs@0.3.0
|
||||
- @backstage/plugin-catalog@0.2.4
|
||||
- @backstage/catalog-model@0.3.1
|
||||
- @backstage/plugin-rollbar@0.2.4
|
||||
|
||||
## 0.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 475fc0aaa: Using the search field in the sidebar now navigates to the search result page.
|
||||
- Updated dependencies [475fc0aaa]
|
||||
- Updated dependencies [1166fcc36]
|
||||
- Updated dependencies [29a0ccab2]
|
||||
- Updated dependencies [8e6728e25]
|
||||
- Updated dependencies [c93a14b49]
|
||||
- Updated dependencies [ef2831dde]
|
||||
- Updated dependencies [2a71f4bab]
|
||||
- Updated dependencies [1185919f3]
|
||||
- Updated dependencies [a8de7f554]
|
||||
- Updated dependencies [faf311c26]
|
||||
- Updated dependencies [31d8b6979]
|
||||
- Updated dependencies [991345969]
|
||||
- Updated dependencies [475fc0aaa]
|
||||
- @backstage/core@0.3.2
|
||||
- @backstage/catalog-model@0.3.0
|
||||
- @backstage/plugin-kubernetes@0.3.0
|
||||
- @backstage/cli@0.3.1
|
||||
- @backstage/plugin-cost-insights@0.4.1
|
||||
- @backstage/plugin-scaffolder@0.3.1
|
||||
- @backstage/plugin-register-component@0.2.2
|
||||
- @backstage/plugin-circleci@0.2.2
|
||||
- @backstage/plugin-search@0.2.1
|
||||
- @backstage/plugin-api-docs@0.2.2
|
||||
- @backstage/plugin-catalog@0.2.3
|
||||
- @backstage/plugin-cloudbuild@0.2.2
|
||||
- @backstage/plugin-github-actions@0.2.2
|
||||
- @backstage/plugin-jenkins@0.3.1
|
||||
- @backstage/plugin-lighthouse@0.2.3
|
||||
- @backstage/plugin-rollbar@0.2.3
|
||||
- @backstage/plugin-sentry@0.2.3
|
||||
- @backstage/plugin-techdocs@0.2.3
|
||||
|
||||
## 0.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3efd03c0e: Removed obsolete CircleCI proxy config from example-app
|
||||
- Updated dependencies [1722cb53c]
|
||||
- Updated dependencies [1722cb53c]
|
||||
- Updated dependencies [17a9f48f6]
|
||||
- Updated dependencies [4040d4fcb]
|
||||
- Updated dependencies [f360395d0]
|
||||
- Updated dependencies [259d848ee]
|
||||
- Updated dependencies [8b7737d0b]
|
||||
- Updated dependencies [902340451]
|
||||
- @backstage/cli@0.3.0
|
||||
- @backstage/core@0.3.1
|
||||
- @backstage/plugin-cost-insights@0.4.0
|
||||
- @backstage/plugin-lighthouse@0.2.2
|
||||
- @backstage/plugin-rollbar@0.2.2
|
||||
- @backstage/plugin-sentry@0.2.2
|
||||
- @backstage/plugin-techdocs@0.2.2
|
||||
- @backstage/plugin-user-settings@0.2.2
|
||||
- @backstage/plugin-catalog@0.2.2
|
||||
- @backstage/test-utils@0.1.3
|
||||
|
||||
## 0.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7b37d65fd]
|
||||
- Updated dependencies [4aca74e08]
|
||||
- Updated dependencies [a41730c6e]
|
||||
- Updated dependencies [9a294574c]
|
||||
- Updated dependencies [0703edee0]
|
||||
- Updated dependencies [e8f69ba93]
|
||||
- Updated dependencies [0c0798f08]
|
||||
- Updated dependencies [5a2705de2]
|
||||
- Updated dependencies [0c0798f08]
|
||||
- Updated dependencies [84b654d5d]
|
||||
- Updated dependencies [0c0798f08]
|
||||
- Updated dependencies [199237d2f]
|
||||
- Updated dependencies [6627b626f]
|
||||
- Updated dependencies [3f05616bf]
|
||||
- Updated dependencies [803527bd3]
|
||||
- Updated dependencies [4577e377b]
|
||||
- Updated dependencies [2d0bd1be7]
|
||||
- Updated dependencies [59166e5ec]
|
||||
- Updated dependencies [a906f20e7]
|
||||
- @backstage/core@0.3.0
|
||||
- @backstage/plugin-jenkins@0.3.0
|
||||
- @backstage/plugin-cost-insights@0.3.0
|
||||
- @backstage/plugin-user-settings@0.2.1
|
||||
- @backstage/plugin-api-docs@0.2.1
|
||||
- @backstage/plugin-tech-radar@0.3.0
|
||||
- @backstage/theme@0.2.1
|
||||
- @backstage/plugin-catalog@0.2.1
|
||||
- @backstage/plugin-scaffolder@0.3.0
|
||||
- @backstage/plugin-circleci@0.2.1
|
||||
- @backstage/plugin-cloudbuild@0.2.1
|
||||
- @backstage/plugin-explore@0.2.1
|
||||
- @backstage/plugin-gcp-projects@0.2.1
|
||||
- @backstage/plugin-github-actions@0.2.1
|
||||
- @backstage/plugin-gitops-profiles@0.2.1
|
||||
- @backstage/plugin-graphiql@0.2.1
|
||||
- @backstage/plugin-kubernetes@0.2.1
|
||||
- @backstage/plugin-lighthouse@0.2.1
|
||||
- @backstage/plugin-newrelic@0.2.1
|
||||
- @backstage/plugin-register-component@0.2.1
|
||||
- @backstage/plugin-rollbar@0.2.1
|
||||
- @backstage/plugin-sentry@0.2.1
|
||||
- @backstage/plugin-techdocs@0.2.1
|
||||
- @backstage/plugin-welcome@0.2.1
|
||||
|
||||
## 0.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
+41
-42
@@ -1,42 +1,47 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.6",
|
||||
"private": true,
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.2.0",
|
||||
"@backstage/cli": "^0.2.0",
|
||||
"@backstage/core": "^0.2.0",
|
||||
"@backstage/plugin-api-docs": "^0.2.0",
|
||||
"@backstage/plugin-catalog": "^0.2.0",
|
||||
"@backstage/plugin-circleci": "^0.2.0",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.0",
|
||||
"@backstage/plugin-cost-insights": "^0.2.0",
|
||||
"@backstage/plugin-explore": "^0.2.0",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.0",
|
||||
"@backstage/plugin-github-actions": "^0.2.0",
|
||||
"@backstage/plugin-gitops-profiles": "^0.2.0",
|
||||
"@backstage/plugin-graphiql": "^0.2.0",
|
||||
"@backstage/plugin-jenkins": "^0.2.0",
|
||||
"@backstage/plugin-kubernetes": "^0.2.0",
|
||||
"@backstage/plugin-lighthouse": "^0.2.0",
|
||||
"@backstage/plugin-newrelic": "^0.2.0",
|
||||
"@backstage/plugin-register-component": "^0.2.0",
|
||||
"@backstage/plugin-rollbar": "^0.2.0",
|
||||
"@backstage/plugin-scaffolder": "^0.2.0",
|
||||
"@backstage/plugin-sentry": "^0.2.0",
|
||||
"@backstage/plugin-tech-radar": "^0.2.0",
|
||||
"@backstage/plugin-techdocs": "^0.2.0",
|
||||
"@backstage/plugin-user-settings": "^0.2.0",
|
||||
"@backstage/plugin-welcome": "^0.2.0",
|
||||
"@backstage/test-utils": "^0.1.2",
|
||||
"@backstage/theme": "^0.2.0",
|
||||
"@backstage/catalog-model": "^0.5.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@backstage/core": "^0.4.0",
|
||||
"@backstage/plugin-api-docs": "^0.4.0",
|
||||
"@backstage/plugin-catalog": "^0.2.6",
|
||||
"@backstage/plugin-catalog-import": "^0.3.1",
|
||||
"@backstage/plugin-circleci": "^0.2.4",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.4",
|
||||
"@backstage/plugin-cost-insights": "^0.5.0",
|
||||
"@backstage/plugin-explore": "^0.2.2",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.2",
|
||||
"@backstage/plugin-github-actions": "^0.2.4",
|
||||
"@backstage/plugin-gitops-profiles": "^0.2.2",
|
||||
"@backstage/plugin-graphiql": "^0.2.2",
|
||||
"@backstage/plugin-org": "^0.3.1",
|
||||
"@backstage/plugin-jenkins": "^0.3.3",
|
||||
"@backstage/plugin-kubernetes": "^0.3.2",
|
||||
"@backstage/plugin-lighthouse": "^0.2.5",
|
||||
"@backstage/plugin-newrelic": "^0.2.2",
|
||||
"@backstage/plugin-pagerduty": "0.2.2",
|
||||
"@backstage/plugin-register-component": "^0.2.4",
|
||||
"@backstage/plugin-rollbar": "^0.2.6",
|
||||
"@backstage/plugin-scaffolder": "^0.3.3",
|
||||
"@backstage/plugin-sentry": "^0.3.0",
|
||||
"@backstage/plugin-search": "^0.2.3",
|
||||
"@backstage/plugin-tech-radar": "^0.3.1",
|
||||
"@backstage/plugin-techdocs": "^0.4.0",
|
||||
"@backstage/plugin-user-settings": "^0.2.3",
|
||||
"@backstage/plugin-welcome": "^0.2.3",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@backstage/theme": "^0.2.2",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.0.0",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^0.2.12",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^0.6.2",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^0.2.7",
|
||||
"@roadiehq/backstage-plugin-buildkite": "^0.1.3",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^0.2.16",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^0.6.3",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^0.2.8",
|
||||
"history": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.12.0",
|
||||
@@ -48,7 +53,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/cypress": "^6.0.0",
|
||||
"@testing-library/cypress": "^7.0.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^10.4.1",
|
||||
"@testing-library/user-event": "^12.0.7",
|
||||
@@ -85,14 +90,8 @@
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"proxy": {
|
||||
"/circleci/api": {
|
||||
"target": "https://circleci.com/api/v1.1",
|
||||
"changeOrigin": true,
|
||||
"pathRewrite": {
|
||||
"^/circleci/api/": "/"
|
||||
}
|
||||
}
|
||||
}
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
SignInPage,
|
||||
createRouteRef,
|
||||
} from '@backstage/core';
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import Root from './components/Root';
|
||||
import * as plugins from './plugins';
|
||||
import { apis } from './apis';
|
||||
@@ -34,6 +34,7 @@ import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
|
||||
import { Router as LighthouseRouter } from '@backstage/plugin-lighthouse';
|
||||
import { Router as RegisterComponentRouter } from '@backstage/plugin-register-component';
|
||||
import { Router as SettingsRouter } from '@backstage/plugin-user-settings';
|
||||
import { Router as ImportComponentRouter } from '@backstage/plugin-catalog-import';
|
||||
import { Route, Routes, Navigate } from 'react-router';
|
||||
|
||||
import { EntityPage } from './components/catalog/EntityPage';
|
||||
@@ -67,6 +68,10 @@ const catalogRouteRef = createRouteRef({
|
||||
const AppRoutes = () => (
|
||||
<Routes>
|
||||
<Navigate key="/" to="/catalog" />
|
||||
<Route
|
||||
path="/catalog-import/*"
|
||||
element={<ImportComponentRouter catalogRouteRef={catalogRouteRef} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${catalogRouteRef.path}/*`}
|
||||
element={<CatalogRouter EntityPage={EntityPage} />}
|
||||
@@ -87,7 +92,7 @@ const AppRoutes = () => (
|
||||
</Routes>
|
||||
);
|
||||
|
||||
const App: FC<{}> = () => (
|
||||
const App = () => (
|
||||
<AppProvider>
|
||||
<AlertDisplay />
|
||||
<OAuthRequestDialog />
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@@ -26,7 +26,7 @@ const useStyles = makeStyles({
|
||||
fill: '#7df3e1',
|
||||
},
|
||||
});
|
||||
const LogoFull: FC<{}> = () => {
|
||||
const LogoFull = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@@ -27,7 +27,7 @@ const useStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
const LogoIcon: FC<{}> = () => {
|
||||
const LogoIcon = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useContext } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { useContext, PropsWithChildren } from 'react';
|
||||
import { Link, makeStyles } from '@material-ui/core';
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
import ExtensionIcon from '@material-ui/icons/Extension';
|
||||
@@ -33,12 +32,12 @@ import {
|
||||
SidebarContext,
|
||||
SidebarItem,
|
||||
SidebarDivider,
|
||||
SidebarSearchField,
|
||||
SidebarSpace,
|
||||
} from '@backstage/core';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { graphiQLRouteRef } from '@backstage/plugin-graphiql';
|
||||
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
|
||||
import { SidebarSearch } from '@backstage/plugin-search';
|
||||
|
||||
const useSidebarLogoStyles = makeStyles({
|
||||
root: {
|
||||
@@ -55,7 +54,7 @@ const useSidebarLogoStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
const SidebarLogo: FC<{}> = () => {
|
||||
const SidebarLogo = () => {
|
||||
const classes = useSidebarLogoStyles();
|
||||
const { isOpen } = useContext(SidebarContext);
|
||||
|
||||
@@ -73,17 +72,11 @@ const SidebarLogo: FC<{}> = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const handleSearch = (query: string): void => {
|
||||
// XXX (@koroeskohr): for testing purposes
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(query);
|
||||
};
|
||||
|
||||
const Root: FC<{}> = ({ children }) => (
|
||||
const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
<SidebarSearchField onSearch={handleSearch} />
|
||||
<SidebarSearch />
|
||||
<SidebarDivider />
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
|
||||
@@ -108,8 +101,4 @@ const Root: FC<{}> = ({ children }) => (
|
||||
</SidebarPage>
|
||||
);
|
||||
|
||||
Root.propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
export default Root;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* 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 { CICDSwitcher } from './EntityPage';
|
||||
import { UrlPatternDiscovery, ApiProvider, ApiRegistry } from '@backstage/core';
|
||||
import {
|
||||
buildKiteApiRef,
|
||||
BuildkiteApi,
|
||||
} from '@roadiehq/backstage-plugin-buildkite';
|
||||
import { renderWithEffects, wrapInTestApp } from '@backstage/test-utils';
|
||||
|
||||
describe('EntityPage Test', () => {
|
||||
const entity = {
|
||||
apiVersion: 'v1',
|
||||
kind: 'Component',
|
||||
metadata: {
|
||||
name: 'ExampleComponent',
|
||||
annotations: {
|
||||
'buildkite.com/project-slug': 'exampleProject/examplePipeline',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
owner: 'guest',
|
||||
type: 'service',
|
||||
lifecycle: 'production',
|
||||
},
|
||||
};
|
||||
|
||||
const discoveryApi = UrlPatternDiscovery.compile('http://exampleapi.com');
|
||||
|
||||
const apis = ApiRegistry.from([
|
||||
[buildKiteApiRef, new BuildkiteApi({ discoveryApi })],
|
||||
]);
|
||||
|
||||
describe('CICDSwitcher Test', () => {
|
||||
it('Should render Buildkite View', async () => {
|
||||
const renderedComponent = await renderWithEffects(
|
||||
wrapInTestApp(
|
||||
<ApiProvider apis={apis}>
|
||||
<CICDSwitcher entity={entity} />
|
||||
</ApiProvider>,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
renderedComponent.getByText(/exampleProject\/examplePipeline/),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -14,69 +14,96 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {
|
||||
isPluginApplicableToEntity as isTravisCIAvailable,
|
||||
RecentTravisCIBuildsWidget,
|
||||
Router as TravisCIRouter,
|
||||
} from '@roadiehq/backstage-plugin-travis-ci';
|
||||
ApiEntity,
|
||||
Entity,
|
||||
GroupEntity,
|
||||
UserEntity,
|
||||
} from '@backstage/catalog-model';
|
||||
import { EmptyState } from '@backstage/core';
|
||||
import {
|
||||
ApiDefinitionCard,
|
||||
ConsumedApisCard,
|
||||
ConsumingComponentsCard,
|
||||
ProvidedApisCard,
|
||||
ProvidingComponentsCard,
|
||||
} from '@backstage/plugin-api-docs';
|
||||
import {
|
||||
AboutCard,
|
||||
EntityPageLayout,
|
||||
useEntity,
|
||||
} from '@backstage/plugin-catalog';
|
||||
import {
|
||||
isPluginApplicableToEntity as isCircleCIAvailable,
|
||||
Router as CircleCIRouter,
|
||||
} from '@backstage/plugin-circleci';
|
||||
import {
|
||||
isPluginApplicableToEntity as isCloudbuildAvailable,
|
||||
Router as CloudbuildRouter,
|
||||
} from '@backstage/plugin-cloudbuild';
|
||||
import {
|
||||
isPluginApplicableToEntity as isGitHubActionsAvailable,
|
||||
RecentWorkflowRunsCard,
|
||||
Router as GitHubActionsRouter,
|
||||
} from '@backstage/plugin-github-actions';
|
||||
import {
|
||||
Router as CloudbuildRouter,
|
||||
isPluginApplicableToEntity as isCloudbuildAvailable,
|
||||
} from '@backstage/plugin-cloudbuild';
|
||||
import {
|
||||
Router as JenkinsRouter,
|
||||
isPluginApplicableToEntity as isJenkinsAvailable,
|
||||
LatestRunCard as JenkinsLatestRunCard,
|
||||
Router as JenkinsRouter,
|
||||
} from '@backstage/plugin-jenkins';
|
||||
import {
|
||||
isPluginApplicableToEntity as isCircleCIAvailable,
|
||||
Router as CircleCIRouter,
|
||||
} from '@backstage/plugin-circleci';
|
||||
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,
|
||||
EntityPageLayout,
|
||||
useEntity,
|
||||
} from '@backstage/plugin-catalog';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { Button, Grid } from '@material-ui/core';
|
||||
import { EmptyState } from '@backstage/core';
|
||||
import {
|
||||
EmbeddedRouter as LighthouseRouter,
|
||||
LastLighthouseAuditCard,
|
||||
isPluginApplicableToEntity as isLighthouseAvailable,
|
||||
} from '@backstage/plugin-lighthouse/';
|
||||
LastLighthouseAuditCard,
|
||||
} from '@backstage/plugin-lighthouse';
|
||||
import {
|
||||
OwnershipCard,
|
||||
MembersListCard,
|
||||
GroupProfileCard,
|
||||
UserProfileCard,
|
||||
} from '@backstage/plugin-org';
|
||||
import { Router as SentryRouter } from '@backstage/plugin-sentry';
|
||||
import { EmbeddedDocsRouter as DocsRouter } from '@backstage/plugin-techdocs';
|
||||
import { Button, Grid } from '@material-ui/core';
|
||||
import {
|
||||
isPluginApplicableToEntity as isBuildkiteAvailable,
|
||||
Router as BuildkiteRouter,
|
||||
} from '@roadiehq/backstage-plugin-buildkite';
|
||||
import {
|
||||
isPluginApplicableToEntity as isGitHubAvailable,
|
||||
LanguagesCard,
|
||||
ReadMeCard,
|
||||
ReleasesCard,
|
||||
Router as GitHubInsightsRouter,
|
||||
} from '@roadiehq/backstage-plugin-github-insights';
|
||||
import {
|
||||
Router as PullRequestsRouter,
|
||||
isPluginApplicableToEntity as isPullRequestsAvailable,
|
||||
PullRequestsStatsCard,
|
||||
Router as PullRequestsRouter,
|
||||
} from '@roadiehq/backstage-plugin-github-pull-requests';
|
||||
import {
|
||||
isPluginApplicableToEntity as isPagerDutyAvailable,
|
||||
PagerDutyCard,
|
||||
} from '@backstage/plugin-pagerduty';
|
||||
import {
|
||||
isPluginApplicableToEntity as isTravisCIAvailable,
|
||||
RecentTravisCIBuildsWidget,
|
||||
Router as TravisCIRouter,
|
||||
} from '@roadiehq/backstage-plugin-travis-ci';
|
||||
import React, { ReactNode } from 'react';
|
||||
|
||||
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
|
||||
export const CICDSwitcher = ({ entity }: { entity: Entity }) => {
|
||||
// This component is just an example of how you can implement your company's logic in entity page.
|
||||
// You can for example enforce that all components of type 'service' should use GitHubActions
|
||||
switch (true) {
|
||||
case isJenkinsAvailable(entity):
|
||||
return <JenkinsRouter entity={entity} />;
|
||||
case isGitHubActionsAvailable(entity):
|
||||
return <GitHubActionsRouter entity={entity} />;
|
||||
case isBuildkiteAvailable(entity):
|
||||
return <BuildkiteRouter entity={entity} />;
|
||||
case isCircleCIAvailable(entity):
|
||||
return <CircleCIRouter entity={entity} />;
|
||||
case isGitHubActionsAvailable(entity):
|
||||
return <GitHubActionsRouter entity={entity} />;
|
||||
case isCloudbuildAvailable(entity):
|
||||
return <CloudbuildRouter entity={entity} />;
|
||||
case isTravisCIAvailable(entity):
|
||||
@@ -128,11 +155,16 @@ const RecentCICDRunsSwitcher = ({ entity }: { entity: Entity }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const OverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
const ComponentOverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
<AboutCard entity={entity} variant="gridItem" />
|
||||
</Grid>
|
||||
{isPagerDutyAvailable(entity) && (
|
||||
<Grid item md={6}>
|
||||
<PagerDutyCard entity={entity} />
|
||||
</Grid>
|
||||
)}
|
||||
<RecentCICDRunsSwitcher entity={entity} />
|
||||
{isGitHubAvailable(entity) && (
|
||||
<>
|
||||
@@ -158,12 +190,23 @@ const OverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const ComponentApisContent = ({ entity }: { entity: Entity }) => (
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
<ProvidedApisCard entity={entity} />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<ConsumedApisCard entity={entity} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/"
|
||||
title="Overview"
|
||||
element={<OverviewContent entity={entity} />}
|
||||
element={<ComponentOverviewContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/ci-cd/*"
|
||||
@@ -178,7 +221,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout.Content
|
||||
path="/api/*"
|
||||
title="API"
|
||||
element={<ApiDocsRouter entity={entity} />}
|
||||
element={<ComponentApisContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/docs/*"
|
||||
@@ -208,7 +251,7 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout.Content
|
||||
path="/"
|
||||
title="Overview"
|
||||
element={<OverviewContent entity={entity} />}
|
||||
element={<ComponentOverviewContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/ci-cd/*"
|
||||
@@ -247,12 +290,13 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
/>
|
||||
</EntityPageLayout>
|
||||
);
|
||||
|
||||
const DefaultEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/*"
|
||||
title="Overview"
|
||||
element={<OverviewContent entity={entity} />}
|
||||
element={<ComponentOverviewContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/docs/*"
|
||||
@@ -262,8 +306,7 @@ const DefaultEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
</EntityPageLayout>
|
||||
);
|
||||
|
||||
export const EntityPage = () => {
|
||||
const { entity } = useEntity();
|
||||
export const ComponentEntityPage = ({ entity }: { entity: Entity }) => {
|
||||
switch (entity?.spec?.type) {
|
||||
case 'service':
|
||||
return <ServiceEntityPage entity={entity} />;
|
||||
@@ -273,3 +316,104 @@ export const EntityPage = () => {
|
||||
return <DefaultEntityPage entity={entity} />;
|
||||
}
|
||||
};
|
||||
|
||||
const ApiOverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item md={6}>
|
||||
<AboutCard entity={entity} />
|
||||
</Grid>
|
||||
<Grid container item md={12}>
|
||||
<Grid item md={6}>
|
||||
<ProvidingComponentsCard entity={entity} />
|
||||
</Grid>
|
||||
<Grid item md={6}>
|
||||
<ConsumingComponentsCard entity={entity} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const ApiDefinitionContent = ({ entity }: { entity: ApiEntity }) => (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12}>
|
||||
<ApiDefinitionCard apiEntity={entity} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const ApiEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/*"
|
||||
title="Overview"
|
||||
element={<ApiOverviewContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/definition/*"
|
||||
title="Definition"
|
||||
element={<ApiDefinitionContent entity={entity as ApiEntity} />}
|
||||
/>
|
||||
</EntityPageLayout>
|
||||
);
|
||||
|
||||
const UserOverviewContent = ({ entity }: { entity: UserEntity }) => (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<UserProfileCard entity={entity} variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<OwnershipCard entity={entity} variant="gridItem" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const UserEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/*"
|
||||
title="Overview"
|
||||
element={<UserOverviewContent entity={entity as UserEntity} />}
|
||||
/>
|
||||
</EntityPageLayout>
|
||||
);
|
||||
|
||||
const GroupOverviewContent = ({ entity }: { entity: GroupEntity }) => (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<GroupProfileCard entity={entity} variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
<OwnershipCard entity={entity} variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<MembersListCard entity={entity} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
const GroupEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/*"
|
||||
title="Overview"
|
||||
element={<GroupOverviewContent entity={entity as GroupEntity} />}
|
||||
/>
|
||||
</EntityPageLayout>
|
||||
);
|
||||
|
||||
export const EntityPage = () => {
|
||||
const { entity } = useEntity();
|
||||
|
||||
switch (entity?.kind?.toLowerCase()) {
|
||||
case 'component':
|
||||
return <ComponentEntityPage entity={entity} />;
|
||||
case 'api':
|
||||
return <ApiEntityPage entity={entity} />;
|
||||
case 'group':
|
||||
return <GroupEntityPage entity={entity} />;
|
||||
case 'user':
|
||||
return <UserEntityPage entity={entity} />;
|
||||
default:
|
||||
return <DefaultEntityPage entity={entity} />;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,9 +22,16 @@ import {
|
||||
samlAuthApiRef,
|
||||
microsoftAuthApiRef,
|
||||
oneloginAuthApiRef,
|
||||
oidcAuthApiRef,
|
||||
} from '@backstage/core';
|
||||
|
||||
export const providers = [
|
||||
{
|
||||
id: 'oidc-auth-provider',
|
||||
title: 'Oidc',
|
||||
message: 'Sign In using OpenId Connect',
|
||||
apiRef: oidcAuthApiRef,
|
||||
},
|
||||
{
|
||||
id: 'google-auth-provider',
|
||||
title: 'Google',
|
||||
|
||||
@@ -37,4 +37,9 @@ 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 CatalogImport } from '@backstage/plugin-catalog-import';
|
||||
export { plugin as UserSettings } from '@backstage/plugin-user-settings';
|
||||
export { plugin as PagerDuty } from '@backstage/plugin-pagerduty';
|
||||
export { plugin as Buildkite } from '@roadiehq/backstage-plugin-buildkite';
|
||||
export { plugin as Search } from '@backstage/plugin-search';
|
||||
export { plugin as Org } from '@backstage/plugin-org';
|
||||
|
||||
Reference in New Issue
Block a user