nav.getFooter().should(hasText((String) statusMap.get("version")));
}
+ @Test
+ public void footer_doesnt_contains_version_on_login_page() {
+ WsResponse status = ItUtils.newAdminWsClient(ORCHESTRATOR).wsConnector().call(new GetRequest("api/navigation/global"));
+ Map<String, Object> statusMap = ItUtils.jsonToMap(status.content());
+
+ nav.openLogin();
+ nav.getFooter().shouldNot(hasText((String) statusMap.get("version")));
+ }
+
@Test
public void many_page_transitions() {
analyzeSampleProject();
import { connect } from 'react-redux';
import { getAppState } from '../../store/rootReducer';
import GlobalFooterBranding from './GlobalFooterBranding';
+import { translate, translateWithParameters } from '../../helpers/l10n';
-function GlobalFooter(props: Object) {
- const { sonarqubeVersion, productionDatabase } = props;
+type Props = {
+ hideLoggedInInfo?: boolean,
+ productionDatabase: boolean,
+ sonarqubeVersion?: string
+};
+function GlobalFooter({ hideLoggedInInfo, sonarqubeVersion, productionDatabase }: Props) {
return (
<div id="footer" className="page-footer page-container">
{productionDatabase === false &&
<div className="alert alert-danger">
<p className="big" id="evaluation_warning">
- Embedded database should be used for evaluation purpose only
+ {translate('footer.production_database_warning')}
</p>
<p>
- The embedded database will not scale, it will not support upgrading to newer
- {' '}
- versions of SonarQube, and there is no support for migrating your data out of it
- {' '}
- into a different database engine.
+ {translate('footer.production_database_explanation')}
</p>
</div>}
<GlobalFooterBranding />
<div>
- Version {sonarqubeVersion}
+ {!hideLoggedInInfo &&
+ sonarqubeVersion &&
+ translateWithParameters('footer.version_x', sonarqubeVersion)}
+ {!hideLoggedInInfo && sonarqubeVersion && ' - '}
+ <a href="http://www.gnu.org/licenses/lgpl-3.0.txt">{translate('footer.licence')}</a>
{' - '}
- <a href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL v3</a>
+ <a href="http://www.sonarqube.org">{translate('footer.community')}</a>
{' - '}
- <a href="http://www.sonarqube.org">Community</a>
+ <a href="https://redirect.sonarsource.com/doc/home.html">
+ {translate('footer.documentation')}
+ </a>
{' - '}
- <a href="https://redirect.sonarsource.com/doc/home.html">Documentation</a>
+ <a href="https://redirect.sonarsource.com/doc/community.html">
+ {translate('footer.support')}
+ </a>
{' - '}
- <a href="https://redirect.sonarsource.com/doc/community.html">Get Support</a>
- {' - '}
- <a href="https://redirect.sonarsource.com/doc/plugin-library.html">Plugins</a>
- {' - '}
- <Link to="/web_api">Web API</Link>
- {' - '}
- <Link to="/about">About</Link>
+ <a href="https://redirect.sonarsource.com/doc/plugin-library.html">
+ {translate('footer.plugins')}
+ </a>
+ {!hideLoggedInInfo && ' - '}
+ {!hideLoggedInInfo && <Link to="/web_api">{translate('footer.web_api')}</Link>}
+ {!hideLoggedInInfo && ' - '}
+ {!hideLoggedInInfo && <Link to="/about">{translate('footer.about')}</Link>}
</div>
</div>
);
import React from 'react';
import GlobalFooter from './GlobalFooter';
+type Props = {
+ children?: React.Element<*> | Array<React.Element<*>>,
+ hideLoggedInInfo?: boolean
+};
+
export default class SimpleContainer extends React.PureComponent {
- static propTypes = {
- children: React.PropTypes.oneOfType([
- React.PropTypes.element,
- React.PropTypes.arrayOf(React.PropTypes.element)
- ])
- };
+ props: Props;
componentDidMount() {
const html = document.querySelector('html');
</div>
</div>
</div>
- <GlobalFooter />
+ <GlobalFooter hideLoggedInInfo={this.props.hideLoggedInInfo} />
</div>
);
}
import App from '../components/App';
import GlobalContainer from '../components/GlobalContainer';
import SimpleContainer from '../components/SimpleContainer';
+import SimpleSessionsContainer from '../../apps/sessions/components/SimpleSessionsContainer';
import Landing from '../components/Landing';
import ProjectContainer from '../components/ProjectContainer';
import ProjectAdminContainer from '../components/ProjectAdminContainer';
</Route>
<Route component={MigrationContainer}>
- <Route component={SimpleContainer}>
+ <Route component={SimpleSessionsContainer}>
<Route path="/sessions">{sessionsRoutes}</Route>
</Route>
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 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.
+ */
+// @flow
+import React from 'react';
+import SimpleContainer from '../../../app/components/SimpleContainer';
+
+type Props = {
+ children?: React.Element<*> | Array<React.Element<*>>
+};
+
+export default function SimpleSessionsContainer({ children }: Props) {
+ return <SimpleContainer hideLoggedInInfo={true}>{children}</SimpleContainer>;
+}
organization.change_visibility_form.header=Set Default Visibility of New Projects
organization.change_visibility_form.warning=This will not change the visibility of already existing projects.
organization.change_visibility_form.submit=Change Default Visibility
+
+#------------------------------------------------------------------------------
+#
+# GLOBAL FOOTER
+#
+#------------------------------------------------------------------------------
+footer.about=About
+footer.community=Community
+footer.documentation=Documentation
+footer.licence=LGPL v3
+footer.plugins=Plugins
+footer.production_database_explanation=The embedded database will not scale, it will not support upgrading to newer versions of SonarQube, and there is no support for migrating your data out of it into a different database engine.
+footer.production_database_warning=Embedded database should be used for evaluation purpose only
+footer.support=Get Support
+footer.version_x=Version {0}
+footer.web_api=Web API