diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-25 14:26:57 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-25 17:33:29 +0200 |
commit | c889f5e0f9bda5487b376ad13dda253dfa394605 (patch) | |
tree | eb03f9fca2be3e86b8e699396c4b7fb89d2106e1 /server/sonar-web/src/main/js/apps/overview/events | |
parent | 83c615c8afe8ceb63ccac52858da14afec6b36f0 (diff) | |
download | sonarqube-c889f5e0f9bda5487b376ad13dda253dfa394605.tar.gz sonarqube-c889f5e0f9bda5487b376ad13dda253dfa394605.zip |
better rendering of long versions
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/events')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/events/Event.js | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/events/Event.js b/server/sonar-web/src/main/js/apps/overview/events/Event.js index becf8b33e56..fa1b09e0af3 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/Event.js +++ b/server/sonar-web/src/main/js/apps/overview/events/Event.js @@ -27,7 +27,11 @@ export default function Event(props /*: { event: EventType } */) { const { event } = props; if (event.category === 'VERSION') { - return <span className="overview-analysis-event badge">{props.event.name}</span>; + return ( + <Tooltip overlay={`${translate('version')} ${props.event.name}`} mouseEnterDelay={0.5}> + <span className="overview-analysis-event badge">{props.event.name}</span> + </Tooltip> + ); } return ( diff --git a/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap index b14322d6f2a..f6b5bdfc0e6 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap @@ -1,11 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render a version correctly 1`] = ` -<span - className="overview-analysis-event badge" +<Tooltip + mouseEnterDelay={0.5} + overlay="version 6.5-SNAPSHOT" + placement="bottom" > - 6.5-SNAPSHOT -</span> + <span + className="overview-analysis-event badge" + > + 6.5-SNAPSHOT + </span> +</Tooltip> `; exports[`should render an event correctly 1`] = ` |