]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9176 Remove useless request of organization list at app loading
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 4 May 2017 15:14:44 +0000 (17:14 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 9 May 2017 09:14:36 +0000 (11:14 +0200)
server/sonar-web/src/main/js/app/components/App.js

index f2c392bc4ef38ffd552fc6f4946d04f672f0eba1..8f4d06a1078a7db59b41740812dee376be510bdc 100644 (file)
@@ -22,7 +22,7 @@ import React from 'react';
 import { connect } from 'react-redux';
 import GlobalLoading from './GlobalLoading';
 import { fetchCurrentUser } from '../../store/users/actions';
-import { fetchLanguages, fetchAppState, fetchOrganizations } from '../../store/rootActions';
+import { fetchLanguages, fetchAppState } from '../../store/rootActions';
 
 class App extends React.PureComponent {
   mounted: boolean;
@@ -31,7 +31,6 @@ class App extends React.PureComponent {
     fetchAppState: React.PropTypes.func.isRequired,
     fetchCurrentUser: React.PropTypes.func.isRequired,
     fetchLanguages: React.PropTypes.func.isRequired,
-    fetchOrganizations: React.PropTypes.func.isRequired,
     children: React.PropTypes.element.isRequired
   };
 
@@ -44,13 +43,7 @@ class App extends React.PureComponent {
 
     this.props
       .fetchCurrentUser()
-      .then(() =>
-        Promise.all([
-          this.props.fetchAppState(),
-          this.props.fetchOrganizations(),
-          this.props.fetchLanguages()
-        ])
-      )
+      .then(() => Promise.all([this.props.fetchAppState(), this.props.fetchLanguages()]))
       .then(this.finishLoading, this.finishLoading);
   }
 
@@ -76,6 +69,5 @@ class App extends React.PureComponent {
 export default connect(null, {
   fetchAppState,
   fetchCurrentUser,
-  fetchLanguages,
-  fetchOrganizations
+  fetchLanguages
 })(App);