diff --git a/sreez-showcase/packages/app/package.json b/sreez-showcase/packages/app/package.json index 3f43e85..88f3cbc 100644 --- a/sreez-showcase/packages/app/package.json +++ b/sreez-showcase/packages/app/package.json @@ -15,31 +15,31 @@ }, "dependencies": { "@backstage-community/plugin-github-actions": "^0.6.16", - "@backstage/app-defaults": "^1.5.4", - "@backstage/catalog-model": "^1.4.5", - "@backstage/cli": "^0.26.3", - "@backstage/core-app-api": "^1.12.4", - "@backstage/core-components": "^0.14.4", + "@backstage/app-defaults": "^1.5.5", + "@backstage/catalog-model": "^1.5.0", + "@backstage/cli": "^0.26.6", + "@backstage/core-app-api": "^1.12.5", + "@backstage/core-components": "^0.14.7", "@backstage/core-plugin-api": "^1.9.2", - "@backstage/integration-react": "^1.1.26", - "@backstage/plugin-api-docs": "^0.11.4", - "@backstage/plugin-catalog": "^1.19.0", - "@backstage/plugin-catalog-common": "^1.0.22", - "@backstage/plugin-catalog-graph": "^0.4.4", - "@backstage/plugin-catalog-import": "^0.10.10", - "@backstage/plugin-catalog-react": "^1.11.3", + "@backstage/integration-react": "^1.1.27", + "@backstage/plugin-api-docs": "^0.11.5", + "@backstage/plugin-catalog": "^1.20.0", + "@backstage/plugin-catalog-common": "^1.0.23", + "@backstage/plugin-catalog-graph": "^0.4.5", + "@backstage/plugin-catalog-import": "^0.11.0", + "@backstage/plugin-catalog-react": "^1.12.0", "@backstage/plugin-devtools": "^0.1.13", - "@backstage/plugin-org": "^0.6.24", + "@backstage/plugin-org": "^0.6.25", "@backstage/plugin-permission-react": "^0.4.22", - "@backstage/plugin-scaffolder": "^1.19.3", - "@backstage/plugin-search": "^1.4.10", - "@backstage/plugin-search-react": "^1.7.10", + "@backstage/plugin-scaffolder": "^1.20.0", + "@backstage/plugin-search": "^1.4.11", + "@backstage/plugin-search-react": "^1.7.11", "@backstage/plugin-tech-radar": "^0.7.3", - "@backstage/plugin-techdocs": "^1.10.4", - "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.9", - "@backstage/plugin-techdocs-react": "^1.2.3", - "@backstage/plugin-user-settings": "^0.8.5", - "@backstage/theme": "^0.5.3", + "@backstage/plugin-techdocs": "^1.10.5", + "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.10", + "@backstage/plugin-techdocs-react": "^1.2.4", + "@backstage/plugin-user-settings": "^0.8.6", + "@backstage/theme": "^0.5.5", "@bestsellerit/backstage-plugin-harbor": "^0.3.1", "@mui/material": "next", "@internal/backstage-plugin-devspaces-plugin": "^0.1.0", diff --git a/sreez-showcase/packages/app/src/App.tsx b/sreez-showcase/packages/app/src/App.tsx index b58eb5b..4fc66ab 100644 --- a/sreez-showcase/packages/app/src/App.tsx +++ b/sreez-showcase/packages/app/src/App.tsx @@ -26,8 +26,7 @@ import {githubAuthApiRef} from '@backstage/core-plugin-api'; import {UnifiedThemeProvider} from '@backstage/theme'; import {SreezCustomTheme} from './theme/custom'; import LightIcon from '@material-ui/icons/WbSunny'; -import {TechRadarPage} from "@backstage-community/plugin-tech-radar"; -import {DevToolsPage} from '@backstage/plugin-devtools'; +import {DevspacesPluginPage} from '@internal/backstage-plugin-devspaces-plugin'; const app = createApp({ themes: [{ @@ -77,6 +76,7 @@ const app = createApp({ const routes = ( + }> }/> }/> {overviewContent} - - - + {/**/} + {/* */} + {/**/} @@ -34,7 +33,7 @@ export const serviceEntityPage = ( - + {buildsContent} {entityWarningContent} - - - - + + + {/**/} - + - + + {/**/} + + + + + + + + + + + - + @@ -58,13 +70,10 @@ export const overviewContent = ( {/*/!**!/*/} {/**/} - {/* */} {/**/} {/**/} - {/* */} {/**/} {/**/} - {/* */} {/**/} diff --git a/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/DevspacesComponent.tsx b/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/DevspacesComponent.tsx index 372500f..0bc0beb 100644 --- a/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/DevspacesComponent.tsx +++ b/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/DevspacesComponent.tsx @@ -1,40 +1,29 @@ import React from 'react'; -import { useEntity } from '@backstage/plugin-catalog-react' -import { Typography, Box, Grid, Divider, Paper, Card, CardHeader, CardContent } from '@material-ui/core'; -import { - InfoCard, - Header, - Page, - Content, - ContentHeader, - HeaderLabel, - Link, - SupportButton, - Table, -} from '@backstage/core-components'; -import { ExampleFetchComponent } from '../ExampleFetchComponent'; +import {useEntity} from '@backstage/plugin-catalog-react' +import {Box, Card, CardContent, CardHeader, Divider, Grid, Paper} from '@material-ui/core'; +import {Link,} from '@backstage/core-components'; export const DevspacesComponent = () => { - const { entity } = useEntity(); - const annotations = entity?.metadata?.annotations; - const clusterUrl = "oc-med.wk.nt.local" - const devspacesApp = "devspaces" - const devspacesLink = `https://${devspacesApp}.apps.${clusterUrl}/#https://github.com/${annotations?.['github.com/project-slug']}`; + const {entity} = useEntity(); + const annotations = entity?.metadata?.annotations; + const clusterUrl = "oc-med.wk.nt.local" + const devspacesApp = "devspaces" + const devspacesLink = `https://${devspacesApp}.apps.${clusterUrl}/#https://github.com/${annotations?.['github.com/project-slug']}`; - return ( - - - - {/**/} - OpenShift DevSpaces }/> - - - - Open project in VSCode Web IDE - - - - - - ); + return ( + + + + {/**/} + OpenShift DevSpaces }/> + + + + Open project in VSCode Web IDE + + + + + + ); }; diff --git a/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/ExampleComponent.test.tsx b/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/ExampleComponent.test.tsx deleted file mode 100644 index dae8923..0000000 --- a/sreez-showcase/plugins/devspaces-plugin/src/components/DevspacesComponent/ExampleComponent.test.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { ExampleComponent } from './ExampleComponent'; -import { rest } from 'msw'; -import { setupServer } from 'msw/node'; -import { screen } from '@testing-library/react'; -import { - setupRequestMockHandlers, - renderInTestApp, -} from '@backstage/test-utils'; - -describe('ExampleComponent', () => { - const server = setupServer(); - // Enable sane handlers for network requests - setupRequestMockHandlers(server); - - // setup mock response - beforeEach(() => { - server.use( - rest.get('/*', (_, res, ctx) => res(ctx.status(200), ctx.json({}))), - ); - }); - - it('should render', async () => { - await renderInTestApp(); - expect( - screen.getByText('Welcome to devspaces-plugin!'), - ).toBeInTheDocument(); - }); -}); diff --git a/sreez-showcase/yarn.lock b/sreez-showcase/yarn.lock index d1a0631..6e60271 100644 --- a/sreez-showcase/yarn.lock +++ b/sreez-showcase/yarn.lock @@ -2117,22 +2117,6 @@ luxon "^3.0.0" react-use "^17.2.4" -"@backstage-community/plugin-tech-radar@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@backstage-community/plugin-tech-radar/-/plugin-tech-radar-0.7.4.tgz#2bf4c7f0749f422f066053d671ae5478771a1277" - integrity sha512-HPsR13J6bkBzhritV4C0lImoR61xa1SozSQ6yEtmbqmYinDgZ3JxRV3rzecSqD/Znc8tnoSqgvzsSViOBrua0Q== - dependencies: - "@backstage/core-compat-api" "^0.2.4" - "@backstage/core-components" "^0.14.4" - "@backstage/core-plugin-api" "^1.9.2" - "@backstage/frontend-plugin-api" "^0.6.4" - "@material-ui/core" "^4.12.2" - "@material-ui/icons" "^4.9.1" - "@types/react" "^16.13.1 || ^17.0.0 || ^18.0.0" - color "^4.0.1" - d3-force "^3.0.0" - react-use "^17.2.4" - "@backstage/app-defaults@^1.5.5": version "1.5.5" resolved "https://registry.yarnpkg.com/@backstage/app-defaults/-/app-defaults-1.5.5.tgz#0a5e8e25c4941efc974a31fe0cb83d00e3c52325" @@ -2802,123 +2786,6 @@ yn "^4.0.0" zod "^3.22.4" -"@backstage/cli@^0.26.6": - version "0.26.6" - resolved "https://registry.yarnpkg.com/@backstage/cli/-/cli-0.26.6.tgz#7da045d08dad2c797904b00402b76355e420f24f" - integrity sha512-g9/0smHu6ltcWuDVJBRbAzEDzj0ijb1jbfk7qqyWqIkWLnK0VqbTzgLPPEvIgOMG4VSCqDop46DCVPcOi3qeUQ== - dependencies: - "@backstage/catalog-model" "^1.5.0" - "@backstage/cli-common" "^0.1.13" - "@backstage/cli-node" "^0.2.5" - "@backstage/config" "^1.2.0" - "@backstage/config-loader" "^1.8.0" - "@backstage/errors" "^1.2.4" - "@backstage/eslint-plugin" "^0.1.8" - "@backstage/integration" "^1.11.0" - "@backstage/release-manifests" "^0.0.11" - "@backstage/types" "^1.1.1" - "@manypkg/get-packages" "^1.1.3" - "@octokit/graphql" "^5.0.0" - "@octokit/graphql-schema" "^13.7.0" - "@octokit/oauth-app" "^4.2.0" - "@octokit/request" "^6.0.0" - "@pmmmwh/react-refresh-webpack-plugin" "^0.5.7" - "@rollup/plugin-commonjs" "^25.0.0" - "@rollup/plugin-json" "^6.0.0" - "@rollup/plugin-node-resolve" "^15.0.0" - "@rollup/plugin-yaml" "^4.0.0" - "@spotify/eslint-config-base" "^15.0.0" - "@spotify/eslint-config-react" "^15.0.0" - "@spotify/eslint-config-typescript" "^15.0.0" - "@sucrase/webpack-loader" "^2.0.0" - "@svgr/core" "6.5.x" - "@svgr/plugin-jsx" "6.5.x" - "@svgr/plugin-svgo" "6.5.x" - "@svgr/rollup" "6.5.x" - "@svgr/webpack" "6.5.x" - "@swc/core" "^1.3.46" - "@swc/helpers" "^0.5.0" - "@swc/jest" "^0.2.22" - "@types/jest" "^29.5.11" - "@types/webpack-env" "^1.15.2" - "@typescript-eslint/eslint-plugin" "^6.12.0" - "@typescript-eslint/parser" "^6.7.2" - "@yarnpkg/lockfile" "^1.1.0" - "@yarnpkg/parsers" "^3.0.0-rc.4" - bfj "^8.0.0" - buffer "^6.0.3" - chalk "^4.0.0" - chokidar "^3.3.1" - commander "^12.0.0" - cross-fetch "^4.0.0" - cross-spawn "^7.0.3" - css-loader "^6.5.1" - ctrlc-windows "^2.1.0" - diff "^5.0.0" - esbuild "^0.20.0" - esbuild-loader "^4.0.0" - eslint "^8.6.0" - eslint-config-prettier "^9.0.0" - eslint-formatter-friendly "^7.0.0" - eslint-plugin-deprecation "^2.0.0" - eslint-plugin-import "^2.25.4" - eslint-plugin-jest "^27.0.0" - eslint-plugin-jsx-a11y "^6.5.1" - eslint-plugin-react "^7.28.0" - eslint-plugin-react-hooks "^4.3.0" - eslint-plugin-unused-imports "^3.0.0" - eslint-webpack-plugin "^4.0.0" - express "^4.17.1" - fork-ts-checker-webpack-plugin "^9.0.0" - fs-extra "^11.2.0" - git-url-parse "^14.0.0" - glob "^7.1.7" - global-agent "^3.0.0" - handlebars "^4.7.3" - html-webpack-plugin "^5.3.1" - inquirer "^8.2.0" - jest "^29.7.0" - jest-css-modules "^2.1.0" - jest-environment-jsdom "^29.0.2" - jest-runtime "^29.0.2" - json-schema "^0.4.0" - lodash "^4.17.21" - mini-css-extract-plugin "^2.4.2" - minimatch "^9.0.0" - node-fetch "^2.6.7" - node-libs-browser "^2.2.1" - npm-packlist "^5.0.0" - ora "^5.3.0" - p-limit "^3.1.0" - p-queue "^6.6.2" - pirates "^4.0.6" - postcss "^8.1.0" - process "^0.11.10" - react-dev-utils "^12.0.0-next.60" - react-refresh "^0.14.0" - recursive-readdir "^2.2.2" - replace-in-file "^7.1.0" - rollup "^4.0.0" - rollup-plugin-dts "^6.1.0" - rollup-plugin-esbuild "^6.1.1" - rollup-plugin-postcss "^4.0.0" - rollup-pluginutils "^2.8.2" - run-script-webpack-plugin "^0.2.0" - semver "^7.5.3" - style-loader "^3.3.1" - sucrase "^3.20.2" - swc-loader "^0.2.3" - tar "^6.1.12" - terser-webpack-plugin "^5.1.3" - util "^0.12.3" - webpack "^5.70.0" - webpack-dev-server "^5.0.0" - webpack-node-externals "^3.0.0" - yaml "^2.0.0" - yml-loader "^2.1.0" - yn "^4.0.0" - zod "^3.22.4" - "@backstage/config-loader@^1.5.3", "@backstage/config-loader@^1.6.2", "@backstage/config-loader@^1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@backstage/config-loader/-/config-loader-1.8.0.tgz#6b526475c45cd93ee51a0ddcb7e1f5bd49469eeb" @@ -3239,14 +3106,6 @@ "@manypkg/get-packages" "^1.1.3" minimatch "^9.0.0" -"@backstage/eslint-plugin@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@backstage/eslint-plugin/-/eslint-plugin-0.1.8.tgz#4c554916ae9bdce17ab7082a5c341646f170c9b7" - integrity sha512-pYAGh3LoTlM0JhW+5ujEim+AjGs6xnGJcZAlnQ0jnlqdItSvMklL1mIkpwgY2i9NM6AxYzoYnXF8AQxnz6RSTg== - dependencies: - "@manypkg/get-packages" "^1.1.3" - minimatch "^9.0.0" - "@backstage/frontend-plugin-api@^0.6.4": version "0.6.4" resolved "https://registry.yarnpkg.com/@backstage/frontend-plugin-api/-/frontend-plugin-api-0.6.4.tgz#d9d09c137cbd879cd66b3c92ab8a608be7e48d1b" @@ -4069,7 +3928,7 @@ "@backstage/plugin-permission-common" "^0.7.13" "@backstage/types" "^1.1.1" -"@backstage/plugin-devtools@^0.1.14": +"@backstage/plugin-devtools@^0.1.13": version "0.1.14" resolved "https://registry.yarnpkg.com/@backstage/plugin-devtools/-/plugin-devtools-0.1.14.tgz#9322eedfe9ec1bb103b8ab9df42d8c103ece4f85" integrity sha512-YIRuJhNDwM0uExjDiTAQV3565OcpR0aj0BgmweALuEruFfhGpm2CxJcff5FOBhOI67zgQwWrjNKSJwNA6LF2UQ== @@ -4781,6 +4640,22 @@ qs "^6.9.4" react-use "^17.2.4" +"@backstage/plugin-tech-radar@^0.7.3": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@backstage/plugin-tech-radar/-/plugin-tech-radar-0.7.4.tgz#84e63604b4defab5571d44c58ead74682e071c9c" + integrity sha512-mP1J+8rdjbCiS5fXeOrwUxH1bPBiKC4ds42l0EPcTsvzz21bHmAMxMbN+MM+dhVpGy0h6DkOsmwrBDMXXZeEYQ== + dependencies: + "@backstage/core-compat-api" "^0.2.4" + "@backstage/core-components" "^0.14.4" + "@backstage/core-plugin-api" "^1.9.2" + "@backstage/frontend-plugin-api" "^0.6.4" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@types/react" "^16.13.1 || ^17.0.0 || ^18.0.0" + color "^4.0.1" + d3-force "^3.0.0" + react-use "^17.2.4" + "@backstage/plugin-techdocs-backend@^1.10.4": version "1.10.4" resolved "https://registry.yarnpkg.com/@backstage/plugin-techdocs-backend/-/plugin-techdocs-backend-1.10.4.tgz#91039acc95c13a7593839468001ef8d87d025248" @@ -11474,10 +11349,9 @@ anymatch@^3.0.3, anymatch@~3.1.2: version "0.0.0" dependencies: "@backstage-community/plugin-github-actions" "^0.6.16" - "@backstage-community/plugin-tech-radar" "0.7.4" "@backstage/app-defaults" "^1.5.5" "@backstage/catalog-model" "^1.5.0" - "@backstage/cli" "^0.26.6" + "@backstage/cli" "^0.26.3" "@backstage/core-app-api" "^1.12.5" "@backstage/core-components" "^0.14.7" "@backstage/core-plugin-api" "^1.9.2" @@ -11488,18 +11362,20 @@ anymatch@^3.0.3, anymatch@~3.1.2: "@backstage/plugin-catalog-graph" "^0.4.5" "@backstage/plugin-catalog-import" "^0.11.0" "@backstage/plugin-catalog-react" "^1.12.0" - "@backstage/plugin-devtools" "^0.1.14" + "@backstage/plugin-devtools" "^0.1.13" "@backstage/plugin-org" "^0.6.25" "@backstage/plugin-permission-react" "^0.4.22" "@backstage/plugin-scaffolder" "^1.20.0" "@backstage/plugin-search" "^1.4.11" "@backstage/plugin-search-react" "^1.7.11" + "@backstage/plugin-tech-radar" "^0.7.3" "@backstage/plugin-techdocs" "^1.10.5" "@backstage/plugin-techdocs-module-addons-contrib" "^1.1.10" "@backstage/plugin-techdocs-react" "^1.2.4" "@backstage/plugin-user-settings" "^0.8.6" "@backstage/theme" "^0.5.5" "@bestsellerit/backstage-plugin-harbor" "^0.3.1" + "@internal/backstage-plugin-devspaces-plugin" "^0.1.0" "@janus-idp/plugin-notifications" "^1.3.1" "@material-ui/icons" "^4.11.3" "@mui/material" next