mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 03:32:37 -06:00
SideMenu: Fixes issue with logout link opened in new tab (#21488)
* SideMenu: Fixes issue with logout link opened in new tab * Updated snapshot
This commit is contained in:
parent
2355d0901a
commit
98bbdea69d
@ -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',
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class BottomNavLinks extends PureComponent<Props, State> {
|
||||
{children.map((child, index) => {
|
||||
return (
|
||||
<li key={`${child.text}-${index}`}>
|
||||
<a href={child.url} target="_blank" rel="noopener">
|
||||
<a href={child.url} target={child.target} rel="noopener">
|
||||
{child.icon && <i className={child.icon} />}
|
||||
{child.text}
|
||||
</a>
|
||||
|
@ -20,7 +20,6 @@ exports[`Render should render children 1`] = `
|
||||
>
|
||||
<a
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
@ -28,7 +27,6 @@ exports[`Render should render children 1`] = `
|
||||
>
|
||||
<a
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
@ -36,7 +34,6 @@ exports[`Render should render children 1`] = `
|
||||
>
|
||||
<a
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
@ -44,7 +41,6 @@ exports[`Render should render children 1`] = `
|
||||
>
|
||||
<a
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
/>
|
||||
</li>
|
||||
<li
|
||||
|
@ -167,7 +167,7 @@ exports[`ServerStats Should render table with stats 1`] = `
|
||||
className="fa fa-file-code-o"
|
||||
/>
|
||||
|
||||
Docs
|
||||
Documentation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
Loading…
Reference in New Issue
Block a user