aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-17 09:10:48 +0100
committerGitHub <noreply@github.com>2017-03-17 09:10:48 +0100
commitde4365079bad2df3bdee2133576dc913ffbf1ab2 (patch)
treea522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js
parent6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff)
downloadsonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz
sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js49
1 files changed, 26 insertions, 23 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js
index bd2273f9662..21fc78a5de4 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js
@@ -23,40 +23,43 @@ import PendingIcon from '../../../../components/shared/pending-icon';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
export default React.createClass({
- render () {
+ render() {
const metaList = [];
const canSeeBackgroundTasks = this.props.conf.showBackgroundTasks;
- const backgroundTasksUrl =
- `${window.baseUrl}/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
+ const backgroundTasksUrl = window.baseUrl +
+ `/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
if (this.props.isInProgress) {
- const tooltip = canSeeBackgroundTasks ?
- translateWithParameters('component_navigation.status.in_progress.admin', backgroundTasksUrl) :
- translate('component_navigation.status.in_progress');
+ const tooltip = canSeeBackgroundTasks
+ ? translateWithParameters(
+ 'component_navigation.status.in_progress.admin',
+ backgroundTasksUrl
+ )
+ : translate('component_navigation.status.in_progress');
metaList.push(
<li key="isInProgress" data-toggle="tooltip" title={tooltip}>
- <i className="spinner" style={{ marginTop: '-1px' }}/>
- {' '}
- <span className="text-info">{translate('background_task.status.IN_PROGRESS')}</span>
- </li>
+ <i className="spinner" style={{ marginTop: '-1px' }} />
+ {' '}
+ <span className="text-info">{translate('background_task.status.IN_PROGRESS')}</span>
+ </li>
);
} else if (this.props.isPending) {
- const tooltip = canSeeBackgroundTasks ?
- translateWithParameters('component_navigation.status.pending.admin', backgroundTasksUrl) :
- translate('component_navigation.status.pending');
+ const tooltip = canSeeBackgroundTasks
+ ? translateWithParameters('component_navigation.status.pending.admin', backgroundTasksUrl)
+ : translate('component_navigation.status.pending');
metaList.push(
<li key="isPending" data-toggle="tooltip" title={tooltip}>
- <PendingIcon/> <span>{translate('background_task.status.PENDING')}</span>
- </li>
+ <PendingIcon /> <span>{translate('background_task.status.PENDING')}</span>
+ </li>
);
} else if (this.props.isFailed) {
- const tooltip = canSeeBackgroundTasks ?
- translateWithParameters('component_navigation.status.failed.admin', backgroundTasksUrl) :
- translate('component_navigation.status.failed');
+ const tooltip = canSeeBackgroundTasks
+ ? translateWithParameters('component_navigation.status.failed.admin', backgroundTasksUrl)
+ : translate('component_navigation.status.failed');
metaList.push(
<li key="isFailed" data-toggle="tooltip" title={tooltip}>
- <span className="badge badge-danger">{translate('background_task.status.FAILED')}</span>
- </li>
+ <span className="badge badge-danger">{translate('background_task.status.FAILED')}</span>
+ </li>
);
}
@@ -69,9 +72,9 @@ export default React.createClass({
}
return (
- <div className="navbar-context-meta">
- <ul className="list-inline">{metaList}</ul>
- </div>
+ <div className="navbar-context-meta">
+ <ul className="list-inline">{metaList}</ul>
+ </div>
);
}
});