diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-12 13:13:42 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-13 14:34:17 +0200 |
commit | a1da96383b98ae9fb0986d8e8323482ffebfe277 (patch) | |
tree | 9041a4068c799ac7d122ab6382b95b471440abf6 /server/sonar-web/src/main/js | |
parent | 757aaeb278c06fb7e89b769e9cb2a46274d39ea2 (diff) | |
download | sonarqube-a1da96383b98ae9fb0986d8e8323482ffebfe277.tar.gz sonarqube-a1da96383b98ae9fb0986d8e8323482ffebfe277.zip |
SONAR-9403 Add a tooltip on the button to show the metric history on the measures page
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js index f2dad990a91..6b2d5324559 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js @@ -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 && |