From c5cb4a810e192fc2299031ed2fc04b57c522b793 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 7 Jul 2017 12:35:50 +0200 Subject: [PATCH] SONAR-9403 Filter out leak measures from the available measures of the project activity custom graph --- .../js/apps/projectActivity/components/forms/AddGraphMetric.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.39.5