import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import InstanceMessage from '../../components/common/InstanceMessage';
import { getEdition } from '../../helpers/editions';
-import { isSonarCloud } from '../../helpers/system';
import { EditionKey } from '../../types/editions';
import GlobalFooterBranding from './GlobalFooterBranding';
-import GlobalFooterSonarCloud from './GlobalFooterSonarCloud';
interface Props {
hideLoggedInInfo?: boolean;
sonarqubeEdition,
sonarqubeVersion
}: Props) {
- if (isSonarCloud()) {
- return <GlobalFooterSonarCloud />;
- }
-
const currentEdition = sonarqubeEdition && getEdition(sonarqubeEdition);
return (
)}
<li className="page-footer-menu-item">
<a
- href="http://www.gnu.org/licenses/lgpl-3.0.txt"
+ href="https://www.gnu.org/licenses/lgpl-3.0.txt"
rel="noopener noreferrer"
target="_blank">
{translate('footer.license')}
return official ? (
<div>
SonarQube™ technology is powered by{' '}
- <a href="http://www.sonarsource.com" rel="noopener noreferrer" target="_blank">
+ <a href="https://www.sonarsource.com" rel="noopener noreferrer" target="_blank">
SonarSource SA
</a>
</div>
<div>
This application is based on{' '}
<a
- href="http://www.sonarqube.org/?referrer=sonarqube"
+ href="https://www.sonarqube.org/?referrer=sonarqube"
rel="noopener noreferrer"
target="_blank"
title="SonarQube™">
</a>{' '}
but is <strong>not</strong> an official version provided by{' '}
<a
- href="http://www.sonarsource.com"
+ href="https://www.sonarsource.com"
rel="noopener noreferrer"
target="_blank"
title="SonarSource SA">
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2020 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-import * as getYear from 'date-fns/get_year';
-import * as React from 'react';
-import { Link } from 'react-router';
-import { translate } from 'sonar-ui-common/helpers/l10n';
-
-export default function GlobalFooterSonarCloud() {
- return (
- <div className="page-footer page-container" id="footer">
- <div>
- {`© 2008-${getYear(new Date())}, SonarCloud by `}
- <a
- href="http://www.sonarsource.com"
- rel="noopener noreferrer"
- target="_blank"
- title="SonarSource SA">
- SonarSource SA
- </a>
- . All rights reserved.
- </div>
-
- <ul className="page-footer-menu">
- <li className="page-footer-menu-item">
- <a
- href="https://blog.sonarsource.com/product/SonarCloud"
- rel="noopener noreferrer"
- target="_blank">
- {translate('footer.news')}
- </a>
- </li>
- <li className="page-footer-menu-item">
- <a href="https://twitter.com/sonarcloud" rel="noopener noreferrer" target="_blank">
- {translate('footer.twitter')}
- </a>
- </li>
- <li className="page-footer-menu-item">
- <Link rel="noopener noreferrer" target="_blank" to="/terms.pdf">
- {translate('footer.terms')}
- </Link>
- </li>
- <li className="page-footer-menu-item">
- <Link to="/about/pricing/">{translate('footer.pricing')}</Link>
- </li>
- <li className="page-footer-menu-item">
- <Link to="/documentation/privacy/">{translate('footer.privacy')}</Link>
- </li>
- <li className="page-footer-menu-item">
- <Link to="/documentation/security/">{translate('footer.security')}</Link>
- </li>
- <li className="page-footer-menu-item">
- <a
- href="https://community.sonarsource.com/c/help/sc"
- rel="noopener noreferrer"
- target="_blank">
- {translate('footer.help')}
- </a>
- </li>
- <li className="page-footer-menu-item">
- <Link to="/about/contact">{translate('footer.contact_us')}</Link>
- </li>
- <li className="page-footer-menu-item">
- <a href="https://sonarcloud.statuspage.io/" rel="noopener noreferrer" target="_blank">
- {translate('footer.status')}
- </a>
- </li>
- <li className="page-footer-menu-item">
- <Link to="/about">{translate('footer.about')}</Link>
- </li>
- </ul>
- </div>
- );
-}
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { isSonarCloud } from '../../../helpers/system';
import { EditionKey } from '../../../types/editions';
import GlobalFooter from '../GlobalFooter';
).toMatchSnapshot();
});
-it('should render SonarCloud footer', () => {
- expect(getWrapper({}, true)).toMatchSnapshot();
-});
-
-function getWrapper(props = {}, onSonarCloud = false) {
- (isSonarCloud as jest.Mock).mockImplementation(() => onSonarCloud);
+function getWrapper(props = {}) {
return shallow(
<GlobalFooter productionDatabase={true} sonarqubeEdition={EditionKey.community} {...props} />
);
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2020 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-import { shallow } from 'enzyme';
-import * as React from 'react';
-import GlobalFooterSonarCloud from '../GlobalFooterSonarCloud';
-
-jest.mock('date-fns/get_year', () => jest.fn(() => '20XX'));
-
-it('should render correctly', () => {
- expect(shallow(<GlobalFooterSonarCloud />)).toMatchSnapshot();
-});
className="page-footer-menu-item"
>
<a
- href="http://www.gnu.org/licenses/lgpl-3.0.txt"
+ href="https://www.gnu.org/licenses/lgpl-3.0.txt"
rel="noopener noreferrer"
target="_blank"
>
className="page-footer-menu-item"
>
<a
- href="http://www.gnu.org/licenses/lgpl-3.0.txt"
+ href="https://www.gnu.org/licenses/lgpl-3.0.txt"
rel="noopener noreferrer"
target="_blank"
>
</div>
`;
-exports[`should render SonarCloud footer 1`] = `<GlobalFooterSonarCloud />`;
-
exports[`should render the only logged in information 1`] = `
<div
className="page-footer page-container"
className="page-footer-menu-item"
>
<a
- href="http://www.gnu.org/licenses/lgpl-3.0.txt"
+ href="https://www.gnu.org/licenses/lgpl-3.0.txt"
rel="noopener noreferrer"
target="_blank"
>
+++ /dev/null
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`should render correctly 1`] = `
-<div
- className="page-footer page-container"
- id="footer"
->
- <div>
- © 2008-20XX, SonarCloud by
- <a
- href="http://www.sonarsource.com"
- rel="noopener noreferrer"
- target="_blank"
- title="SonarSource SA"
- >
- SonarSource SA
- </a>
- . All rights reserved.
- </div>
- <ul
- className="page-footer-menu"
- >
- <li
- className="page-footer-menu-item"
- >
- <a
- href="https://blog.sonarsource.com/product/SonarCloud"
- rel="noopener noreferrer"
- target="_blank"
- >
- footer.news
- </a>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <a
- href="https://twitter.com/sonarcloud"
- rel="noopener noreferrer"
- target="_blank"
- >
- footer.twitter
- </a>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- rel="noopener noreferrer"
- style={Object {}}
- target="_blank"
- to="/terms.pdf"
- >
- footer.terms
- </Link>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to="/about/pricing/"
- >
- footer.pricing
- </Link>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to="/documentation/privacy/"
- >
- footer.privacy
- </Link>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to="/documentation/security/"
- >
- footer.security
- </Link>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <a
- href="https://community.sonarsource.com/c/help/sc"
- rel="noopener noreferrer"
- target="_blank"
- >
- footer.help
- </a>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to="/about/contact"
- >
- footer.contact_us
- </Link>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <a
- href="https://sonarcloud.statuspage.io/"
- rel="noopener noreferrer"
- target="_blank"
- >
- footer.status
- </a>
- </li>
- <li
- className="page-footer-menu-item"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to="/about"
- >
- footer.about
- </Link>
- </li>
- </ul>
-</div>
-`;
viewBox="0 0 16 16"
width={16}
xmlSpace="preserve"
- xmlnsXlink="http://www.w3.org/1999/xlink"
+ xmlnsXlink="https://www.w3.org/1999/xlink"
{...other}>
<path
d="M6.25 12.5a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm0-9a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm5 1a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0zm.75 0a1.5 1.5 0 0 1-.75 1.297c-.023 2.82-2.023 3.445-3.352 3.867-1.242.39-1.648.578-1.648 1.336v.203A1.5 1.5 0 1 1 4 12.5a1.5 1.5 0 0 1 .75-1.297V4.797A1.5 1.5 0 1 1 7 3.5a1.5 1.5 0 0 1-.75 1.297V8.68c.398-.196.82-.328 1.203-.446 1.453-.46 2.281-.804 2.297-2.437A1.5 1.5 0 1 1 12 4.5z"