From 98bbdea69d972933dfcab064384a9746d5e3fa74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 15 Jan 2020 10:29:27 +0100 Subject: [PATCH] SideMenu: Fixes issue with logout link opened in new tab (#21488) * SideMenu: Fixes issue with logout link opened in new tab * Updated snapshot --- public/app/core/components/Footer/Footer.tsx | 8 +++++++- public/app/core/components/sidemenu/BottomNavLinks.tsx | 2 +- .../sidemenu/__snapshots__/BottomNavLinks.test.tsx.snap | 4 ---- .../admin/__snapshots__/ServerStats.test.tsx.snap | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/app/core/components/Footer/Footer.tsx b/public/app/core/components/Footer/Footer.tsx index ab4a6ed111f..6b706f32f16 100644 --- a/public/app/core/components/Footer/Footer.tsx +++ b/public/app/core/components/Footer/Footer.tsx @@ -5,24 +5,28 @@ export interface FooterLink { text: string; icon?: string; url?: string; + target: string; } export let getFooterLinks = (): FooterLink[] => { return [ { - text: 'Docs', + text: 'Documentation', icon: 'fa fa-file-code-o', url: 'https://grafana.com/docs/grafana/latest/?utm_source=grafana_footer', + target: '_blank', }, { text: 'Support & Enterprise', icon: 'fa fa-support', url: 'https://grafana.com/products/enterprise/?utm_source=grafana_footer', + target: '_blank', }, { text: 'Community', icon: 'fa fa-comments-o', url: 'https://community.grafana.com/?utm_source=grafana_footer', + target: '_blank', }, ]; }; @@ -34,6 +38,7 @@ export let getVersionLinks = (): FooterLink[] => { { text: `Grafana v${buildInfo.version} (commit: ${buildInfo.commit})`, url: 'https://grafana.com', + target: '_blank', }, ]; @@ -42,6 +47,7 @@ export let getVersionLinks = (): FooterLink[] => { text: `New version available!`, icon: 'fa fa-download', url: 'https://grafana.com/grafana/download?utm_source=grafana_footer', + target: '_blank', }); } diff --git a/public/app/core/components/sidemenu/BottomNavLinks.tsx b/public/app/core/components/sidemenu/BottomNavLinks.tsx index d1e1cc5811e..98e2b3820cd 100644 --- a/public/app/core/components/sidemenu/BottomNavLinks.tsx +++ b/public/app/core/components/sidemenu/BottomNavLinks.tsx @@ -76,7 +76,7 @@ class BottomNavLinks extends PureComponent { {children.map((child, index) => { return (
  • - + {child.icon && } {child.text} diff --git a/public/app/core/components/sidemenu/__snapshots__/BottomNavLinks.test.tsx.snap b/public/app/core/components/sidemenu/__snapshots__/BottomNavLinks.test.tsx.snap index 4474b36ee22..06b516c445f 100644 --- a/public/app/core/components/sidemenu/__snapshots__/BottomNavLinks.test.tsx.snap +++ b/public/app/core/components/sidemenu/__snapshots__/BottomNavLinks.test.tsx.snap @@ -20,7 +20,6 @@ exports[`Render should render children 1`] = ` >
  • - Docs + Documentation