aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-01-09 11:01:22 +0100
committerStas Vilchik <stas.vilchik@sonarsource.com>2018-01-09 20:16:51 +0100
commit1904c96a996c1cba54e2fe7540447fcb031e00d3 (patch)
treecaaba56bb7e80486ffdd19f180997896b232359b /server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx
parent4ce8eea9aef0854d57e6a0644b363cbed524b5bd (diff)
downloadsonarqube-1904c96a996c1cba54e2fe7540447fcb031e00d3.tar.gz
sonarqube-1904c96a996c1cba54e2fe7540447fcb031e00d3.zip
SONAR-10073 Impossible to set QP of a project from an organization that is not default
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx27
1 files changed, 17 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx
index fda9bb7ed26..661d0b4b3e7 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx
@@ -60,17 +60,24 @@ export default class App extends React.PureComponent<Props, State> {
loadData() {
this.setState({ loading: true });
- Promise.all([getExporters(), this.fetchProfiles()]).then(responses => {
- if (this.mounted) {
- const [exporters, profilesResponse] = responses;
- this.setState({
- actions: profilesResponse.actions,
- exporters,
- profiles: sortProfiles(profilesResponse.profiles),
- loading: false
- });
+ Promise.all([getExporters(), this.fetchProfiles()]).then(
+ responses => {
+ if (this.mounted) {
+ const [exporters, profilesResponse] = responses;
+ this.setState({
+ actions: profilesResponse.actions,
+ exporters,
+ profiles: sortProfiles(profilesResponse.profiles),
+ loading: false
+ });
+ }
+ },
+ () => {
+ if (this.mounted) {
+ this.setState({ loading: false });
+ }
}
- });
+ );
}
updateProfiles = () => {