From d1e06392a153268ce70dd0ca1cd8dc75f859b0c0 Mon Sep 17 00:00:00 2001 From: Marek Calus Date: Sat, 31 Oct 2020 20:41:08 +0100 Subject: [PATCH] Cleanup catalog-import plugin --- packages/app/src/App.tsx | 2 +- plugins/catalog-import/README.md | 22 +++++-- .../src/api/CatalogImportApi.ts | 20 +----- .../src/api/CatalogImportClient.ts | 24 ++----- plugins/catalog-import/src/api/index.ts | 16 ----- plugins/catalog-import/src/api/types.ts | 38 ----------- .../src/assets/catalog-import-screenshot.png | Bin 0 -> 22602 bytes .../ComponentConfigDisplay.tsx | 22 +------ .../ImportComponentForm.tsx | 62 ++---------------- .../components/ImportComponentForm/index.ts | 17 ----- .../ImportComponentPage.tsx | 18 +++-- .../components/ImportComponentPage/index.ts | 17 ----- .../ImportFinished.tsx | 7 -- .../ImportStepper.tsx | 0 .../catalog-import/src/components/Router.tsx | 3 +- plugins/catalog-import/src/plugin.test.ts | 2 +- plugins/catalog-import/src/plugin.ts | 20 +----- plugins/catalog-import/src/util/types.ts | 4 ++ .../useGithubRepos.ts | 26 ++------ .../ScaffolderPage/ScaffolderPage.tsx | 2 +- 20 files changed, 60 insertions(+), 262 deletions(-) delete mode 100644 plugins/catalog-import/src/api/types.ts create mode 100644 plugins/catalog-import/src/assets/catalog-import-screenshot.png rename plugins/catalog-import/src/components/{ImportComponentPage => }/ComponentConfigDisplay.tsx (73%) rename plugins/catalog-import/src/components/{ImportComponentForm => }/ImportComponentForm.tsx (60%) delete mode 100644 plugins/catalog-import/src/components/ImportComponentForm/index.ts rename plugins/catalog-import/src/components/{ImportComponentPage => }/ImportComponentPage.tsx (90%) delete mode 100644 plugins/catalog-import/src/components/ImportComponentPage/index.ts rename plugins/catalog-import/src/components/{ImportComponentPage => }/ImportFinished.tsx (94%) rename plugins/catalog-import/src/components/{ImportComponentPage => }/ImportStepper.tsx (100%) rename plugins/catalog-import/src/{components/ImportComponentPage => util}/useGithubRepos.ts (63%) diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index cd3ae4ff40..0454da74e1 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -68,6 +68,7 @@ const catalogRouteRef = createRouteRef({ const AppRoutes = () => ( + } /> } @@ -83,7 +84,6 @@ const AppRoutes = () => ( path="/register-component" element={} /> - } /> } /> {...deprecatedAppRoutes} diff --git a/plugins/catalog-import/README.md b/plugins/catalog-import/README.md index 682212d98d..1dc0d7cf89 100644 --- a/plugins/catalog-import/README.md +++ b/plugins/catalog-import/README.md @@ -1,7 +1,21 @@ -# Register component plugin +# Catalog import plugin -Welcome to the import-component plugin! +Welcome to the catalog-import plugin! -This plugin allows you to create a component-config YAML file for your repository. +This plugin allows you to bootstrap a component-config YAML file for your repository and open a pull request to add it. -When installed it is accessible on [localhost:3000/import-component](localhost:3000/import-component). +When installed it is accessible on [localhost:3000/catalog-import](localhost:3000/catalog-import). + + + +## Running + +Just run the backstage. + +``` +yarn start && yarn --cwd packages/backend start +``` + +## Usage + +Pretty straightforward, navigate to [localhost:3000/catalog-import](localhost:3000/catalog-import) and enter your repo's URL. diff --git a/plugins/catalog-import/src/api/CatalogImportApi.ts b/plugins/catalog-import/src/api/CatalogImportApi.ts index 58d1f87f00..28749d02cb 100644 --- a/plugins/catalog-import/src/api/CatalogImportApi.ts +++ b/plugins/catalog-import/src/api/CatalogImportApi.ts @@ -13,25 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * Copyright 2020 Roadie 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 { createApiRef } from '@backstage/core'; -import { Entity } from '@backstage/catalog-model'; -import { RecursivePartial } from '../util/types'; +import { PartialEntity } from '../util/types'; export const catalogImportApiRef = createApiRef({ id: 'plugin.catalogimport.service', @@ -52,5 +36,5 @@ export interface CatalogImportApi { }): Promise<{ errorMessage: string | null }>; generateEntityDefinitions(options: { repo: string; - }): Promise[]>; + }): Promise; } diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index d67febe2c8..2da0ff02a7 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -13,28 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * Copyright 2020 Roadie 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 { Octokit } from '@octokit/rest'; -import { Entity } from '@backstage/catalog-model'; import { DiscoveryApi } from '@backstage/core'; import { CatalogImportApi } from './CatalogImportApi'; import { AnalyzeLocationResponse } from '@backstage/plugin-catalog-backend'; -import { RecursivePartial } from '../util/types'; +import { PartialEntity } from '../util/types'; export const API_BASE_URL = '/api/catalog/locations'; @@ -49,7 +33,7 @@ export class CatalogImportClient implements CatalogImportApi { repo, }: { repo: string; - }): Promise[]> { + }): Promise { const response = await fetch( `${await this.discoveryApi.getBaseUrl('catalog')}/analyze-location`, { @@ -117,7 +101,7 @@ export class CatalogImportClient implements CatalogImportApi { await octo.repos.createOrUpdateFileContents({ owner, repo, - path: 'backstage.yaml', + path: 'catalog-info.yaml', message: 'Add backstage.yaml config file', content: btoa(fileContent), branch: 'backstage-integration', @@ -125,7 +109,7 @@ export class CatalogImportClient implements CatalogImportApi { const pullRequestRespone = await octo.pulls.create({ owner, repo, - title: 'Add backstage.yaml config file', + title: 'Add catalog-info.yaml config file', head: 'backstage-integration', base: 'master', }); diff --git a/plugins/catalog-import/src/api/index.ts b/plugins/catalog-import/src/api/index.ts index 9ebc110843..078342d284 100644 --- a/plugins/catalog-import/src/api/index.ts +++ b/plugins/catalog-import/src/api/index.ts @@ -13,22 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * Copyright 2020 Roadie 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. - */ export * from './CatalogImportApi'; export * from './CatalogImportClient'; -export * from './types'; diff --git a/plugins/catalog-import/src/api/types.ts b/plugins/catalog-import/src/api/types.ts deleted file mode 100644 index c18d0cf547..0000000000 --- a/plugins/catalog-import/src/api/types.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ -/* - * Copyright 2020 Roadie 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. - */ - -export type GithubRepoDto = { - full_name: string; - private: boolean; - description: string; - html_url: string; - language: string; -}; diff --git a/plugins/catalog-import/src/assets/catalog-import-screenshot.png b/plugins/catalog-import/src/assets/catalog-import-screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..7ba8ae9eb53c078010bf2ea461f015783a46dced GIT binary patch literal 22602 zcmZ^KWmFtZ(C*?c!QGwU?h@SHCAj+nVQ~mfaDux92<{HS-Q9yNZj0N^`+evBy667r zo|@;Wsj04(bEdl{N=-!;4VefT005xL%SmYf05D(x0BRf&<{#p?CTa8U0&63oECB%2 z#iP8M!Tr03^3af#1XNFv9RJe>s3~ble|&sUxSCVBSr9rHbNV`S`MGfTIzK)>;^X53 z3>ES14N06#sogCf9v)bI9PaM!=z%s&UUoRP`pn*T>>wvhD;+Ewz3uI7Za-I86BSZt zQ*sxxi;D|lM-x0dLs}23ot>S9g#`vroBR9wwY9a=)6=oBv7@7-+uK`sQ&l80b>09s zC?h2b3JU%}kGHosbW82`k9RZ+EfEosrluw^7>sJ6iDIt#`Sa)8++2}RFUTF_=H^Bq z$U`XD6UJCsKR%3*fPmF|hKY$uIK)%T-<^nnhta~%&i;BClT|MvCa^@Eb4!qxuFkHQ8%M#_Tz?eE`1w=V9} z)3fIPUR>`CEuG$%RM*o9YEsa#_*tsfS7b_lk!GN$Wu_!8P4Q6@xC@?L5}l_!|dz|o9LD(C-q2QS0f>EOQ#5NlThWDkZ?D1F&(#oUpdx=Yn%Jv zKqEoltF4!ldE>+t8Up<0j^g6t$@Pv{P-d%Xq*HrwvrT^!@b?Cjs$=(0FSEuvQ75aA z<~=5_w4vXP5^=H2KT?y6oE%gAGlA+tLG!r-1GCl6vavM-U26%Y5k!v0?7_jlvq#A} zOY%`m-#Uk~8*;-BcCgv0S^)qGfV`B1*0;5VY}LrUCDLK<*P1wy^lLp{GUD}Gk;#=k zLNqIc=BBccrpAe4Oct0`H3f>4V#*R61NJTgas@;jNjs!=cmws3Ccdgt2?{Ou6A3=@ zd-h*nHN866Q|{n-AtLh4R&V}ER`K^Qe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{eH47Ry`? z7^-vV=10?xu|U_6KSo^q1K&n&TLDAAU{KyhmG2=I0G=oIRy={)+ZPK{%nMrDc@R+B z<^s&=!tyLgoVT4f#9VM^s3#5&Twp0KT5+EF^2Sll^|;(3`RDd{UXKyJ?+|bYWCMCX zx_wN20;EpDK_4z-bDs0_I`+3s@ylYW-&Sm}bXF#7y>Gn7`#vYRIsfwRgQp;=hE&bV z)@piy_$cNCFJW|B;Xp{hLJa=Bl!2J?Yohcs3p2C-SEh#p1go|=ylfqn5-SR3N&kPY fBLox)Kc(paVVIIDl|g6CfT`~4o9b0T9zOdYx3aI{ literal 0 HcmV?d00001 diff --git a/plugins/catalog-import/src/components/ImportComponentPage/ComponentConfigDisplay.tsx b/plugins/catalog-import/src/components/ComponentConfigDisplay.tsx similarity index 73% rename from plugins/catalog-import/src/components/ImportComponentPage/ComponentConfigDisplay.tsx rename to plugins/catalog-import/src/components/ComponentConfigDisplay.tsx index 22d3dac322..1fe1543bdd 100644 --- a/plugins/catalog-import/src/components/ImportComponentPage/ComponentConfigDisplay.tsx +++ b/plugins/catalog-import/src/components/ComponentConfigDisplay.tsx @@ -13,32 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * Copyright 2020 RoadieHQ - * - * 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, { useCallback, useState } from 'react'; import { Button, CircularProgress, Grid, Tooltip } from '@material-ui/core'; import Alert from '@material-ui/lab/Alert'; -import { useGithubRepos } from './useGithubRepos'; -import { Entity } from '@backstage/catalog-model'; -import { RecursivePartial } from '../../util/types'; +import { useGithubRepos } from '../util/useGithubRepos'; +import { ConfigSpec } from './ImportComponentPage'; type Props = { nextStep: () => void; - configFile: { repo: string; config: RecursivePartial[] }; + configFile: ConfigSpec; savePRLink: (PRLink: string) => void; }; diff --git a/plugins/catalog-import/src/components/ImportComponentForm/ImportComponentForm.tsx b/plugins/catalog-import/src/components/ImportComponentForm.tsx similarity index 60% rename from plugins/catalog-import/src/components/ImportComponentForm/ImportComponentForm.tsx rename to plugins/catalog-import/src/components/ImportComponentForm.tsx index 876d198d5c..5b26c27d09 100644 --- a/plugins/catalog-import/src/components/ImportComponentForm/ImportComponentForm.tsx +++ b/plugins/catalog-import/src/components/ImportComponentForm.tsx @@ -14,25 +14,21 @@ * limitations under the License. */ -import { Entity } from '@backstage/catalog-model'; import { errorApiRef, useApi } from '@backstage/core'; import { BackstageTheme } from '@backstage/theme'; import { Button, FormControl, FormHelperText, - InputLabel, - MenuItem, - Select, TextField, } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; -import { Controller, useForm } from 'react-hook-form'; +import { useForm } from 'react-hook-form'; import { useMountedState } from 'react-use'; -import { RecursivePartial } from '../../util/types'; -import { ComponentIdValidators } from '../../util/validate'; -import { useGithubRepos } from '../ImportComponentPage/useGithubRepos'; +import { ComponentIdValidators } from '../util/validate'; +import { useGithubRepos } from '../util/useGithubRepos'; +import { ConfigSpec } from './ImportComponentPage'; const useStyles = makeStyles(theme => ({ form: { @@ -43,21 +39,15 @@ const useStyles = makeStyles(theme => ({ submit: { marginTop: theme.spacing(1), }, - select: { - minWidth: 120, - }, })); type Props = { nextStep: () => void; - saveConfig: (configFile: { - repo: string; - config: RecursivePartial[]; - }) => void; + saveConfig: (configFile: ConfigSpec) => void; }; export const RegisterComponentForm = ({ nextStep, saveConfig }: Props) => { - const { control, register, handleSubmit, errors, formState } = useForm({ + const { register, handleSubmit, errors, formState } = useForm({ mode: 'onChange', }); const classes = useStyles(); @@ -71,22 +61,9 @@ export const RegisterComponentForm = ({ nextStep, saveConfig }: Props) => { const onSubmit = async (formData: Record) => { const { componentLocation: target } = formData; try { - // const typeMapping = [ - // { url: /^https:\/\/gitlab\.com\/.*/, type: 'gitlab/api' }, - // { url: /^https:\/\/bitbucket\.org\/.*/, type: 'bitbucket/api' }, - // { url: /^https:\/\/dev\.azure\.com\/.*/, type: 'azure/api' }, - // { url: /.*/, type: 'github' }, - // ]; - - // const type = - // scmType === 'AUTO' - // ? typeMapping.filter(item => item.url.test(target))[0].type - // : scmType; - if (!isMounted()) return; const repo = target.split('/').slice(-2).join('/'); - const config = await generateEntityDefinitions(repo); saveConfig({ repo, @@ -103,20 +80,18 @@ export const RegisterComponentForm = ({ nextStep, saveConfig }: Props) => { autoComplete="off" onSubmit={handleSubmit(onSubmit)} className={classes.form} - data-testid="register-form" > { )} - - Host type - ( - - )} - /> -