]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9403 Filter out leak measures from the available measures of the project activi...
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 7 Jul 2017 10:35:50 +0000 (12:35 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 13 Jul 2017 12:34:17 +0000 (14:34 +0200)
server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js

index d0a435a97ce96beab2d560dfe388eec99d59c05c..8d8b861fd2484b45b40f31650626a5a05b27956b 100644 (file)
@@ -21,6 +21,7 @@
 import React from 'react';
 import Modal from 'react-modal';
 import Select from 'react-select';
+import { isDiffMetric } from '../../../../helpers/measures';
 import { translate } from '../../../../helpers/l10n';
 import type { Metric } from '../../types';
 
@@ -55,7 +56,7 @@ export default class AddGraphMetric extends React.PureComponent {
     const selectedType = this.getMetricsType();
     return this.props.metrics
       .filter(metric => {
-        if (metric.hidden) {
+        if (metric.hidden || isDiffMetric(metric.key)) {
           return false;
         }
         if (selectedType) {