]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9403 Add a tooltip on the button to show the metric history on the measures...
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 12 Jul 2017 11:13:42 +0000 (13:13 +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/component-measures/details/MeasureDetailsHeader.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index f2dad990a91c45872a551f152aaa0ef0fc4e91de..6b2d5324559b2bd1739da13e09bd23b4cbf51157 100644 (file)
@@ -24,11 +24,12 @@ import LanguageDistribution from '../../../components/charts/LanguageDistributio
 import LeakPeriodLegend from '../components/LeakPeriodLegend';
 import IssueTypeIcon from '../../../components/ui/IssueTypeIcon';
 import HistoryIcon from '../../../components/icons-components/HistoryIcon';
+import Tooltip from '../../../components/controls/Tooltip';
 import { ComplexityDistribution } from '../../../components/shared/complexity-distribution';
 import { isDiffMetric } from '../../../helpers/measures';
 import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
 import { getComponentMeasureHistory } from '../../../helpers/urls';
-import { getLocalizedMetricName } from '../../../helpers/l10n';
+import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
 
 export default function MeasureDetailsHeader({
   component,
@@ -44,11 +45,13 @@ export default function MeasureDetailsHeader({
         <IssueTypeIcon query={metric.key} className="little-spacer-right" />
         {getLocalizedMetricName(metric)}
         {!isDiff &&
-          <Link
-            className="js-show-history spacer-left button button-small button-compact"
-            to={getComponentMeasureHistory(component.key, metric.key)}>
-            <HistoryIcon />
-          </Link>}
+          <Tooltip placement="right" overlay={translate('component_measures.show_metric_history')}>
+            <Link
+              className="js-show-history spacer-left button button-small button-compact"
+              to={getComponentMeasureHistory(component.key, metric.key)}>
+              <HistoryIcon />
+            </Link>
+          </Tooltip>}
       </h2>
 
       {isDiff &&
index 70928d877468dc0092ca681a2fcda4c2b874d27f..45bc006fd303b6a5767112492edb2081991ad137 100644 (file)
@@ -2858,6 +2858,7 @@ code.open_component_page=Open Component's Page
 component_measures.all_measures=All Measures
 component_measures.domain_measures={0} Measures
 component_measures.back_to_list=Back to List
+component_measures.show_metric_history=Show history of this metric
 component_measures.tab.tree=Tree
 component_measures.tab.list=List
 component_measures.tab.bubbles=Bubble Chart