diff --git a/plugins/tech-radar/README.md b/plugins/tech-radar/README.md index c097b3f380..beaf2a0724 100644 --- a/plugins/tech-radar/README.md +++ b/plugins/tech-radar/README.md @@ -65,6 +65,7 @@ export interface TechRadarPageProps { ``` ### Radar properties + When defining the radar entries you can see the available properties on the file [api](./src/api.ts) ## Frequently Asked Questions diff --git a/plugins/tech-radar/src/api.ts b/plugins/tech-radar/src/api.ts index 8f88b1a8b6..db1be29f26 100644 --- a/plugins/tech-radar/src/api.ts +++ b/plugins/tech-radar/src/api.ts @@ -109,14 +109,6 @@ export interface RadarEntry { * You can use `#` if you don't want to provide any other url */ url: string; - /** - * Define the behaviour of the click defined on the url - * - * @remarks - * - * Empty is the default and the value possible are the same as W3C definition - */ - urlTarget?: string; /** * History of the Entry moving through {@link RadarRing} */ diff --git a/plugins/tech-radar/src/components/RadarComponent.tsx b/plugins/tech-radar/src/components/RadarComponent.tsx index 7239364f71..b439fb4d08 100644 --- a/plugins/tech-radar/src/components/RadarComponent.tsx +++ b/plugins/tech-radar/src/components/RadarComponent.tsx @@ -122,7 +122,6 @@ export function RadarComponent(props: TechRadarComponentProps) { moved: entry.timeline[0].moved, description: entry.description || entry.timeline[0].description, url: entry.url, - urlTarget: entry.urlTarget })); }; diff --git a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx index 5aebc8d8fb..302e77c1ac 100644 --- a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx +++ b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx @@ -19,7 +19,7 @@ import Dialog from '@material-ui/core/Dialog'; import DialogTitle from '@material-ui/core/DialogTitle'; import { Button, DialogActions, DialogContent } from '@material-ui/core'; import LinkIcon from '@material-ui/icons/Link'; -import { MarkdownContent } from '@backstage/core-components'; +import { Link, MarkdownContent } from '@backstage/core-components'; import { isValidUrl } from '../../utils/components'; export type Props = { @@ -28,20 +28,10 @@ export type Props = { title: string; description: string; url?: string; - urlTarget?: string; }; const RadarDescription = (props: Props): JSX.Element => { - const { open, onClose, title, description, url, urlTarget } = props; - - const handleClick = () => { - onClose(); - if (urlTarget) { - window.open(url, urlTarget); - } else { - window.location.href = url; - } - }; + const { open, onClose, title, description, url } = props; return ( @@ -54,7 +44,9 @@ const RadarDescription = (props: Props): JSX.Element => { {isValidUrl(url) && (