From f82ea2306124c298aaf9f072345902eacd49a4bc Mon Sep 17 00:00:00 2001 From: Yulia Shanyrova Date: Wed, 6 Aug 2025 15:56:12 +0200 Subject: [PATCH] Plugins: Remove duplication of links from plugin details header (#108899) remove duplication of links from plugin details header --- .../admin/components/PluginSubtitle.test.tsx | 12 +++-------- .../admin/components/PluginSubtitle.tsx | 20 +------------------ 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/public/app/features/plugins/admin/components/PluginSubtitle.test.tsx b/public/app/features/plugins/admin/components/PluginSubtitle.test.tsx index cf2efa6fe54..113ec3fe54e 100644 --- a/public/app/features/plugins/admin/components/PluginSubtitle.test.tsx +++ b/public/app/features/plugins/admin/components/PluginSubtitle.test.tsx @@ -62,16 +62,10 @@ describe('PluginSubtitle', () => { expect(screen.getByText('Test description')).toBeInTheDocument(); }); - it('renders links', () => { - render(); - expect(screen.getByText('Website')).toHaveAttribute('href', 'http://test.com'); - }); - it('shows error alert when installation error exists', () => { - jest.spyOn(runtime, 'useInstallStatus').mockReturnValueOnce({ - error: { message: 'Install failed', error: 'Details' }, - isInstalling: false, - }); + jest + .spyOn(runtime, 'useInstallStatus') + .mockReturnValueOnce({ error: { message: 'Install failed', error: 'Details' }, isInstalling: false }); render(); expect(screen.getByText('Install failed')).toBeInTheDocument(); }); diff --git a/public/app/features/plugins/admin/components/PluginSubtitle.tsx b/public/app/features/plugins/admin/components/PluginSubtitle.tsx index 6e725eb014f..0ebd745495c 100644 --- a/public/app/features/plugins/admin/components/PluginSubtitle.tsx +++ b/public/app/features/plugins/admin/components/PluginSubtitle.tsx @@ -45,18 +45,6 @@ export const PluginSubtitle = ({ plugin }: Props) => {
{plugin?.description &&
{plugin?.description}
} - {!!plugin?.details?.links?.length && ( - - {plugin.details.links.map((link, index) => ( - - {index > 0 && ' | '} - - {link.name} - - - ))} - - )} {hasInstallControlWarning(plugin, isRemotePluginsAvailable, latestCompatibleVersion) && ( { }; export const getStyles = (theme: GrafanaTheme2) => { - return { - subtitle: css({ - display: 'flex', - flexDirection: 'column', - gap: theme.spacing(1), - }), - }; + return { subtitle: css({ display: 'flex', flexDirection: 'column', gap: theme.spacing(1) }) }; };