diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-09-28 15:31:37 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-09-28 15:31:37 +0200 |
commit | 99ffcad9488047226eb21cf5acc20c695f9735df (patch) | |
tree | b29b70fba6a608dc38633e70878e3868f5a21a1c /server/sonar-web/src | |
parent | 0fdb1764e2be1efc00f84f2ce966d1a8ad78eb3e (diff) | |
download | sonarqube-99ffcad9488047226eb21cf5acc20c695f9735df.tar.gz sonarqube-99ffcad9488047226eb21cf5acc20c695f9735df.zip |
SONAR-5770 apply feedback
Diffstat (limited to 'server/sonar-web/src')
3 files changed, 25 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/nav/component/component-nav-meta.jsx b/server/sonar-web/src/main/js/apps/nav/component/component-nav-meta.jsx index eb64c48a64c..45061352e56 100644 --- a/server/sonar-web/src/main/js/apps/nav/component/component-nav-meta.jsx +++ b/server/sonar-web/src/main/js/apps/nav/component/component-nav-meta.jsx @@ -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> ); diff --git a/server/sonar-web/src/main/js/apps/nav/component/component-nav.jsx b/server/sonar-web/src/main/js/apps/nav/component/component-nav.jsx index ce2b4da804d..917d54a6899 100644 --- a/server/sonar-web/src/main/js/apps/nav/component/component-nav.jsx +++ b/server/sonar-web/src/main/js/apps/nav/component/component-nav.jsx @@ -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() { diff --git a/server/sonar-web/src/main/less/init/links.less b/server/sonar-web/src/main/less/init/links.less index 9cca0ba5d35..83e89658c35 100644 --- a/server/sonar-web/src/main/less/init/links.less +++ b/server/sonar-web/src/main/less/init/links.less @@ -27,6 +27,9 @@ a { } +.tooltip a { color: @lightBlue; } + + // Misc .link-no-underline { border-bottom: none; } |