Chore: Update footer changelog link to github (#57871) (#57895)

(cherry picked from commit fd5c147574)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-10-31 08:33:25 -04:00
committed by GitHub
co-authored by Josh Hunt
parent 3be1ddc56a
commit 92b10cc965
2 changed files with 13 additions and 18 deletions
+10 -10
View File
@@ -62,7 +62,7 @@ var config = {
url: '${HOST}/login',
wait: 500,
rootElement: '.main-view',
threshold: 12,
threshold: 13,
},
{
url: '${HOST}/login',
@@ -74,7 +74,7 @@ var config = {
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 13,
threshold: 14,
rootElement: '.main-view',
},
{
@@ -101,49 +101,49 @@ var config = {
rootElement: '.main-view',
// the unified alerting promotion alert's content contrast is too low
// see https://github.com/grafana/grafana/pull/41829
threshold: 5,
threshold: 6,
},
{
url: '${HOST}/datasources',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/users',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/teams',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/plugins',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/apikeys',
wait: 500,
rootElement: '.main-view',
threshold: 3,
threshold: 4,
},
{
url: '${HOST}/dashboards',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
],
};
+3 -8
View File
@@ -39,11 +39,10 @@ export let getFooterLinks = (): FooterLink[] => {
};
export function getVersionMeta(version: string) {
const containsHyphen = version.includes('-');
const isBeta = version.includes('-beta');
return {
hasReleaseNotes: !containsHyphen || isBeta,
hasReleaseNotes: true,
isBeta,
};
}
@@ -64,17 +63,13 @@ export let getVersionLinks = (): FooterLink[] => {
return links;
}
const { hasReleaseNotes, isBeta } = getVersionMeta(buildInfo.version);
const versionSlug = buildInfo.version.replace(/\./g, '-'); // replace all periods with hyphens
const docsVersion = isBeta ? 'next' : 'latest';
const { hasReleaseNotes } = getVersionMeta(buildInfo.version);
links.push({
target: '_blank',
id: 'version',
text: `v${buildInfo.version} (${buildInfo.commit})`,
url: hasReleaseNotes
? `https://grafana.com/docs/grafana/${docsVersion}/release-notes/release-notes-${versionSlug}/`
: undefined,
url: hasReleaseNotes ? `https://github.com/grafana/grafana/blob/main/CHANGELOG.md` : undefined,
});
if (buildInfo.hasUpdate) {