]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5770 apply feedback
authorStas Vilchik <vilchiks@gmail.com>
Mon, 28 Sep 2015 13:31:37 +0000 (15:31 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 28 Sep 2015 13:31:37 +0000 (15:31 +0200)
server/sonar-web/src/main/js/apps/nav/component/component-nav-meta.jsx
server/sonar-web/src/main/js/apps/nav/component/component-nav.jsx
server/sonar-web/src/main/less/init/links.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index eb64c48a64cf6b0c2161275da270bb5a17108bef..45061352e56518796f491cf30ab87160c7ad1082 100644 (file)
@@ -3,23 +3,35 @@ import PendingIcon from '../../../components/shared/pending-icon';
 
 export default React.createClass({
   render() {
-    let metaList = [];
+    let metaList = [],
+        // FIXME check right permission
+        canSeeBackgroundTasks = this.props.conf.showSettings,
+        backgroundTasksUrl = `${baseUrl}/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
 
     if (this.props.isInProgress) {
+      let tooltip = canSeeBackgroundTasks ?
+          window.tp('component_navigation.status.in_progress.admin', backgroundTasksUrl) :
+          window.t('component_navigation.status.in_progress');
       metaList.push(
-          <li key="isInProgress" data-toggle="tooltip" title={window.t('component_navigation.status.in_progress')}>
+          <li key="isInProgress" data-toggle="tooltip" title={tooltip}>
             <i className="spinner" style={{ marginTop: '-1px' }}/> <span className="text-info">{window.t('background_task.status.IN_PROGRESS')}</span>
           </li>
       );
     } else if (this.props.isPending) {
+      let tooltip = canSeeBackgroundTasks ?
+          window.tp('component_navigation.status.pending.admin', backgroundTasksUrl) :
+          window.t('component_navigation.status.pending');
       metaList.push(
-          <li key="isPending" data-toggle="tooltip" title={window.t('component_navigation.status.pending')}>
+          <li key="isPending" data-toggle="tooltip" title={tooltip}>
             <PendingIcon/> <span>{window.t('background_task.status.PENDING')}</span>
           </li>
       );
     } else if (this.props.isFailed) {
+      let tooltip = canSeeBackgroundTasks ?
+          window.tp('component_navigation.status.failed.admin', backgroundTasksUrl) :
+          window.t('component_navigation.status.failed');
       metaList.push(
-          <li key="isFailed" data-toggle="tooltip" title={window.t('component_navigation.status.failed')}>
+          <li key="isFailed" data-toggle="tooltip" title={tooltip}>
             <i className="icon-test-status-error"/> <span className="text-danger">{window.t('background_task.status.FAILED')}</span>
           </li>
       );
index ce2b4da804dfd073228c703fd4a221f7711ec646..917d54a6899768b156dc3e636dafbefe937bb0e8 100644 (file)
@@ -39,7 +39,12 @@ export default React.createClass({
   },
 
   initTooltips() {
-    $('[data-toggle="tooltip"]', React.findDOMNode(this)).tooltip({ container: 'body', placement: 'bottom' });
+    $('[data-toggle="tooltip"]', React.findDOMNode(this)).tooltip({
+      container: 'body',
+      placement: 'bottom',
+      delay: { show: 0, hide: 1000 },
+      html: true
+    });
   },
 
   render() {
index 9cca0ba5d35cccc1e89f0104024b45988542ed49..83e89658c3535319b46f2c7e62d3ca4a103fdef2 100644 (file)
@@ -27,6 +27,9 @@ a {
 }
 
 
+.tooltip a { color: @lightBlue; }
+
+
 // Misc
 
 .link-no-underline { border-bottom: none; }
index a8fed1ceb925f6877ebb82370ab6ff824bc0ac6c..82e2eabf235fd9edc9915575e7d90ab25b814743 100644 (file)
@@ -3045,8 +3045,11 @@ update_center.status.DEPS_REQUIRE_SYSTEM_UPGRADE=Some of dependencies requires s
 #
 #------------------------------------------------------------------------------
 component_navigation.status.failed=The last analysis has failed.
+component_navigation.status.failed.admin=The last analysis has failed.<br>More details available on the <a href="{0}">Background Tasks</a> page.
 component_navigation.status.pending=There is a pending analysis.
+component_navigation.status.pending.admin=There is a pending analysis.<br>More details available on the <a href="{0}">Background Tasks</a> page.
 component_navigation.status.in_progress=The analysis is in progress.
+component_navigation.status.in_progress.admin=The analysis is in progress.<br>More details available on the <a href="{0}">Background Tasks</a> page.
 
 background_task.status.PENDING=Pending
 background_task.status.IN_PROGRESS=In Progress