From fd5c14757486ef510741ac344469b1ccfe2a6242 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Mon, 31 Oct 2022 11:34:21 +0000 Subject: [PATCH] Chore: Update footer changelog link to github (#57871) --- .pa11yci-pr.conf.js | 20 ++++++++++---------- public/app/core/components/Footer/Footer.tsx | 11 +++-------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.pa11yci-pr.conf.js b/.pa11yci-pr.conf.js index b44ca977eb8..e912902c2e4 100644 --- a/.pa11yci-pr.conf.js +++ b/.pa11yci-pr.conf.js @@ -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, }, ], }; diff --git a/public/app/core/components/Footer/Footer.tsx b/public/app/core/components/Footer/Footer.tsx index 48927a73276..c73c2ea53d1 100644 --- a/public/app/core/components/Footer/Footer.tsx +++ b/public/app/core/components/Footer/Footer.tsx @@ -40,11 +40,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, }; } @@ -65,17 +64,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) {