diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-12-08 17:35:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-08 17:35:26 +0100 |
commit | 621544af2b072e21e42b8d4c1c2bd800cbfdd696 (patch) | |
tree | 271306721ea30ca9549a4649eae6059ed5aa4ffa /server/sonar-web/src/main/js/apps/settings | |
parent | fb9dd756d3e18058e13384b4119e220d3ae1a43d (diff) | |
download | sonarqube-621544af2b072e21e42b8d4c1c2bd800cbfdd696.tar.gz sonarqube-621544af2b072e21e42b8d4c1c2bd800cbfdd696.zip |
SONAR-8505 Implement smooth transition between pages (#1440)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings')
7 files changed, 2 insertions, 42 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/App.js b/server/sonar-web/src/main/js/apps/settings/components/App.js index 902e4bf4602..1ff0e46f97b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/App.js +++ b/server/sonar-web/src/main/js/apps/settings/components/App.js @@ -24,7 +24,6 @@ import { connect } from 'react-redux'; import PageHeader from './PageHeader'; import CategoryDefinitionsList from './CategoryDefinitionsList'; import AllCategoriesList from './AllCategoriesList'; -import GlobalMessagesContainer from './GlobalMessagesContainer'; import WildcardsHelp from './WildcardsHelp'; import { fetchSettings } from '../store/actions'; import { getSettingsAppDefaultCategory } from '../../../app/store/rootReducer'; @@ -79,7 +78,6 @@ class App extends React.Component { return ( <div id="settings-page" className="page page-limited"> <PageHeader component={this.props.component}/> - <GlobalMessagesContainer/> <div className="settings-layout"> <div className="settings-side"> <AllCategoriesList diff --git a/server/sonar-web/src/main/js/apps/settings/components/GlobalMessagesContainer.js b/server/sonar-web/src/main/js/apps/settings/components/GlobalMessagesContainer.js deleted file mode 100644 index 9c9af651c6a..00000000000 --- a/server/sonar-web/src/main/js/apps/settings/components/GlobalMessagesContainer.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact 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 { connect } from 'react-redux'; -import GlobalMessages from '../../../components/controls/GlobalMessages'; -import { getSettingsAppGlobalMessages } from '../../../app/store/rootReducer'; - -const mapStateToProps = state => ({ - messages: getSettingsAppGlobalMessages(state) -}); - -export default connect(mapStateToProps)(GlobalMessages); diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js index fd356a3dd7f..b7a085ad0d0 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js @@ -20,7 +20,6 @@ import React from 'react'; import GenerateSecretKeyForm from './GenerateSecretKeyForm'; import EncryptionForm from './EncryptionForm'; -import GlobalMessagesContainer from '../components/GlobalMessagesContainer'; import { translate } from '../../../helpers/l10n'; export default class EncryptionApp extends React.Component { @@ -48,8 +47,6 @@ export default class EncryptionApp extends React.Component { {this.props.loading && <i className="spinner"/>} </header> - <GlobalMessagesContainer/> - {!this.props.loading && !this.props.secretKeyAvailable && ( <GenerateSecretKeyForm secretKey={this.props.secretKey} diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesApp.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesApp.js index 0568461d769..b1bb6c3153f 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesApp.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesApp.js @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; -import GlobalMessagesContainer from '../components/GlobalMessagesContainer'; import LicensesAppHeader from './LicensesAppHeader'; import LicensesListContainer from './LicensesListContainer'; @@ -27,7 +26,6 @@ export default class LicensesApp extends React.Component { return ( <div id="licenses-page" className="page page-limited"> <LicensesAppHeader/> - <GlobalMessagesContainer/> <LicensesListContainer/> </div> ); diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/__tests__/LicensesApp-test.js b/server/sonar-web/src/main/js/apps/settings/licenses/__tests__/LicensesApp-test.js index ab23f0f8ed0..372f5947e3d 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/__tests__/LicensesApp-test.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/__tests__/LicensesApp-test.js @@ -20,13 +20,11 @@ import React from 'react'; import { shallow } from 'enzyme'; import LicensesApp from '../LicensesApp'; -import GlobalMessagesContainer from '../../components/GlobalMessagesContainer'; import LicensesAppHeader from '../LicensesAppHeader'; import LicensesListContainer from '../LicensesListContainer'; it('should render', () => { const app = shallow(<LicensesApp/>); - expect(app.find(GlobalMessagesContainer).length).toBe(1); expect(app.find(LicensesAppHeader).length).toBe(1); expect(app.find(LicensesListContainer).length).toBe(1); }); diff --git a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js index db845226e90..8474bbaa581 100644 --- a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js +++ b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; -import GlobalMessagesContainer from '../components/GlobalMessagesContainer'; import { translate } from '../../../helpers/l10n'; import { getServerId, generateServerId } from '../../../api/settings'; import { parseError } from '../../code/utils'; @@ -79,8 +78,6 @@ export default class ServerIdApp extends React.Component { <div className="page-description">{translate('server_id_configuration.information')}</div> </header> - <GlobalMessagesContainer/> - {this.state.serverId != null && ( <div className={this.state.invalidServerId ? 'panel panel-danger' : 'panel'}> Server ID: diff --git a/server/sonar-web/src/main/js/apps/settings/store/rootReducer.js b/server/sonar-web/src/main/js/apps/settings/store/rootReducer.js index 90658fcb3db..92b15323978 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/rootReducer.js +++ b/server/sonar-web/src/main/js/apps/settings/store/rootReducer.js @@ -24,12 +24,13 @@ import values, * as fromValues from './values/reducer'; import settingsPage, * as fromSettingsPage from './settingsPage/reducer'; import licenses, * as fromLicenses from './licenses/reducer'; import globalMessages, * as fromGlobalMessages from '../../../components/store/globalMessages'; +import type { State as GlobalMessagesState } from '../../../components/store/globalMessages'; import encryptionPage from './encryptionPage/reducer'; type State = { definitions: {}, encryptionPage: {}, - globalMessages: {}, + globalMessages: GlobalMessagesState, licenses: {}, settingsPage: {}, values: {} |