aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/events
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-10-25 14:26:57 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-10-25 17:33:29 +0200
commitc889f5e0f9bda5487b376ad13dda253dfa394605 (patch)
treeeb03f9fca2be3e86b8e699396c4b7fb89d2106e1 /server/sonar-web/src/main/js/apps/overview/events
parent83c615c8afe8ceb63ccac52858da14afec6b36f0 (diff)
downloadsonarqube-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.js6
-rw-r--r--server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap14
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`] = `