From 33c3ac6b2feb1ef97cb16bc949a0840c388cceaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Wed, 12 Jul 2017 13:45:35 +0200 Subject: [PATCH] SONAR-9403 Display more information messages when adding new metrics to a custom graph --- .../components/forms/AddGraphMetric.js | 36 +++++++++++++------ .../sonar-web/src/main/less/init/forms.less | 2 ++ .../resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 28 insertions(+), 11 deletions(-) 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 847a41ff8ee..69c5a19d918 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 @@ -19,8 +19,10 @@ */ // @flow import React from 'react'; +import classNames from 'classnames'; import Modal from 'react-modal'; import Select from 'react-select'; +import Tooltip from '../../../../components/controls/Tooltip'; import { isDiffMetric } from '../../../../helpers/measures'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import type { Metric } from '../../types'; @@ -120,13 +122,14 @@ export default class AddGraphMetric extends React.PureComponent { searchable={true} value={this.state.selectedMetric} /> - {metricType != null && - - {translateWithParameters( - 'project_activity.graphs.custom.type_x_message', - translate('metric.type', metricType) - )} - } + + {metricType != null + ? translateWithParameters( + 'project_activity.graphs.custom.type_x_message', + translate('metric.type', metricType) + ) + : translate('project_activity.graphs.custom.add_metric_info')} +