diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-01-26 15:06:24 +0100 |
---|---|---|
committer | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-01-31 13:31:17 +0100 |
commit | 4599fde053e7308859b5fd15a38bb91ea9c9a2c8 (patch) | |
tree | 3ca652f72bf88eb36fd02b8908e8069ec0a5336b /server/sonar-web/src/main/js/apps/overview/main | |
parent | cbaebde0219b22b32553d4c3f5aa737f00b00950 (diff) | |
download | sonarqube-4599fde053e7308859b5fd15a38bb91ea9c9a2c8.tar.gz sonarqube-4599fde053e7308859b5fd15a38bb91ea9c9a2c8.zip |
SONAR-8370 Display ratings on new code on a project dashbord
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/main')
3 files changed, 17 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js index 953cffb8188..5d8174a1df4 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js +++ b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js @@ -63,7 +63,10 @@ class BugsAndVulnerabilities extends React.Component { <div className="overview-domain-measures"> <div className="overview-domain-measure"> <div className="overview-domain-measure-value"> - {this.props.renderIssues('new_bugs', 'BUG')} + <span style={{ marginLeft: 30 }}> + {this.props.renderIssues('new_bugs', 'BUG')} + </span> + {this.props.renderRating('new_reliability_rating')} </div> <div className="overview-domain-measure-label"> <span className="little-spacer-right"><BugIcon/></span> @@ -73,7 +76,10 @@ class BugsAndVulnerabilities extends React.Component { <div className="overview-domain-measure"> <div className="overview-domain-measure-value"> - {this.props.renderIssues('new_vulnerabilities', 'VULNERABILITY')} + <span style={{ marginLeft: 30 }}> + {this.props.renderIssues('new_vulnerabilities', 'VULNERABILITY')} + </span> + {this.props.renderRating('new_security_rating')} </div> <div className="overview-domain-measure-label"> <span className="little-spacer-right"><VulnerabilityIcon/></span> diff --git a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js index 7994903186a..4ba9c9b358d 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js +++ b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js @@ -86,7 +86,10 @@ class CodeSmells extends React.Component { <div className="overview-domain-measures"> <div className="overview-domain-measure"> <div className="overview-domain-measure-value"> - {this.renderDebt('new_technical_debt', 'CODE_SMELL')} + <span style={{ marginLeft: 30 }}> + {this.renderDebt('new_technical_debt', 'CODE_SMELL')} + </span> + {this.props.renderRating('new_maintainability_rating')} </div> <div className="overview-domain-measure-label"> {getMetricName('new_effort')} diff --git a/server/sonar-web/src/main/js/apps/overview/main/enhance.js b/server/sonar-web/src/main/js/apps/overview/main/enhance.js index 47850e7dd2f..f747e0f2834 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/enhance.js +++ b/server/sonar-web/src/main/js/apps/overview/main/enhance.js @@ -128,14 +128,14 @@ export default function enhance (ComposedComponent) { return null; } - const title = getRatingTooltip(metricKey, measure.value); + const value = this.getValue(measure); + + const title = getRatingTooltip(metricKey, value); return ( - <div className="overview-domain-measure-sup" - title={title} - data-toggle="tooltip"> + <div className="overview-domain-measure-sup" title={title} data-toggle="tooltip"> <DrilldownLink className="link-no-underline" component={component.key} metric={metricKey}> - <Rating value={measure.value}/> + <Rating value={value}/> </DrilldownLink> </div> ); |