From 11c2fa772d9be1e215c73093cfd4d35062b70ddf Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 10 Apr 2017 09:52:41 +0200 Subject: [PATCH] fix infinite loading of provisioned projects --- .../src/main/js/apps/projects/components/ProjectCard.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js index 865ac9b200c..34666b11fad 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.js @@ -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', { -- 2.39.5