aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-05-16 12:31:59 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-05-16 12:32:08 +0200
commitd383aa2db56e889c1dfbc0608483cad96f508f52 (patch)
tree41a463f71c15c7df76c0d0f0eedd9cfdafe8c0e0 /server/sonar-web/src/main/js/apps
parentd1e213c6f713cd38c9c7b06fb222c725c821f6c5 (diff)
downloadsonarqube-d383aa2db56e889c1dfbc0608483cad96f508f52.tar.gz
sonarqube-d383aa2db56e889c1dfbc0608483cad96f508f52.zip
SONAR-6336 display warning only for saved conditions
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
index 50f0244c683..b6cc569c4de 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
@@ -73,8 +73,9 @@ export default class Conditions extends React.Component {
});
const duplicates = [];
- conditions.forEach(condition => {
- const sameCount = conditions
+ const savedConditions = conditions.filter(condition => condition.id != null);
+ savedConditions.forEach(condition => {
+ const sameCount = savedConditions
.filter(sample => sample.metric === condition.metric && sample.period === condition.period)
.length;
if (sameCount > 1) {