scaffolder: track edit link
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
+13
-10
@@ -26,6 +26,7 @@ import MoreVert from '@material-ui/icons/MoreVert';
|
||||
import { SyntheticEvent, useState } from 'react';
|
||||
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { scaffolderTranslationRef } from '../../../translation';
|
||||
import { Link } from '@backstage/core-components';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
button: {
|
||||
@@ -82,16 +83,18 @@ export function TemplateWizardPageContextMenu(
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
>
|
||||
<MenuList>
|
||||
<MenuItem onClick={() => window.open(editUrl, '_blank')}>
|
||||
<ListItemIcon>
|
||||
<Edit fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={t(
|
||||
'templateWizardPage.pageContextMenu.editConfigurationTitle',
|
||||
)}
|
||||
/>
|
||||
</MenuItem>
|
||||
<Link to={editUrl} color="inherit">
|
||||
<MenuItem>
|
||||
<ListItemIcon>
|
||||
<Edit fontSize="small" />
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={t(
|
||||
'templateWizardPage.pageContextMenu.editConfigurationTitle',
|
||||
)}
|
||||
/>
|
||||
</MenuItem>
|
||||
</Link>
|
||||
</MenuList>
|
||||
</Popover>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user