]> source.dussan.org Git - sonarqube.git/commitdiff
fix infinite loading of provisioned projects
authorStas Vilchik <vilchiks@gmail.com>
Mon, 10 Apr 2017 07:52:41 +0000 (09:52 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 10 Apr 2017 07:52:57 +0000 (09:52 +0200)
server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js

index 865ac9b200cf59313df411ffc9604c7694c80949..34666b11fad5f51d69cb2e6fe14e3c36e9695688 100644 (file)
@@ -50,11 +50,13 @@ export default class ProjectCard extends React.PureComponent {
       return null;
     }
 
+    const isProjectAnalyzed = project.analysisDate != null;
     // check reliability_rating because only some measures can be loaded
     // if coming from visualizations tab
-    const areProjectMeasuresLoaded = this.props.measures != null &&
-      this.props.measures['reliability_rating'] != null;
-    const isProjectAnalyzed = project.analysisDate != null;
+    const areProjectMeasuresLoaded = !isProjectAnalyzed ||
+      (this.props.measures != null &&
+        this.props.measures['reliability_rating'] != null &&
+        this.props.measures['sqale_rating'] != null);
     const displayQualityGate = areProjectMeasuresLoaded && isProjectAnalyzed;
 
     const className = classNames('boxed-group', 'project-card', {