From: Grégoire Aubert Date: Fri, 7 Jul 2017 10:35:50 +0000 (+0200) Subject: SONAR-9403 Filter out leak measures from the available measures of the project activi... X-Git-Tag: 6.5-RC1~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5cb4a810e192fc2299031ed2fc04b57c522b793;p=sonarqube.git SONAR-9403 Filter out leak measures from the available measures of the project activity custom graph --- diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js index d0a435a97ce..8d8b861fd24 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js @@ -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) {