From aaa7d9450fdcbd5cbed48e64bfb2c3e1befb0ffa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Mon, 28 May 2018 15:43:24 +0200 Subject: [PATCH] SONAR-10703 Add the current edition in the footer --- .../src/main/js/app/components/GlobalFooter.tsx | 6 ++++++ .../main/js/app/components/GlobalFooterContainer.tsx | 6 ++++-- .../js/app/components/__tests__/GlobalFooter-test.tsx | 6 ++++-- .../__tests__/__snapshots__/GlobalFooter-test.tsx.snap | 10 ++++++++++ .../components/__tests__/EditionBox-test.tsx | 1 + server/sonar-web/src/main/js/apps/marketplace/utils.ts | 5 +++++ 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index 63e5ee4eab5..363102ff653 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -22,12 +22,14 @@ import { Link } from 'react-router'; import GlobalFooterSonarCloud from './GlobalFooterSonarCloud'; import GlobalFooterBranding from './GlobalFooterBranding'; import InstanceMessage from '../../components/common/InstanceMessage'; +import { EDITIONS } from '../../apps/marketplace/utils'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { isSonarCloud } from '../../helpers/system'; interface Props { hideLoggedInInfo?: boolean; productionDatabase: boolean; + sonarqubeEdition: string; sonarqubeVersion?: string; } @@ -40,6 +42,8 @@ export default function GlobalFooter({ return ; } + const currentEdition = EDITIONS.find(edition => edition.key === sonarqubeEdition); + return (