aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-04 17:17:31 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-04 17:17:31 +0100
commit8d8607018011f012d15d17f8645f2ad74795fbce (patch)
tree36c67d946efe4f0b42733831f9c9148ea48b48d3 /server/sonar-web
parentc816f9d8bb9efc1fc3dba9c86be53c942ecb8a93 (diff)
downloadsonarqube-8d8607018011f012d15d17f8645f2ad74795fbce.tar.gz
sonarqube-8d8607018011f012d15d17f8645f2ad74795fbce.zip
set duplications threshold for 20% on the overview pages
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/duplications.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
index b761e989e3b..ceebb495d05 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
@@ -95,7 +95,7 @@ export const DuplicationsMain = React.createClass({
const duplications = this.state.measures[duplicationsMetric];
const donutData = [
{ value: duplications, fill: '#f3ca8e' },
- { value: 100 - duplications, fill: '#e6e6e6' }
+ { value: Math.max(0, 20 - duplications), fill: '#e6e6e6' }
];
return <DonutChart width="30" height="30" thickness="3" data={donutData}/>;
},
diff --git a/server/sonar-web/src/main/js/apps/overview/main/duplications.js b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
index 28476eab5d3..be0becc167c 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/duplications.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
@@ -46,7 +46,7 @@ export const GeneralDuplications = React.createClass({
render () {
let donutData = [
{ value: this.props.measures['duplicated_lines_density'], fill: '#f3ca8e' },
- { value: 100 - this.props.measures['duplicated_lines_density'], fill: '#e6e6e6' }
+ { value: Math.max(0, 20 - this.props.measures['duplicated_lines_density']), fill: '#e6e6e6' }
];
return <Domain>