prs and actions
This commit is contained in:
parent
1e3e81aa38
commit
29f40da1f1
@ -43,6 +43,7 @@
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@roadiehq/backstage-plugin-argo-cd": "^2.6.4",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^2.5.25",
|
||||
"@veecode-platform/backstage-plugin-github-workflows": "^0.2.70",
|
||||
"history": "^5.0.0",
|
||||
"react": "^18.0.2",
|
||||
|
@ -67,30 +67,7 @@ import {
|
||||
isGithubAvailable,
|
||||
isGithubWorkflowsAvailable,
|
||||
} from '@veecode-platform/backstage-plugin-github-workflows';
|
||||
|
||||
const WorkflowsContent = (
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isGithubActionsAvailable}>
|
||||
<GithubWorkflowsList />
|
||||
</EntitySwitch.Case>
|
||||
<EntitySwitch.Case>
|
||||
<EmptyState
|
||||
title="No CI/CD available for this entity"
|
||||
missing="info"
|
||||
description="You need to add an annotation to your component if you want to enable CI/CD for it. You can read more about annotations in Backstage by clicking the button below."
|
||||
action={
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
href="https://backstage.io/docs/features/software-catalog/well-known-annotations"
|
||||
>
|
||||
Read more
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
);
|
||||
import { EntityGithubPullRequestsContent, EntityGithubPullRequestsOverviewCard } from '@roadiehq/backstage-plugin-github-pull-requests';
|
||||
|
||||
const techdocsContent = (
|
||||
<EntityTechdocsContent>
|
||||
@ -101,8 +78,6 @@ const techdocsContent = (
|
||||
);
|
||||
|
||||
const cicdContent = (
|
||||
// This is 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
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isGithubActionsAvailable}>
|
||||
<EntityGithubActionsContent />
|
||||
@ -125,7 +100,29 @@ const cicdContent = (
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
);
|
||||
|
||||
const workflowsContent = (
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isGithubActionsAvailable}>
|
||||
<GithubWorkflowsList />
|
||||
</EntitySwitch.Case>
|
||||
<EntitySwitch.Case>
|
||||
<EmptyState
|
||||
title="No CI/CD available for this entity"
|
||||
missing="info"
|
||||
description="You need to add an annotation to your component if you want to enable CI/CD for it. You can read more about annotations in Backstage by clicking the button below."
|
||||
action={
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
href="https://backstage.io/docs/features/software-catalog/well-known-annotations"
|
||||
>
|
||||
Read more
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
);
|
||||
const entityWarningContent = (
|
||||
<>
|
||||
<EntitySwitch>
|
||||
@ -155,35 +152,39 @@ const entityWarningContent = (
|
||||
);
|
||||
|
||||
const overviewContent = (
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid container spacing={1} alignItems="stretch">
|
||||
{entityWarningContent}
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={e => Boolean(isArgocdAvailable(e))}>
|
||||
<Grid item sm={4}>
|
||||
<EntitySwitch.Case if={isArgocdAvailable}>
|
||||
<Grid item md={4} xs={12}>
|
||||
<EntityArgoCDOverviewCard />
|
||||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
<Grid item md={6}>
|
||||
<EntityGithubPullRequestsOverviewCard />
|
||||
</Grid>
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityAboutCard variant="gridItem" />
|
||||
</Grid>
|
||||
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isGithubWorkflowsAvailable}>
|
||||
<Grid item lg={8} xs={12}>
|
||||
<Grid item md={6} xs={12}>
|
||||
<GithubWorkflowsCard />
|
||||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
<Grid item md={6}>
|
||||
<EntityAboutCard variant="gridItem" />
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityHasSubcomponentsCard variant="gridItem" />
|
||||
</Grid>
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityCatalogGraphCard variant="gridItem" height={400} />
|
||||
</Grid>
|
||||
|
||||
<Grid item md={4} xs={12}>
|
||||
<Grid item md={6} xs={12}>
|
||||
<EntityLinksCard />
|
||||
</Grid>
|
||||
<Grid item md={8} xs={12}>
|
||||
<EntityHasSubcomponentsCard variant="gridItem" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
);
|
||||
|
||||
@ -192,18 +193,9 @@ const serviceEntityPage = (
|
||||
<EntityLayout.Route path="/" title="Overview">
|
||||
{overviewContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/ci-cd" title="CI/CD">
|
||||
{cicdContent}
|
||||
<EntityLayout.Route path="/pull-requests" title="Pull Requests">
|
||||
<EntityGithubPullRequestsContent />
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route
|
||||
if={isGithubAvailable}
|
||||
path="/workflows"
|
||||
title="Workflows"
|
||||
>
|
||||
{WorkflowsContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/api" title="API">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
@ -238,16 +230,6 @@ const websiteEntityPage = (
|
||||
{overviewContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/ci-cd" title="CI/CD">
|
||||
{cicdContent}
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route
|
||||
if={isGithubAvailable}
|
||||
path="/workflows"
|
||||
title="Workflows"
|
||||
>
|
||||
{WorkflowsContent}
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route path="/dependencies" title="Dependencies">
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<Grid item md={6}>
|
||||
@ -277,7 +259,16 @@ const defaultEntityPage = (
|
||||
<EntityLayout.Route path="/" title="Overview">
|
||||
{overviewContent}
|
||||
</EntityLayout.Route>
|
||||
|
||||
<EntityLayout.Route path="/ci-cd" title="CI/CD">
|
||||
{cicdContent}
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route
|
||||
if={isGithubAvailable}
|
||||
path="/workflows"
|
||||
title="Workflows"
|
||||
>
|
||||
{workflowsContent}
|
||||
</EntityLayout.Route>
|
||||
<EntityLayout.Route path="/docs" title="Docs">
|
||||
{techdocsContent}
|
||||
</EntityLayout.Route>
|
||||
@ -289,11 +280,9 @@ const componentPage = (
|
||||
<EntitySwitch.Case if={isComponentType('service')}>
|
||||
{serviceEntityPage}
|
||||
</EntitySwitch.Case>
|
||||
|
||||
<EntitySwitch.Case if={isComponentType('website')}>
|
||||
{websiteEntityPage}
|
||||
</EntitySwitch.Case>
|
||||
|
||||
<EntitySwitch.Case>{defaultEntityPage}</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
);
|
||||
|
@ -3342,6 +3342,18 @@
|
||||
dependencies:
|
||||
"@backstage/backend-plugin-api" "^0.6.17"
|
||||
|
||||
"@backstage/plugin-home-react@^0.1.11":
|
||||
version "0.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@backstage/plugin-home-react/-/plugin-home-react-0.1.12.tgz#414997aa79e1c98e208233aab1e71eb5e8f81b55"
|
||||
integrity sha512-/BZdv9mmvA3Bwrif8cJN8Sb0m7LI2vysHzsmuVSxehokoOpermyZzbrQGMqHxNkPHH3eWO6PqNmtq7r3TWjCXQ==
|
||||
dependencies:
|
||||
"@backstage/core-components" "^0.14.4"
|
||||
"@backstage/core-plugin-api" "^1.9.2"
|
||||
"@material-ui/core" "^4.12.2"
|
||||
"@material-ui/icons" "^4.9.1"
|
||||
"@rjsf/utils" "5.17.1"
|
||||
"@types/react" "^16.13.1 || ^17.0.0"
|
||||
|
||||
"@backstage/plugin-org@^0.6.24":
|
||||
version "0.6.24"
|
||||
resolved "https://registry.yarnpkg.com/@backstage/plugin-org/-/plugin-org-0.6.24.tgz#351a8ec244135acccfc3c886df0da8d36d7a6fa2"
|
||||
@ -5459,7 +5471,7 @@
|
||||
prop-types "^15.7.2"
|
||||
react-is "^16.8.0"
|
||||
|
||||
"@material-ui/lab@4.0.0-alpha.61", "@material-ui/lab@^4.0.0-alpha.57":
|
||||
"@material-ui/lab@4.0.0-alpha.61", "@material-ui/lab@^4.0.0-alpha.57", "@material-ui/lab@^4.0.0-alpha.60":
|
||||
version "4.0.0-alpha.61"
|
||||
resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-4.0.0-alpha.61.tgz#9bf8eb389c0c26c15e40933cc114d4ad85e3d978"
|
||||
integrity sha512-rSzm+XKiNUjKegj8bzt5+pygZeckNLOr+IjykH8sYdVk7dE9y2ZuUSofiMV2bJk3qU+JHwexmw+q0RyNZB9ugg==
|
||||
@ -6995,6 +7007,7 @@
|
||||
moment "^2.29.1"
|
||||
react-use "^17.2.4"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"@roadiehq/scaffolder-backend-argocd@^1.1.26":
|
||||
version "1.1.26"
|
||||
resolved "https://registry.yarnpkg.com/@roadiehq/scaffolder-backend-argocd/-/scaffolder-backend-argocd-1.1.26.tgz#415c540fd51f579e3da016d834a8faae1c6d358e"
|
||||
@ -7006,6 +7019,30 @@
|
||||
"@backstage/plugin-scaffolder-backend" "^1.22.3"
|
||||
"@roadiehq/backstage-plugin-argo-cd-backend" "^3.0.0"
|
||||
winston "^3.2.1"
|
||||
=======
|
||||
"@roadiehq/backstage-plugin-github-pull-requests@^2.5.25":
|
||||
version "2.5.25"
|
||||
resolved "https://registry.yarnpkg.com/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-2.5.25.tgz#7fcc802167bdc2e208680db2e750f0c5dbe07d64"
|
||||
integrity sha512-KgNhd9fJkjsNIhaLiWwn5yML+dBPSZmXXS0Iwvn/UqwpYGwPQk/qCEW/eQZnuB6RigrbH8F9y6ZyD1sy+73n+g==
|
||||
dependencies:
|
||||
"@backstage/catalog-model" "^1.4.5"
|
||||
"@backstage/core-components" "^0.14.3"
|
||||
"@backstage/core-plugin-api" "^1.9.1"
|
||||
"@backstage/plugin-catalog-react" "^1.11.2"
|
||||
"@backstage/plugin-home-react" "^0.1.11"
|
||||
"@material-ui/core" "^4.12.2"
|
||||
"@material-ui/icons" "^4.9.1"
|
||||
"@material-ui/lab" "^4.0.0-alpha.60"
|
||||
"@octokit/rest" "^19.0.3"
|
||||
"@octokit/types" "^9.0.0"
|
||||
"@types/node-fetch" "^2.5.7"
|
||||
history "^5.0.0"
|
||||
lodash "^4.17.21"
|
||||
luxon "^3.0.0"
|
||||
msw "^1.0.1"
|
||||
node-fetch "^2.6.1"
|
||||
react-use "^17.2.4"
|
||||
>>>>>>> cb115d6 (prs and actions)
|
||||
|
||||
"@rollup/plugin-commonjs@^25.0.0":
|
||||
version "25.0.7"
|
||||
@ -9092,7 +9129,7 @@
|
||||
dependencies:
|
||||
"@types/express" "*"
|
||||
|
||||
"@types/node-fetch@^2.5.0":
|
||||
"@types/node-fetch@^2.5.0", "@types/node-fetch@^2.5.7":
|
||||
version "2.6.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24"
|
||||
integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==
|
||||
@ -18695,7 +18732,11 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
<<<<<<< HEAD
|
||||
msw@^1.0.0:
|
||||
=======
|
||||
msw@^1.0.1:
|
||||
>>>>>>> cb115d6 (prs and actions)
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/msw/-/msw-1.3.3.tgz#0b6f173db07292e1cf096b435878932dcf78f208"
|
||||
integrity sha512-CiPyRFiYJCXYyH/vwxT7m+sa4VZHuUH6cGwRBj0kaTjBGpsk4EnL47YzhoA859htVCF2vzqZuOsomIUlFqg9GQ==
|
||||
|
Loading…
Reference in New Issue
Block a user