Footer: Display Grafana edition (#21717)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Emil Tullstedt
2020-01-27 09:24:44 +01:00
committed by GitHub
parent 84ef0ebb17
commit 3fabbbff4d
9 changed files with 60 additions and 27 deletions

View File

@@ -5,7 +5,7 @@ export interface FooterLink {
text: string;
icon?: string;
url?: string;
target: string;
target?: string;
}
export let getFooterLinks = (): FooterLink[] => {
@@ -17,7 +17,7 @@ export let getFooterLinks = (): FooterLink[] => {
target: '_blank',
},
{
text: 'Support & Enterprise',
text: 'Support',
icon: 'fa fa-support',
url: 'https://grafana.com/products/enterprise/?utm_source=grafana_footer',
target: '_blank',
@@ -32,15 +32,12 @@ export let getFooterLinks = (): FooterLink[] => {
};
export let getVersionLinks = (): FooterLink[] => {
const { buildInfo } = config;
const { buildInfo, licenseInfo } = config;
const links: FooterLink[] = [];
const stateInfo = licenseInfo.stateInfo ? ` (${licenseInfo.stateInfo})` : '';
const links: FooterLink[] = [
{
text: `Grafana v${buildInfo.version} (commit: ${buildInfo.commit})`,
url: 'https://grafana.com',
target: '_blank',
},
];
links.push({ text: `${buildInfo.edition}${stateInfo}`, url: licenseInfo.licenseUrl });
links.push({ text: `v${buildInfo.version} (${buildInfo.commit})` });
if (buildInfo.hasUpdate) {
links.push({

View File

@@ -180,7 +180,7 @@ exports[`ServerStats Should render table with stats 1`] = `
className="fa fa-support"
/>
Support & Enterprise
Support
</a>
</li>
<li>
@@ -198,13 +198,22 @@ exports[`ServerStats Should render table with stats 1`] = `
</li>
<li>
<a
href="https://grafana.com"
rel="noopener"
target="_blank"
>
<i />
Grafana vv1.0 (commit: 1)
undefined
</a>
</li>
<li>
<a
rel="noopener"
target="_blank"
>
<i />
vv1.0 (1)
</a>
</li>
</ul>